Skip to content

gh-69093: Expose sqlite3.Blob as a class - #91550

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:exposeblob
Apr 15, 2022
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:exposeblob

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented Apr 15, 2022 •

Copy link
Copy Markdown
Member

I noticed this was missing while writing typeshed stubs. It's
useful to expose it for use in annotations.

GH-69093

I noticed this was missing while writing typeshed stubs. It's
useful to expose it for use in annotations.
@JelleZijlstra

Copy link
Copy Markdown
Member Author

Skipping news because this is a simple followup for #30680, which was merged just now.

JelleZijlstra added a commit to JelleZijlstra/typeshed that referenced this pull request Apr 15, 2022
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged)
- Aggregate window functions from python/cpython#20903
- Serialize/deserialize from python/cpython#26728
- Limit setting from python/cpython#28463
@erlend-aasland

erlend-aasland commented Apr 15, 2022 •

Copy link
Copy Markdown
Contributor

I don't use typing, but I guess this is ok.

BTW, we need to disallow instantiation for blob types. I should've thought about that in the first place, but with this change it's even more important. We can embed that change here, or do it in another PR; I'm fine with both.

@JelleZijlstra
JelleZijlstra merged commit b7f83bd into python:main Apr 15, 2022
@JelleZijlstra
JelleZijlstra deleted the exposeblob branch April 15, 2022 13:30
@JelleZijlstra

Copy link
Copy Markdown
Member Author

Thanks! Also I don't think it's useful only for annotations: we also mention this class in the docs as if it is accessible, and it's useful for interactive exploration if you can do dir(sqlite3.Blob).

@erlend-aasland

Copy link
Copy Markdown
Contributor

Thanks! Also I don't think it's useful only for annotations: we also mention this class in the docs as if it is accessible, and it's useful for interactive exploration if you can do dir(sqlite3.Blob).

Good point!

srittau pushed a commit to python/typeshed that referenced this pull request Apr 16, 2022
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged)
- Aggregate window functions from python/cpython#20903
- Serialize/deserialize from python/cpython#26728
- Limit setting from python/cpython#28463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants