python-falcon in Ubuntu 22.04 repos is too new for python-hug

Bug #2002297 reported by Mikk Margus Möll
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-falcon (Ubuntu)
New
Undecided
Unassigned

Bug Description

[Ubuntu version info]
Description: Ubuntu 22.04.1 LTS
Release: 22.04
[Package version(s)]
python3-falcon:
  Installed: 3.0.1-3build1
python3-hug:
  Installed: 2.6.0-2build5
[expected]
python3-hug works properly
[reality]
python3-hug fails when using functionality in (at least) hug.middleware, e.g hug.middleware.CORSMiddleware, due to falcon.middleware.CORSMiddleware being accessed instead, which has a different function signature

The upstream developers of hug have pinned their falcon dependency to 2.0.0, as can be seen here:
https://github.com/hugapi/hug/blob/8b5ac00632543addfdcecc326d0475a685a0cba7/setup.py#L99
However, Ubuntu 22.04 (as of the time of writing) ships with falcon 3.0.1. This has, at the very least, broken anything relying on the hug.middleware module, due to the following (marginally simplified) code in hug/__init__.py:

```
from falcon import *
from hug import middleware
```

Due to falcon having added a middleware module after 2.0.0, it is imported with the first import statement and the second import re-imports that same module, and hug.middleware == falcon.middleware, leaving the hug/middleware.py file unimported.
I would not consider this a bug in hug, as they have explicitly pinned their falcon dependency to a version which works, while the Ubuntu package uses a different version.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.