This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients pablogsal, pitrou, qb-cea
Date 2018-01-27.21:34:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
This behaviour is because "parent" descriptor ends calling:

    @classmethod
    def _from_parsed_parts(cls, drv, root, parts, init=True):
        self = object.__new__(cls)
        self._drv = drv
        self._root = root
        self._parts = parts
        if init:
            self._init()
        return self

and this calls object.__new__ and this call raises AttributeError: new_attr. Notice that object.__new__(cls) will not raise as this snippet shows:

   >>>: class A:
   ...:     def __new__(*args):
   ...:         raise ZeroDivisionError()
   ...:

>>> A()
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)
<python> in <module>()
----> 1 A()

<python> in __new__(*args)
      1 class A:
      2     def __new__(*args):
----> 3         raise ZeroDivisionError()
      4

ZeroDivisionError:

>>> object.__new__(A)
>>> <__main__.A at 0x7f6239c17860>
History
Date User Action Args
2018-01-27 21:34:12pablogsalsetrecipients: + pablogsal, pitrou, qb-cea
2018-01-27 21:34:12pablogsalsetmessageid: <[email protected]>
2018-01-27 21:34:12pablogsallinkissue32665 messages
2018-01-27 21:34:12pablogsalcreate