Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #30115 -- Fixed for sqlite3 get_field_type unhashable type error #10863

Closed
wants to merge 1 commit into from

Conversation

cansarigol
Copy link
Contributor

@cansarigol cansarigol commented Jan 18, 2019

@carltongibson
Copy link
Member

Someone is going to have to explain this to me... 😊

The error triggered is:

 File ".../django/db/backends/sqlite3/introspection.py", line 65, in get_field_type
    if description.pk and field_type in {'BigIntegerField', 'IntegerField'}:
TypeError: unhashable type: 'dict'

So "change to a tuple", fair enough, but {'BigIntegerField', 'IntegerField'} is a set... So what's going on?

@felixxm
Copy link
Member

felixxm commented Jan 18, 2019

It looks that field_type is a dict 🤔

@carltongibson
Copy link
Member

carltongibson commented Jan 18, 2019

Right, yes. I was just getting towards thinking that, but still...? 🙂 (We need a test case here showing what's going on.)

(Also these MySQL/MariaDB errors are the same as in #10861 — so something is amiss.)

@felixxm
Copy link
Member

felixxm commented Jan 18, 2019

MySQL errors are probably related with new version of mysqlclient. Released 3 hours ago.

@felixxm
Copy link
Member

felixxm commented Jan 18, 2019

I can dig into them later today.

@carltongibson
Copy link
Member

Super. Thanks @felixxm!

@charettes
Copy link
Member

IMO the real issue here is field_type being a dict. That's unexpected and likely to cause breakages somewhere else. This adjustment only happens to circumvent it.

@cansarigol
Copy link
Contributor Author

Is this test approach make sense? added test for dict column (charfield) and changed City table pk column type.

@carltongibson
Copy link
Member

IMO the real issue here is field_type being a dict.

Yes. Surely that's an error.

@ngnpope
Copy link
Member

ngnpope commented Jan 18, 2019

Superseded by #10871. See my comment on the ticket for an explanation of the problem.

@felixxm felixxm closed this Jan 19, 2019
@cansarigol cansarigol deleted the ticket-30115 branch January 19, 2019 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants