Skip to content

Allow Starlette 0.45 and 0.46 #977

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

Merged
merged 2 commits into from
Mar 22, 2025

Conversation

musicinmybrain
Copy link
Contributor

Starlette 0.45 drops Python 3.8 support, removes ExceptionMiddleware from starlette.exceptions, and removes WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE: https://github.com/encode/starlette/releases/tag/0.45.0

Starlette 0.46 renames max_file_size to spool_max_size in MultiPartParser: https://github.com/encode/starlette/releases/tag/0.46.0

None of that should affect openapi-core.


Even with this PR, Starlette would still be stuck at 0.44.0 in poetry.lock until openapi-core drops support for Python 3.8.

I didn’t try to drop Python 3.8 support in this PR, but just to check, I tried a local experiment:

diff --git a/pyproject.toml b/pyproject.toml
index 8132fd5..16369f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,7 +47,6 @@ classifiers = [
     "Topic :: Software Development :: Libraries :: Python Modules",
     "Operating System :: OS Independent",
     "Programming Language :: Python :: 3",
-    "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
@@ -60,7 +59,7 @@ include = [
 ]
 
 [tool.poetry.dependencies]
-python = "^3.8.0"
+python = "^3.9.0"
 django = {version = ">=3.0", optional = true}
 falcon = {version = ">=3.0", optional = true}
 flask = {version = "*", optional = true}

I then ran poetry update starlette and confirmed that the tests do still pass with Starlette 0.46.1.

Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.62%. Comparing base (ca6044e) to head (c9ba8eb).
Report is 16 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #977   +/-   ##
=======================================
  Coverage   90.62%   90.62%           
=======================================
  Files         150      150           
  Lines        4374     4374           
  Branches      532      532           
=======================================
  Hits         3964     3964           
  Misses        318      318           
  Partials       92       92           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@p1c2u p1c2u merged commit 60a2aad into python-openapi:master Mar 22, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants