Re: Very strange issues with collections.Mapping

2018-01-19 Thread John Krukoff via Python-list
Have you ruled out the possibility that collections.Mapping has been (perhaps temporarily) assigned to something else? On Thu, Jan 18, 2018 at 2:37 PM, Jason Swails wrote: > Hello! > > I am running into a very perplexing issue that is very rare, but creeps up > and is crashing my app. > > The ro

Re: Very strange issues with collections.Mapping

2018-01-19 Thread Terry Reedy
On 1/18/2018 4:37 PM, Jason Swails wrote: Hello! I am running into a very perplexing issue that is very rare, but creeps up and is crashing my app. The root cause of the issue comes down to the following check returning true: isinstance([], collections.Mapping) I confirmed that one *can* reg

Re: Very strange issues with collections.Mapping

2018-01-18 Thread Steven D'Aprano
On Thu, 18 Jan 2018 16:37:18 -0500, Jason Swails wrote: > The root cause of the issue comes down to the following check returning > true: > > isinstance([], collections.Mapping) I re-iterate Chris' suggestion that you check that the instance is an actual list, not a subclass. Can you grep the

Re: Very strange issues with collections.Mapping

2018-01-18 Thread Dan Stromberg
Probably not what you want to hear, but this might be a good place for an SSCCE. On Thu, Jan 18, 2018 at 1:37 PM, Jason Swails wrote: > Hello! > > I am running into a very perplexing issue that is very rare, but creeps up > and is crashing my app. > > The root cause of the issue comes down to the

Re: Very strange issues with collections.Mapping

2018-01-18 Thread Chris Angelico
On Fri, Jan 19, 2018 at 8:37 AM, Jason Swails wrote: > The root cause of the issue comes down to the following check returning > true: > > isinstance([], collections.Mapping) > > Obviously you can get this behavior if you register `list` as a subclass of > the Mapping ABC, but I'm not doing that.