• Steve Weber's avatar
    bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. (GH-6731) · 2487f30d
    Steve Weber yazdı
    Before Python 3.6, os.path.abspath(None) used to report an AttributeError which was properly caught inside site.abs_paths, making it ignore __main__, one of sys.modules, which has __file__ and __cached__ set to None. With 3.6, os.path.abspath(None) raises TypeError instead which site.abs_path was not expecting.  This resulted in an uncaught exception if a user had PYTHONSTARTUP set and the application called site.main() which a number of third-party programs do.
    2487f30d
2018-06-10-19-29-17.bpo-30167.G5EgC5.rst 77 Bytes