[issue35320] Writable __spec__.has_location attribute

2018-11-27 Thread Brett Cannon
Brett Cannon added the comment: The docs do not specify that has_location is read-only: https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.has_location . And PEPs are not updated once they are implemented as that would mean we would have to perpetually update do

[issue35320] Writable __spec__.has_location attribute

2018-11-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think a setter was added for has_location (msg205384) and docs were updated as part of the patch but the PEP was not updated? . A setter for has_location : https://hg.python.org/cpython/rev/e961a166dc70 -- ___

[issue35320] Writable __spec__.has_location attribute

2018-11-26 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35320] Writable __spec__.has_location attribute

2018-11-26 Thread Géry
Change by Géry : -- nosy: +maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue35320] Writable __spec__.has_location attribute

2018-11-26 Thread Géry
Change by Géry : -- nosy: -maggyero ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue35320] Writable __spec__.has_location attribute

2018-11-26 Thread Géry
New submission from Géry : How to reproduce: Assign the __spec__.has_location attribute of any module. Observed result: __spec__.has_location is a writable. Expected result: __spec__.has_location should be read-only, as defined in PEP 451: https://www.python.org/dev/peps/pep-0451/#attributes