falconry / falcon

The no-magic web API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io
Apache License 2.0
9.54k stars 947 forks source link

4.0.2 tests fail with websockets and uvicorn: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers' #2415

Closed Thermi closed 1 day ago

Thermi commented 1 day ago

Errors are logged starting here (all with this unexpected keyword error):

https://gitlab.alpinelinux.org/Thermi/aports/-/jobs/1634733#L5023

vytas7 commented 1 day ago

Hi @Thermi! And thanks for reporting! This incompatibility has already been addressed in #2406, but the fix is not part of any stable release of Falcon yet.

This issue only started happening with a new version of websockets, 14.0, that went out after Falcon 4.0.2. Issues like this are basically impossible to avoid since we are trying not to pin anything unless necessary, and we can never know what future releases of 3rd party projects might bring. And even if we were pinning the test dependencies, that probably would be just counter-productive when it comes to Alpine Linux packages.

Until the next release of Falcon, there are two short-term alternatives for you to tackle this:

  1. Cherry pick https://github.com/falconry/falcon/commit/cf51816a2f7cd7a23d3e1129fe9418a5fc85d8be from our master branch as a patch in Alpine Linux.
  2. (Temporarily) drop the websockets test dependency. As of Falcon 4.0, the only hard test dependency is pytest, everything else is optional (see also here: Optional test dependencies).

I would also like to thank you for maintaining the py3-falcon package for Alpine users, much appreciated!

vytas7 commented 1 day ago

(Duplicates #2406.)