odoo/enterprise#104202
Created by moylop260
Blocked
- Merge method
- Review
-
CI
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: (runtime 1028s)
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 12s)
- ci/design-theme
- label
- vauxoo-dev:19.0-fix-jsondecode-error-moy
- head
- 97516aa039df41876fa4048e7279673d6a50943a
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| 19.0 | #243607 | #104202 missing statuses missing r+ |
| saas-19.1 | ||
| saas-19.2 | ||
| saas-19.3 | ||
| master |
[FIX] *: Fix json decode error imports
Description of the issue/feature this PR addresses:
Installing requests==2.25.1 and using the following line of code:
from requests.exceptions import JSONDecodeError
Script to reproduce it
python3.10 -m pip install -q virtualenv
python3.10 -m virtualenv /tmp/requests_test
source /tmp/requests_test/bin/activate
pip install -q requests==2.25.1
python -c "from json import JSONDecodeError"
python -c "from requests.exceptions import JSONDecodeError"
# ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions' (/tmp/requests_test/lib/python3.10/site-packages/requests/exceptions.py)
<img width="1503" height="738" alt="Screenshot 2026-01-13 at 11 05 36 a m" src="https://github.com/user-attachments/assets/c81d04c3-111c-4fb4-9b7e-f09059b54d3a" />
Current behavior before PR:
It raises the following error:
ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions' (python3.10/site-packages/requests/exceptions.py)
It was removed from the following commit in the requests package:
https://github.com/psf/requests/commit/db575eeedcfdb03bf31285afd3033e301df8b685
Desired behavior after PR is merged:
This change fixes this error importing the original exception from json package
Also, fixing similar alias imports
Odoo Community PR Related:
- odoo/odoo#243607