#24559: MigrationLoader.load_disk ImportError handling differs under py3/pypy vs
py2
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  Jon
                                     |  Dufresne
         Type:  Bug                  |                   Status:  closed
    Component:  Migrations           |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"661e39c8d5bb05d8ebe8492912bf9f63453b279f" 661e39c8]:
 {{{
 #!CommitTicketReference repository=""
 revision="661e39c8d5bb05d8ebe8492912bf9f63453b279f"
 Fixed #24559 -- Made MigrationLoader.load_disk() catch more specific
 ModuleNotFoundError.

 Avoids inspecting the exception message, which is not considered a
 stable API and can change across Python versions.

 ModuleNotFoundError was introduced in Python 3.6. It is a subclass of
 ImportError that is raised when the imported module does not exist. It
 is not raised for other errors that can occur during an import. This
 exception instance has the property "name" which holds the name of
 module that failed to import.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/24559#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.5c2e925799cf88ccb60cbc46e54ff630%40djangoproject.com.

Reply via email to