STINNER Victor <vstin...@python.org> added the comment:

Test added in bpo-39336 by:

commit 9b6fec46513006d7b06fcb645cca6e4f5bf7c7b8
Author: Dino Viehland <dinoviehl...@gmail.com>
Date:   Wed Jan 22 16:42:38 2020 -0800

    bpo-39336: Allow packages to not let their child modules be set on them 
(#18006)
    
    * bpo-39336: Allow setattr to fail on modules which aren't assignable
    
    When attaching a child module to a package if the object in sys.modules 
raises an Attribu
teError (e.g. because it is immutable) it causes the whole import to fail.  
This now allows i
mmutable packages to exist and an ImportWarning is reported and the 
AttributeError exception 
is ignored.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39459>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to