╭────────── FastAPI CLI - Development mode ───────────╮
│ │
│ Serving at: http://127.0.0.1:8000 │
│ │
│ API docs: http://127.0.0.1:8000/docs │
│ │
│ Running in development mode, for production use: │
│ │
│ fastapi run │
│ │
╰─────────────────────────────────────────────────────╯
INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [2248755] using WatchFiles
INFO: Started server process [2248757]
INFO: Waiting for application startup.
INFO: Application startup complete.
Refactors
🔧 Add configs and setup for fastapi-slim including optional extras fastapi-slim[standard], and fastapi including by default the same standard extras. PR #11503 by @tiangolo.
0.110.3
Latest Changes
Docs
📝 Update references to Python version, FastAPI supports all the current versions, no need to make the version explicit. PR #11496 by @tiangolo.
✏️ Fix typo in fastapi/security/api_key.py. PR #11481 by @ch33zer.
[orm] [bug] Added new attribute _orm.ORMExecuteState.is_from_statement to
detect statements created using _sql.Select.from_statement(), and
enhanced FromStatement to set _orm.ORMExecuteState.is_select,
_orm.ORMExecuteState.is_insert,
_orm.ORMExecuteState.is_update, and
_orm.ORMExecuteState.is_delete according to the element that is
sent to the _sql.Select.from_statement() method itself.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where
attributes defined with _orm.composite() on a superclass would cause
an internal exception on load.
[orm] [bug] [regression] Fixed regression from 1.4 where using _orm.defaultload() in
conjunction with a non-propagating loader like _orm.contains_eager()
would nonetheless propagate the _orm.contains_eager() to a lazy load
operation, causing incorrect queries as this option is only intended to
come from an original load.
[orm] [bug] Fixed issue in ORM Annotated Declarative where typing issue where literals
defined using PEP 695 type aliases would not work with inference of
Enum datatypes. Pull request courtesy of Alc-Alc.
[orm] [bug] Fixed issue in _orm.selectin_polymorphic() loader option where the
SELECT emitted would only accommodate for the child-most class among the
result rows that were returned, leading intermediary-class attributes to be
unloaded if there were no concrete instances of that intermediary-class
present in the result. This issue only presented itself for multi-level
inheritance hierarchies.
[orm] [bug] Fixed issue in _orm.Session.bulk_save_objects() where the form of the
identity key produced when using return_defaults=True would be
incorrect. This could lead to an errors during pickling as well as identity
map mismatches.
Fix: a pragma comment on the continuation lines of a multi-line statement
now excludes the statement and its body, the same as if the pragma is
on the first line. This closes issue 754. The fix was contributed by
Daniel Diniz <pull 1773_>.
Fix: very complex source files like this one <resolvent_lookup_>_ could
cause a maximum recursion error when creating an HTML report. This is now
fixed, closing issue 1774_.
HTML report improvements:
Support files (JavaScript and CSS) referenced by the HTML report now have
hashes added to their names to ensure updated files are used instead of
stale cached copies.
Missing branch coverage explanations that said "the condition was never
false" now read "the condition was always true" because it's easier to
understand.
Column sort order is remembered better as you move between the index pages,
fixing issue 1766. Thanks, Daniel Diniz <pull 1768_>.
Added initial support for function and class reporting in the HTML report.
There are now three index pages which link to each other: files, functions,
and classes. Other reports don't yet have this information, but it will be
added in the future where it makes sense. Feedback gladly accepted!
Finishes issue 780_.
Other HTML report improvements:
There is now a "hide covered" checkbox to filter out 100% files, finishing
issue 1384_.
We’ve just uploaded mypy 1.10 to the Python Package Index (PyPI). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:
python3 -m pip install -U mypy
You can read the full documentation for this release on Read the Docs.
Support TypeIs (PEP 742)
Mypy now supports TypeIs (PEP 742), which allows
functions to narrow the type of a value, similar to isinstance(). Unlike TypeGuard,
TypeIs can narrow in both the if and else branches of an if statement:
#12069: A deprecation warning is now raised when implementations of one of the following hooks request a deprecated py.path.local parameter instead of the pathlib.Path parameter which replaced it:
pytest_ignore_collect{.interpreted-text role="hook"} - the path parameter - use collection_path instead.
pytest_collect_file{.interpreted-text role="hook"} - the path parameter - use file_path instead.
pytest_pycollect_makemodule{.interpreted-text role="hook"} - the path parameter - use module_path instead.
pytest_report_header{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
pytest_report_collectionfinish{.interpreted-text role="hook"} - the startdir parameter - use start_path instead.
The replacement parameters are available since pytest 7.0.0.
The old parameters will be removed in pytest 9.0.0.
See legacy-path-hooks-deprecated{.interpreted-text role="ref"} for more details.
Features
#11871: Added support for reading command line arguments from a file using the prefix character @, like e.g.: pytest @tests.txt. The file must have one argument per line.
See Read arguments from file <args-from-file>{.interpreted-text role="ref"} for details.
Improvements
#11523: pytest.importorskip{.interpreted-text role="func"} will now issue a warning if the module could be found, but raised ImportError{.interpreted-text role="class"} instead of ModuleNotFoundError{.interpreted-text role="class"}.
The warning can be suppressed by passing exc_type=ImportError to pytest.importorskip{.interpreted-text role="func"}.
See import-or-skip-import-error{.interpreted-text role="ref"} for details.
#11728: For unittest-based tests, exceptions during class cleanup (as raised by functions registered with TestCase.addClassCleanup <unittest.TestCase.addClassCleanup>{.interpreted-text role="meth"}) are now reported instead of silently failing.
#11777: Text is no longer truncated in the short test summary info section when -vv is given.
#12112: Improved namespace packages detection when consider_namespace_packages{.interpreted-text role="confval"} is enabled, covering more situations (like editable installs).
#9502: Added PYTEST_VERSION{.interpreted-text role="envvar"} environment variable which is defined at the start of the pytest session and undefined afterwards. It contains the value of pytest.__version__, and among other things can be used to easily check if code is running from within a pytest run.
Bug Fixes
#12065: Fixed a regression in pytest 8.0.0 where test classes containing setup_method and tests using @staticmethod or @classmethod would crash with AttributeError: 'NoneType' object has no attribute 'setup_method'.
Now the request.instance <pytest.FixtureRequest.instance>{.interpreted-text role="attr"} attribute of tests using @staticmethod and @classmethod is no longer None, but a fresh instance of the class, like in non-static methods.
[#1071](https://github.com/pytest-dev/pytest-xdist/issues/1071) <https://github.com/pytest-dev/pytest-xdist/issues/1071>_: Add backward compatibility for deadlock issue with the execnet new main_thread_only "execmodel" triggered when pytest-cov accesses rinfo.
pytest-xdist 3.6.0 (2024-04-19)
This release was YANKED due to a regression fixed in 3.6.1.
Features
[#1027](https://github.com/pytest-dev/pytest-xdist/issues/1027) <https://github.com/pytest-dev/pytest-xdist/pull/1027>_:pytest-xdist workers now always execute the tests in the main thread.
Previously some tests might end up executing in a separate thread other than main in the workers, due to some internal execnet`` details. This can cause problems specially with async frameworks where the event loop is running in the ``main`` thread (for example #620pytest-dev/pytest-xdist#620`__).
Bug Fixes
[#1024](https://github.com/pytest-dev/pytest-xdist/issues/1024) <https://github.com/pytest-dev/pytest-xdist/issues/1024>_: Added proper handling of shouldstop (such as set by --max-fail) and shouldfail conditions in workers.
Previously, a worker might have continued executing further tests before the controller could terminate the session.
[#1028](https://github.com/pytest-dev/pytest-xdist/issues/1028) <https://github.com/pytest-dev/pytest-xdist/issues/1028>_: Fixed compatibility issue between looponfail and editable installs.
[#620](https://github.com/pytest-dev/pytest-xdist/issues/620) <https://github.com/pytest-dev/pytest-xdist/issues/620>_: Use the new main_thread_onlyexecnet "execmodel" so that code which expects to only run in the main thread will now work as expected.
[#937](https://github.com/pytest-dev/pytest-xdist/issues/937) <https://github.com/pytest-dev/pytest-xdist/issues/937>_: Fixed a bug where plugin would raise an incompatibility error with --pdb despite using -n0.
Removals
[#1053](https://github.com/pytest-dev/pytest-xdist/issues/1053) <https://github.com/pytest-dev/pytest-xdist/issues/1053>_: Dropped support for Python 3.7.
[#1057](https://github.com/pytest-dev/pytest-xdist/issues/1057) <https://github.com/pytest-dev/pytest-xdist/issues/1057>_: pytest>=7.0.0 is now required.
execnet>=2.1.0 is now required.
Trivial Changes
[#1020](https://github.com/pytest-dev/pytest-xdist/issues/1020) <https://github.com/pytest-dev/pytest-xdist/issues/1020>_: pytest-xdist's setup.py file is removed.
If you relied on this file, e.g. to install pytest using setup.py install,
please see Why you shouldn't invoke setup.py directly <https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary>_ for alternatives.
Bumps the all-dependencies group with 18 updates in the / directory:
4.1.2
4.1.3
0.110.1
0.111.0
2.6.4
2.7.1
2.0.29
2.0.30
7.4.4
7.5.1
1.4.0
1.5.0
1.9.0
1.10.0
8.1.1
8.2.0
3.5.0
3.6.1
0.3.5
0.4.3
3.13.3
3.14.0
2.5.35
2.5.36
3.6
3.7
1.3.2
1.3.3
4.2.0
4.2.1
69.2.0
69.5.1
20.25.1
20.26.1
6.2
6.3
Updates
bcrypt
from 4.1.2 to 4.1.3Commits
35e5a6f
Bump version for 4.1.3 release (#791)d99d1e5
Bump autocfg from 1.2.0 to 1.3.0 in /src/_bcrypt (#790)0775d47
allow testing with pytest 8.2.0 (#786)97d09ac
Bump base64 from 0.22.0 to 0.22.1 in /src/_bcrypt (#787)ee4a9a8
use ubuntu rolling in arm64 CI (#784)7d2474f
Bump libc from 0.2.153 to 0.2.154 in /src/_bcrypt (#783)7a252dd
Try blocking pytest 8.2.0 (#785)297a915
Remove brew install rust from macOS CI (#782)6b3f99e
Bump parking_lot_core from 0.9.9 to 0.9.10 in /src/_bcrypt (#778)c88b310
Bump parking_lot from 0.12.1 to 0.12.2 in /src/_bcrypt (#780)Updates
fastapi
from 0.110.1 to 0.111.0Release notes
Sourced from fastapi's releases.
... (truncated)
Commits
1c3e691
📝 Update release notesab8f557
📝 Update release notes67da3bb
🔖 Release version 0.111.09ed94e4
📝 Update release notesd71be59
✨ Add FastAPI CLI, the newfastapi
command (#11522)a94ef33
📝 Update release notesea1f219
🔧 Add configs and setup forfastapi-slim
including optional extras `fastapi...32be95d
🔖 Release version 0.110.392b67b1
📝 Update release notese0a9692
📝 Update release notesUpdates
pydantic
from 2.6.4 to 2.7.1Release notes
Sourced from pydantic's releases.
... (truncated)
Changelog
Sourced from pydantic's changelog.
... (truncated)
Commits
2612947
2.7.1 release prep (#9307)2b8efa2
Move TODO regarding pickling to markdown (#9288)73d1049
adds test case for unexpected discriminated union behavior (#9236)c33b925
Change CI to usemacos-13
for Python 3.8 and 3.9 (#9305)82e4664
Fix model json schema with config types (#9287)a0f18e3
Fix bullets in Strict Mode docs (#9296)77b0e1c
Address case where model_construct on a class which defines model_post_init f...6322b24
Fixstrict
application tofunction-after
withuse_enum_values
(#9279)bb857bd
docs(performance): remove section on literal vs enum performance (#9262)3c15a8b
docs: makeTypeAdapter
example PEP-8 compliant (#9268)Updates
sqlalchemy
from 2.0.29 to 2.0.30Release notes
Sourced from sqlalchemy's releases.
... (truncated)
Commits
Updates
coverage
from 7.4.4 to 7.5.1Changelog
Sourced from coverage's changelog.
... (truncated)
Commits
be938ea
docs: sample HTML for 7.5.102c66d7
docs: prep for 7.5.15fa9f67
fix: avoid max recursion errors in ast code. #177434af01d
build: easier to run metasmoke on desired python version6b0cac5
perf: cache _human_key to speed html report by about 10%fdc0ee8
docs: oops, typo60e6cb4
docs: changelog for #754 and #1773277c8c4
fix: '# pragma: no branch' in multiline if statements. #754 (#1773)34d3eb7
docs: update changelog for #1786. Thanks, Daniel Diniz2bb5ef2
fix(html): make HTML column sorting consistent across index pages (fix #1766)...Updates
freezegun
from 1.4.0 to 1.5.0Changelog
Sourced from freezegun's changelog.
Commits
17ea422
Admin: Release may not need to update version nr3b33260
Admin: Release 1.5.0 changelog45d9293
Merge pull request #538 from romuald/fix-time-ns-mock6f14dc3
Merge branch 'master' into fix-time-ns-mock5b6c4a2
Merge pull request #543 from spulec/mypyaabe629
MyPydfd5d9e
Merge pull request #542 from kingbuzzman/patch-14ecad0c
Merge pull request #540 from encukou/fix-empty-ignore2436841
Update test_datetimes.py673adf0
Update test_datetimes.pyUpdates
mypy
from 1.9.0 to 1.10.0Changelog
Sourced from mypy's changelog.
... (truncated)
Commits
3faf0fc
Remove +dev for version for release 1.10a5998d2
Update CHANGELOG.md (#17159)62ea5b0
Various updates to changelog for 1.10 (#17158)2f0864c
Update CHANGELOG.md with draft for release 1.10 (#17150)e1443bb
fix: incorrect returned type of access descriptors on unions of types (#16604)5161ac2
Sync typeshed (#17124)e2fc1f2
Fix crash when expanding invalid Unpack in aCallable
alias (#17028)3ff6e47
Docs: docstrings in checker.py, ast_helpers.py (#16908)732d98e
Fix string formatting for string enums (#16555)8019010
Narrow individual items when matching a tuple to a sequence pattern (#16905)Updates
pytest
from 8.1.1 to 8.2.0Release notes
Sourced from pytest's releases.
... (truncated)
Commits
6bd3f31
Tweak changelog for 8.2.09b6219b
Prepare release version 8.2.0835765c
Merge pull request #12130 from bluetech/fixtures-inline7e7503c
unittest: report class cleanup exceptions (#12250)882c4da
fixtures: inlinefail_fixturefunc
2e8fb9f
fixtures: extract a_check_fixturedef
methodacf2971
fixtures: inline_getnextfixturedef
into_get_active_fixturedef
3c77aec
fixtures: move "request" check earlyd217d68
fixtures: inline_compute_fixture_value
530be28
fixtures: use early return in_get_active_fixturedef
Updates
pytest-xdist
from 3.5.0 to 3.6.1Changelog
Sourced from pytest-xdist's changelog.
... (truncated)
Commits
4dd2978
Release 3.6.1b397288
Merge pull request #1072 from zmedico/gateway-cache-rinfo12b3cce
Cache execnet gateway rinfo during WorkerController setupc93a106
build(deps): bump hynek/build-and-inspect-python-package (#1066)52e2022
[pre-commit.ci] pre-commit autoupdate (#1073)699f939
Merge pull request #1070 from pytest-dev/release-3.6.080bc0b8
Release 3.6.020e3ac7
Use execnet main_thread_only execmodel (#1027)0a4238f
Merge pull request #1067 from pytest-dev/pre-commit-ci-update-config0686279
[pre-commit.ci] pre-commit autoupdateUpdates
ruff
from 0.3.5 to 0.4.3Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
1e91a09
Bump version to v0.4.3 (#11274)d0f51c6
Remove remainingruff_shrinking
references (#11272)8dd3811
Use function range forreimplemented-operator
diagnostics (#11271)894cd13
[refurb
] Ignore methods inreimplemented-operator
(FURB118
) (#11270)f3284fd
Remove unnecessary check for RUF020 enabled (#11268)82dd5e6
[red-knot] resolve class members (#11256)6a1e555
Upgrade to Rust 1.78 (#11260)349a4cf
Remove trailing reference section (#11257)dfbeca5
ruff server
no longer hangs after shutdown (#11222)9e69cd6
Rephrase rationale forpytest-incorrect-pytest-import
(#11255)Updates
filelock
from 3.13.3 to 3.14.0Release notes
@dependabot rebase