[issue35119] Customizing module attribute access example raises RecursionError

2018-11-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-05 Thread miss-islington
miss-islington added the comment: New changeset 558dc8adbec0b85e0ff257fcedc85c5d89cd2825 by Miss Islington (bot) in branch '3.7': bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323) https://github.com/python/cpython/commit/558dc8adbec0b85e0ff257fcedc85

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +9648 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f by Ivan Levkivskyi (Denis Osipov) in branch 'master': bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323) https://github.com/python/cpython/commit/0bee3c36d406e47

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-04 Thread Denis Osipov
Change by Denis Osipov : -- keywords: +patch pull_requests: +9625 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyth

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Ah, sorry, I didn't understand this was a documentation issue. Please feel free to submit a PR that fixes the example to use `super().__setattr__()`. -- resolution: not a bug -> stage: resolved -> needs patch status: closed -> open

[issue35119] Customizing module attribute access example raises RecursionError

2018-11-04 Thread Denis Osipov
Denis Osipov added the comment: I understand that it's expected behavior. But why don't use completely working example in the docs, which one could just copy and paste? It requires to add just seven chars) -- ___ Python tracker

[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, this is expected, you should use ``super().__setattr__()``. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm not convinced that any change is needed, this is completely expected behaviour (and not special to modules). The following code also raises RecursionError: class VerboseObject: def __setattr__(self, nm, value): print(f"Setting {nm} to {value

[issue35119] Customizing module attribute access example raises RecursionError

2018-10-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report Denis. Would you like to propose a PR for this? The file is at https://github.com/python/cpython/blob/master/Doc/reference/datamodel.rst . This was added as part of 5364b5cd757. I am adding Ivan who added the example for confi

[issue35119] Customizing module attribute access example raises RecursionError

2018-10-30 Thread Denis Osipov
New submission from Denis Osipov : Customizing module attribute access example raises RecursionError: >>> import sys >>> from types import ModuleType >>> class VerboseModule(ModuleType): ... def __repr__(self): ... return f'Verbose {self.__name__}' ... def __setattr__(self, attr