bpo-42064: Move sqlite3 types to global state#26537
Conversation
|
Internal change only; skipping news. |
|
Hmm, I'm not too familiar with the plan for the sqlite module. The calls to It seems that so far, the only module that uses dynamic types with Argument Clinic's |
Well... my plan is multi-phase init (which implies module state). Heap type conversion is done, and Argument Clinic is mostly in place; establishing a global state is a natural next step.
Correct. I could add a comment about that above EDIT: now I remember: grepping for
You're talking about a new API to optimise this, right? EDIT: Yes, I see the twin |
|
OK, then this PR looks like a good step!
Yes. I noted it and will try to make some time for it. |
Yes, I believe it is. I think it's best to keep the "establish global state" PR's as simple as possible, for the reviewers convenience. Optimisations, for example passing state as a parameter to a function, or storing state members in the object context (as
Fantastic. I'd be interested in following that process, for the sake of learning. |
|
LGTY, @encukou? |
|
Looks good; thanks for the clarification! |
|
Thanks for reviewing, @encukou ! |
* Move connection type to global state * Move cursor type to global state * Move prepare protocol type to global state * Move row type to global state * Move statement type to global state * ADD_TYPE takes a pointer * pysqlite_get_state is now static inline
I don't yet have time to get into this, but I put down some notes: encukou/abi3#19 |
https://bugs.python.org/issue42064