Ethan Furman added the comment:
I'll switch it to a deprecation warning instead sometime this week.
The changes to datamodel.rst and tarfile.py should stay, I think.
test_format and test_unicode will both verify current* behavior and check for
the deprecation warning, and unicodeobject.c
Ethan Furman added the comment:
Could somebody explain this?
===
ethan@media:~/source/python/issue19995_depr$ ./python -W error
Python 3.4.0b1 (default:2f81f0e331f6+, Jan 9 2014, 20:30:18)
[GCC 4.7.3] on linux
Type
Ethan Furman added the comment:
For anyone paying really close attention, I've already switched the
assertEquals to assertEqual. ;)
--
Added file: http://bugs.python.org/file33414/issue19995.stoneleaf.04.patch
___
Python tracker
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue16508>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue1820>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue20230>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Depracation warning is in place for 3.4.
When 3.5 is tagged I'll switch it an error.
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue20284>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue18574>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue12704>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue7776>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue17814>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue17811>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Here's a patch for the test.
--
Added file: http://bugs.python.org/file33706/issue20386.stoneleaf.test.patch.01
___
Python tracker
<http://bugs.python.org/is
Ethan Furman added the comment:
Complete patch with new test, fixed tests, and regression fix.
Doc patch still needed.
--
stage: test needed -> patch review
Added file: http://bugs.python.org/file33707/issue20386.stoneleaf.patch.02
___
Pyt
Ethan Furman added the comment:
The containers are there to help with discoverability. If you want to know
what all the (common) AF values are you can either do
[name for name in dir(socket) if name.isupper() and name.startswith('AF_')]
or
list(socket.Add
Ethan Furman added the comment:
How do we feel about SockType instead? (Just a short round of bike-shedding,
promise! ;)
--
___
Python tracker
<http://bugs.python.org/issue20
Ethan Furman added the comment:
Okay, staying with SocketKind.
This patch also has a very small doc enhancement.
--
keywords: +patch
Added file: http://bugs.python.org/file33735/issue20386.stoneleaf.03.patch
___
Python tracker
<h
Ethan Furman added the comment:
Well, so far I have tried:
:class:`IntEnum`
:class:`.IntEnum`
:class:`~IntEnum`
:class:`enum.IntEnum`
:class:`.enum.IntEnum`
:class:`~enum.IntEnum`
:class:`~.enum.IntEnum`
and probably some others I have forgotten; nothing is giving me a link to
Ethan Furman added the comment:
IntEnum is not a class in the socket module.
How do I make a link into another rst document?
--
___
Python tracker
<http://bugs.python.org/issue20
New submission from Ethan Furman:
While trying to update the socket documentation it was brought to my attention
that Enum and IntEnum are not defined as classes as far as the docs are
concerned [1].
[1] http://bugs.python.org/issue20386#msg209473
--
assignee: ethan.furman
messages
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue20457>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue20467>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Thanks for the hints, Georg!
--
Added file: http://bugs.python.org/file33945/issue20386.stoneleaf.04.patch
___
Python tracker
<http://bugs.python.org/issue20
New submission from Ethan Furman:
enum34, the Enum backport, specifically uses `protocol=HIGHEST_PROTOCOL`, while
the current enum tests just use the default.
Running the enum34 test expose an issue with pickle protocol 4
Ethan Furman added the comment:
Working on fixing tests now. Not sure I can fix pickle (at least not in time
for RC1).
--
___
Python tracker
<http://bugs.python.org/issue20
Ethan Furman added the comment:
Thanks, Antoine, that was what I needed.
--
assignee: -> ethan.furman
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file33949/issue20534.stoneleaf.01.patch
___
Python t
Ethan Furman added the comment:
Serhiy, the minimum supported pickle protocol is 2. Now testing all protocols
from 2 to HIGHEST_PROTOCOL, inclusive.
--
___
Python tracker
<http://bugs.python.org/issue20
Ethan Furman added the comment:
Because I didn't know how to make it work with 0 and 1. Thank you! I'll get
that in today.
--
stage: committed/rejected -> patch review
status: closed -> open
___
Python tracker
<http://bugs.py
Ethan Furman added the comment:
Okay, I went with __reduce__ since we don't ever use the pickle protocol
information.
I added a test for class-nested Enums since protocol 4 supports it.
I left the test for test_subclasses_without_getnewargs alone as the point of
that test is to make
Ethan Furman added the comment:
I also removed the protocol 2 warning from the docs, and added this note:
.. note::
With pickle protocol version 4 it is possible to easily pickle enums
nested in other classes.
--
___
Python tracker
<h
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue20543>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
The version 2 docs:
http://docs.python.org/2/library/pickle.html#object.__reduce_ex__:
-
The object class implements both __reduce__() and __reduce_ex__();
however, if a subclass overrides
Ethan Furman added the comment:
Ethan commented:
> I left the test for test_subclasses_without_getnewargs alone as the point of
> that test is to make sure that _make_class_unpicklable is working properly,
> not to see if we can somehow get any of it to pickle.
Serhi
Ethan Furman added the comment:
The only thing I hate more than being wrong is being wrong because Python isn't
acting the way I think it should. :/
So, __qualname__ is not set properly when using the function API (although it
has nothing to do with manually setting __module__ (I remov
Ethan Furman added the comment:
Serhiy commented:
-
> Actually they don't pickle due to wrong __module__. After adding
>
>NEI.__module__ = NamedInt.__module__ = __name__
>
> PicklingError no longer raised for enum class.
If you were to look at the `_ma
Ethan Furman added the comment:
I do not recall if it was or not. The main difference would be in how aliases
were handled. For example, if W and Z were the same value on system A, but
different on system B, then going from A - B via pickle W and Z would still be
the same using the current
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue11406>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue18652>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
I agree that pickling by name is the better solution.
Serhiy, could you explain how the un-pickling works with protocol 4?
--
assignee: -> ethan.furman
___
Python tracker
<http://bugs.python.org/issu
Ethan Furman added the comment:
And it is now possible to override and pickle by name if your custom subclass
so chooses.
--
___
Python tracker
<http://bugs.python.org/issue20
Ethan Furman added the comment:
Patch allows subclass to override __reduce_ex__, which is useful if a mixed-in
type does not have proper pickle support.
--
Added file: http://bugs.python.org/file34138/issue20653.stoneleaf.01.patch
___
Python tracker
Ethan Furman added the comment:
Proposal to switch to pickle by name rejected, but Enum now allows
__reduce_ex__ to be overwridden in subclasses.
--
priority: release blocker -> normal
___
Python tracker
<http://bugs.python.org/issu
New submission from Ethan Furman:
587fd4b91120: Better pickle support for Enum subclasses.
--
assignee: larry
messages: 211552
nosy: ethan.furman, larry
priority: release blocker
severity: normal
stage: commit review
status: open
title: 3.4 cherry-pick: 587fd4b91120 improve Enum
Ethan Furman added the comment:
When I implemented pickle support I did not have a complete understanding of
the pickle protocols nor how to best use them. As a result, I picked
__getnewargs__ and only supported protocols 2 and 3 (4 didn't exist yet).
Serhiy came along and explained a
Changes by Ethan Furman :
--
Removed message: http://bugs.python.org/msg211739
___
Python tracker
<http://bugs.python.org/issue20679>
___
___
Python-bugs-list m
Ethan Furman added the comment:
When I implemented pickle support I did not have a complete understanding of
the pickle protocols nor how to best use them. As a result, I picked
__getnewargs__ and only supported protocols 2 and 3 (4 didn't exist yet).
Serhiy came along and explained a
Ethan Furman added the comment:
When I implemented pickle support I did not have a complete understanding of
the pickle protocols nor how to best use them. As a result, I picked
__getnewargs__ and only supported protocols 2 and 3 (4 didn't exist yet).
Serhiy came along and explained a
Ethan Furman added the comment:
More explanation:
__getnewargs__ is not used by pickle protocol 0 and 1; to support those
protocols we need __reduce_ex__. Since __reduce_ex__ works for 0, 1, 2, 3, 4,
... there's no reason to have both __reduce_ex__ *and* __getnewa
Ethan Furman added the comment:
Larry,
If I make changes to the patch, should I reverse the original and then commit
one new one so you only have one to merge in, or do you mind having two to do?
--
___
Python tracker
<http://bugs.python.
Ethan Furman added the comment:
Thanks for your comments, Eli, I'll work on getting better comments in the code.
The qualname comment is partially related to the pickling changes as it's
necessary for protocol 4 (I forgot to put that comment in on the previous
pickling change that
Ethan Furman added the comment:
Can we do that? If a doc change can make it so we're not locked in to
supporting __getnewargs__ I could live with that.
Although, to be honest, I'd rather get the change in *and* have a doc warning
that pickling specifics are subject to change in 3.
Ethan Furman added the comment:
Discussion started on PyDev.
While working on that I realized/remembered that the main reason to get this in
now is that without it a user *cannot* change how pickling works -- (s)he can
write the methods, but they will be ignored
Ethan Furman added the comment:
Many comments, Eli's and Serhey's code changes incorporated.
--
Added file: http://bugs.python.org/file34173/issue20653.stoneleaf.02.patch
___
Python tracker
<http://bugs.python.o
Ethan Furman added the comment:
Antoine,
If the mixed-in class defines __reduce_ex__, and the Enum class defines
__reduce__, pickle will see that the Enum class has both, and will call the
_ex__ method. It is, therefore, the preferred method (at least by pickle,
which is what we are
Ethan Furman added the comment:
Yeah, I was confused by that when I first read it as well. The 2.7 docs are
even worse in that regard (so there has been some progress :).
--
___
Python tracker
<http://bugs.python.org/issue20
Ethan Furman added the comment:
Antoine commented:
--
> The pickle docs don't mention __reduce_ex__ as being preferred, as in "you
> should
> use this one", on the contrary.
Are we reading the same docs?
http://docs.python.org/dev/library/pickle.h
Ethan Furman added the comment:
On 02/21/2014 11:26 AM, Antoine Pitrou wrote:
>
> Are we reading the same comments?
LOL, apparently not.
--
___
Python tracker
<http://bugs.python.org/i
Ethan Furman added the comment:
Thanks, Larry. I'll have one more patch which will be much better comments in
the code, and a small doc enhancement. When it's ready should I reopen this
issue or create a new one?
--
___
Python trac
Changes by Ethan Furman :
Added file: http://bugs.python.org/file34185/issue20653.stoneleaf.03.patch
___
Python tracker
<http://bugs.python.org/issue20653>
___
___
Pytho
Changes by Ethan Furman :
Added file: http://bugs.python.org/file34191/issue20653.stoneleaf.04.patch
___
Python tracker
<http://bugs.python.org/issue20653>
___
___
Pytho
New submission from Ethan Furman:
Per RDM in issue19030, the docs could be better.
--
messages: 212214
nosy: ethan.furman, ncoghlan
priority: low
severity: normal
stage: needs patch
status: open
title: Improve docs for DynamicClassAttribute
New submission from Ethan Furman:
Two minor code changes addressing the "more pythonic" comments. Major doc
enhancement addressing the functional API. Not sure about the markup as I can
no longer create the docs on my system.
--
assignee: larry
messages: 212670
nosy: et
Ethan Furman added the comment:
For the past couple weeks everytime I try I get:
sphinx-build -b html -d build/doctrees -D latex_paper_size= . build/html
make: sphinx-build: Command not found
make: *** [build] Error 127
--
___
Python tracker
Ethan Furman added the comment:
Ah, thanks! Docs are built, fixed, and built again.
Larry, the two cherries to pick for this are:
b637064cc696: bulk of doc changes
54ab95407288: fixes for ReST markup
Thanks.
--
___
Python tracker
<h
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue13936>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
If no one else has gotten to this in the next six months or so, I will. :)
--
___
Python tracker
<http://bugs.python.org/issue13
New submission from Ethan Furman:
`bytes` is a list of integers. Passing a single integer to `bytes()`, as in:
--> bytes(7)
b'\x00\x00\x00\x00\x00\x00\x00'
results in a bytes object containing that many zeroes.
I propose that this behavior be deprecated for eventual r
New submission from Ethan Furman :
It currently states "Note that nested scopes work only for reference and not
for assignment which will always write to the innermost scope."
This should be updated to read, e.g. "Note that unless the new nonlocal keyword
is used nested scope
Ethan Furman added the comment:
Thanks Raymond and Jean-Sebastien.
--
___
Python tracker
<http://bugs.python.org/issue29103>
___
___
Python-bugs-list mailin
Ethan Furman added the comment:
Simon, can you post the exact line of code that causes the error? It would be
useful for creating a test case and the couple things I have tried to duplicate
the error have worked fine.
--
___
Python tracker
<h
Changes by Ethan Furman :
--
assignee: -> ethan.furman
stage: -> test needed
___
Python tracker
<http://bugs.python.org/issue29167>
___
___
Python-bugs-
Ethan Furman added the comment:
Thanks. I'll go through and audit all my dictionary iterations.
--
nosy: +barry, eli.bendersky
___
Python tracker
<http://bugs.python.org/is
Ethan Furman added the comment:
To keep backwards compatibility and lesson the burden on new code, simply make
the value of the duplicate names be the same:
cumulative = 'cumulative'
cumtime = 'cumulative'
This way the standard name is 'cumulative
Changes by Ethan Furman :
--
nosy: +ethan.furman
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue29235>
___
___
Python-bugs-list mai
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue29238>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Any path/file attributes, etc, inside a ZipFile should be str. ZipFile should
also function properly if path/file requests are given as os.PathLike objects.
--
___
Python tracker
<http://bugs.python.org/issue28
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue29328>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
>From Yury Selivanov:
---
This is a neat idea, but this will only work for parsing framed
binary protocols. For example, if you protocol prefixes all packets
with a length field, you can write an efficient read buffer and
use your proposal
Ethan Furman added the comment:
Fixed the race condition for both the RuntimeError and for getting duplicate
composite members.
--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file46394/issue29167.stoneleaf.01.pa
New submission from Ethan Furman:
>From issue29338, msg286139:
--
It is easy to fix the [pydoc] test by adding missed lines. But I'm not sure
that output the (correct) signature of enum classes makes the help better.
Color(value, names=None, *, module=None,
Ethan Furman added the comment:
That that is very unhelpful help text. :(
Better would be:
Color(value)
So how do we allow Python code to determine the help text?
--
___
Python tracker
<http://bugs.python.org/issue29
Ethan Furman added the comment:
There are actually two signatures:
EnumCls(value) --> return member with value `value`
EnumCls(name, members, module, qualname, type, start) --> create new Enum
An example of the first:
class A(Enum):
x = 1
A(1) -->
an example of the second:
Ethan Furman added the comment:
Probably not because an enum class' __call__ comes from the type EnumMeta -- so
having two different __call__ methods would mean two different metaclasses, and
I'm pretty sure I don't want to go there. ;)
There is a __doc__ defined for the
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue29446>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ethan Furman added the comment:
Before talking about the patch, have you signed the Contributer License
Agreement yet? The issue tracker isn't showing that you have. Check out
https://www.python.org/psf/contrib/contrib-form/ to do so.
---
The `symlinks` flag: can you give some
New submission from Ethan Furman:
Consider:
class AllEnum(Enum):
@classattr
def ALL(cls):
members = list(cls)
all_value = None
if members:
all_value = members[0]
for member in members[1:]:
all_value |= member
Ethan Furman added the comment:
To get the above code snippet to fail properly:
- remove the @classattr line
- prepend from enum import Enum, Flag, IntFlag, auto
--
___
Python tracker
<http://bugs.python.org/issue29
Ethan Furman added the comment:
While only IntColor fails with an error, Color also fails as it is not a Flag
type Enum:
>>> list(Color)
[, , ]
It should have values of 1, 2, 4.
--
___
Python tracker
<http://bugs.python.or
Ethan Furman added the comment:
Possibilities:
- only allow one base Enum class
(fails with All and IntFlag)
- only allow base Enum classes that are compatible
(so not an Enum and a Flag)
(would require multiple base classes for the same behavior: DocEnum,
DocFlag, etc.)
- only allow
Ethan Furman added the comment:
@Julian: Giving flag combinations their own name can be useful. For example,
instead of seeing Color.GREEN|RED one can see Color.YELLOW .
@Marc: I'm not convinced this is a needed change as it doesn't seem to be a
common method, nor one that cannot
Ethan Furman added the comment:
I also think using leading underscores is a better way to signal that a
particular value is "weird".
--
___
Python tracker
<http://bugs.python.o
Ethan Furman added the comment:
`Flag` and `IntFlag` are indeed the correct (and missing) names.
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue29
Ethan Furman added the comment:
aenum 2.0 [1] has been released. Because it also covers Python 2.7 I had to
enhance its auto() to cover |, &, ^, and ~ so that Enum classes could be
properly created.
At this moment your choices are to use odd naming or aenum (with its enhanced
auto).
Ethan Furman added the comment:
Serhiy, agreed. Closing.
Marc, thanks, I see I missed supporting non-auto() combinations. Feel free to
open an issue for that at:
https://bitbucket.org/stoneleaf/aenum
Either way I'll get that fixed.
--
resolution: -> rejected
stage: -&g
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
Changes by Ethan Furman :
--
nosy: +ethan.furman
title: Better stdlib support for Path objects -> Better stdlib support for Path
objects using .path attribute
___
Python tracker
<http://bugs.python.org/issu
Changes by Ethan Furman :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue26027>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Ethan Furman added the comment:
posix module: issue26027
--
___
Python tracker
<http://bugs.python.org/issue27182>
___
___
Python-bugs-list mailing list
Unsub
1101 - 1200 of 1868 matches
Mail list logo