This being a security issue I think it's okay to break 3.6. might even
backport to 3.5 if it's easy?
On Dec 29, 2017 1:59 PM, "Christian Heimes" wrote:
> Hi,
>
> tl;dr
> This mail is about internationalized domain names and TLS/SSL. It
> doesn't concern you if you live in ASCII-land. Me and a co
On 30 December 2017 at 11:48, Ned Batchelder wrote:
> On 12/29/17 1:59 PM, Guido van Rossum wrote:
>>
>> Regarding whether this should live on PyPI first, in this case that would
>> not be helpful, since attrs is already the category killer on PyPI. So we
>> are IMO taking the best course possible
Okay, I think Guido's proposal is a good compromise.
I already have a branch of dataclasses that should implement that behavior,
so perhaps it was meant to be. :)
~>Ethan Smith
On Fri, Dec 29, 2017 at 5:13 PM, Nick Coghlan wrote:
>
>
> On 30 Dec. 2017 11:01 am, "Ethan Smith" wrote:
>
>
>
> On
On 12/29/17 1:59 PM, Guido van Rossum wrote:
Regarding whether this should live on PyPI first, in this case that
would not be helpful, since attrs is already the category killer on
PyPI. So we are IMO taking the best course possible given that we want
something in the stdlib but not exactly att
On 30 Dec. 2017 11:01 am, "Ethan Smith" wrote:
On Fri, Dec 29, 2017 at 4:52 PM, Guido van Rossum wrote:
> I still think it should overrides anything that's just inherited but
> nothing that's defined in the class being decorated.
>
>
Could you explain why you are of this opinion? Is it a conc
No, I am concerned about the rule being too complex to explain, and about
surprising effects when the base changes (action at a distance).
I also don't necessarily think "we all agree" that what attrs does is
wrong, but the rule I propose seems reasonable.
On Dec 29, 2017 5:58 PM, "Ethan Smith"
On Fri, Dec 29, 2017 at 12:30 PM, Ethan Furman wrote:
> Good point. So auto-generate a new __repr__ if:
>
> - one is not provided, and
> - existing __repr__ is either:
> - object.__repr__, or
> - a previous dataclass __repr__
>
> And if the auto default doesn't work for one's use-case, use th
On Fri, Dec 29, 2017 at 4:52 PM, Guido van Rossum wrote:
> I still think it should overrides anything that's just inherited but
> nothing that's defined in the class being decorated.
>
>
Could you explain why you are of this opinion? Is it a concern about
complexity of implementation?
> On Dec
attrs just silently overwrites any user provided __repr__ unless you
provide repr=False to attr.s.
I think we can all agree that if nothing else, silently overwriting
unconditionally is not what we want for dataclasses.
On Fri, Dec 29, 2017 at 4:38 PM, Nathaniel Smith wrote:
> On Fri, Dec 29, 2
I still think it should overrides anything that's just inherited but
nothing that's defined in the class being decorated.
On Dec 29, 2017 5:43 PM, "Nathaniel Smith" wrote:
> On Fri, Dec 29, 2017 at 12:30 PM, Ethan Furman wrote:
> > Good point. So auto-generate a new __repr__ if:
> >
> > - one
On Fri, Dec 29, 2017 at 12:30 PM, Ethan Furman wrote:
> Good point. So auto-generate a new __repr__ if:
>
> - one is not provided, and
> - existing __repr__ is either:
> - object.__repr__, or
> - a previous dataclass __repr__
>
> And if the auto default doesn't work for one's use-case, use th
On Fri, Dec 29, 2017 at 12:30 PM, Ethan Furman wrote:
> On 12/29/2017 11:55 AM, Ethan Smith wrote:
>
>> On Fri, Dec 29, 2017 at 11:37 AM, Ethan Furman wrote:
>>
>
> It is possible to determine whether an existing __repr__ is from 'object'
>>>
>> >> or not, and only provide one if that is the case
Hi,
tl;dr
This mail is about internationalized domain names and TLS/SSL. It
doesn't concern you if you live in ASCII-land. Me and a couple of other
developers like to change the ssl module in a backwards-incompatible way
to fix IDN support for TLS/SSL.
Simply speaking the IDNA standards (interna
On 12/29/2017 11:55 AM, Ethan Smith wrote:
On Fri, Dec 29, 2017 at 11:37 AM, Ethan Furman wrote:
It is possible to determine whether an existing __repr__ is from 'object'
>> or not, and only provide one if that is the case. I think that should be
>> the default, with 'repr = True' for those
On Fri, Dec 29, 2017 at 11:37 AM, Ethan Furman wrote:
> On 12/29/2017 02:23 AM, Ethan Smith wrote:
>
> The first is that needing both a keyword and method is duplicative and
>> unnecessary. Eric agreed it was a hassle, but
>> felt it was justified considering someone may accidentally override a
>
On 12/29/2017 02:23 AM, Ethan Smith wrote:
The first is that needing both a keyword and method is duplicative and
unnecessary. Eric agreed it was a hassle, but
felt it was justified considering someone may accidentally override a dataclass
method. I disagree with this point of
view as dataclas
On Fri, 29 Dec 2017 11:12:11 -0800
Ethan Smith wrote:
>
> > Agreed as well. If I make the effort of having a dataclass inherit
> > from a base class, I probably don't want the base class' methods to be
> > silently overriden by machine-generated methods. Of course, that can
> > be worked around
But you always inherit __repr__, from object. The base class might also
itself be a dataclass. I think it should only skip when the decorated class
itself defines __repr__.
On Dec 29, 2017 3:47 AM, "Antoine Pitrou" wrote:
> On Fri, 29 Dec 2017 02:23:56 -0800
> Ethan Smith wrote:
> >
> > In a fe
On Fri, Dec 29, 2017 at 2:45 AM, Antoine Pitrou wrote:
> On Fri, 29 Dec 2017 02:23:56 -0800
> Ethan Smith wrote:
> >
> > In a few cases I want to override the repr of the AST nodes. I wrote a
> > __repr__ and ran the code but lo and behold I got a type error. I
> couldn't
> > override it. I quic
On Fri, Dec 29, 2017 at 7:10 AM, Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:
> Recently a question has been raised about the decorator overriding
> methods defined in the class (especially __repr__). People feel that
> if the class defines a method, the decorator should not
On Fri, Dec 29, 2017 at 7:02 AM, Nick Coghlan wrote:
> On 28 December 2017 at 04:22, Ethan Smith wrote:
> > Okay, if there is no further feedback, I will work on a
> singledispatchmethod
> > decorator like partialmethod.
> >
> > For the future perhaps, would it not be possible to tell that the p
ACTIVITY SUMMARY (2017-12-22 - 2017-12-29)
Python tracker at https://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open6355 (+13)
closed 37843 (+24)
total 44198 (+37)
Open issues wi
Brett Cannon writes:
> I wouldn't characterize it as "big questions". For some people there's a
> question as to how to make them work without type hints, but otherwise how
> they function is settled.
Recently a question has been raised about the decorator overriding
methods defined in the cla
On 28 December 2017 at 04:22, Ethan Smith wrote:
> Okay, if there is no further feedback, I will work on a singledispatchmethod
> decorator like partialmethod.
>
> For the future perhaps, would it not be possible to tell that the passed
> argument is a descriptor/function and dispatch to the corre
Brett Cannon writes:
> I wouldn't characterize it as "big questions". For some people there's a
> question as to how to make them work without type hints, but otherwise how
> they function is settled.
Recently a question has been raised about the decorator overriding
methods defined in the cla
> Date: Fri, 29 Dec 2017 11:25:14 +0200
> From: Serhiy Storchaka
> To: python-dev@python.org
> Subject: Re: [Python-Dev] Heap allocate type structs in native
> extension modules?
[ munch ]
> Yes, you can create heap types by using PyType_FromSpecWithBases().
>
> But be aware of caveats (ht
On Fri, 29 Dec 2017 02:23:56 -0800
Ethan Smith wrote:
>
> In a few cases I want to override the repr of the AST nodes. I wrote a
> __repr__ and ran the code but lo and behold I got a type error. I couldn't
> override it. I quickly learned that one needs to pass a keyword to the
> dataclass decora
Franklin? Lee writes:
> On Tue, Dec 26, 2017 at 2:01 AM, Yogev Hendel wrote:
> >
> > I don't know if this is the right place to put this,
> > but I've found the following lines of code results in an incredibly long
> > processing time.
> (I think the correct place is python-list. python-dev
Hello all,
I've recently been experimenting with dataclasses. They totally rock! A lot
of the boilerplate for the AST I've designed in Python is automatically
taken care of, it's really great! However, I have a few concerns about the
implementation.
In a few cases I want to override the repr of t
26.12.17 12:16, Hugh Fisher пише:
I have a Python program which generates the boilerplate code for
native extension modules from a Python source definition.
(http://bitbucket.org/hugh_fisher/fullofeels if interested.)
The examples in the Python doco and the "Python Essential Reference"
book all
30 matches
Mail list logo