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 AttributeError (e.g. because it is immutable) it causes the whole import to fail. This now allows immutable packages to exist and an ImportWarning is reported and the AttributeError exception is ignored.
D
Dino Viehland committed
9b6fec46513006d7b06fcb645cca6e4f5bf7c7b8
Parent: d3ae95e
Committed by GitHub <noreply@github.com>
on 1/23/2020, 12:42:38 AM