This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients phsilva, vstinner
Date 2020-04-01.15:19:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585754396.93.0.577470433714.issue40137@roundup.psfhosted.org>
In-reply-to
Content
Another minor issue: "assert(PyScanner_Check(self));" and "assert(PyEncoder_Check(self));" were removed by commit 33f15a16d40cb8010a8c758952cbf88d7912ee2d when _json module got a module state.

scanner_traverse(), scanner_clear(), encoder_traverse() and encoder_clear() cannot get the module state of a module using PEP 489 multiphase initialization.

Similar issue in scanner_call() and encoder_call().

I'm not sure that the PEP 573 provide a solution for this exact issue, since the intent of the assertion is to check the type of the argument. The PEP 573 gives access to the module state through types. But here we are not sure that the object type is the expected type... :-)

Again, it's a minor issue, it can be ignored. That's why I accepted to merge the commit. Technically, I don't see how we could get the wrong type in practice.
History
Date User Action Args
2020-04-01 15:19:56vstinnersetrecipients: + vstinner, phsilva
2020-04-01 15:19:56vstinnersetmessageid: <1585754396.93.0.577470433714.issue40137@roundup.psfhosted.org>
2020-04-01 15:19:56vstinnerlinkissue40137 messages
2020-04-01 15:19:56vstinnercreate