cloudflare / cloudflare/cloudflare-python
Warning: “Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater” when importing cloudflare
- Vorherrschende Sprache
- Python
- Sterne
- 506
- Forks
- 148
- Ø Merge
- 3 Std. 15 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
### Confirm this is a Python library issue and not an underlying Cloudflare API issue.
- [x] This is an issue with the Python library
### Describe the bug
When importing the cloudflare package under Python 3.14, a UserWarning appears from the _compat.py module:
```
/.../.venv/lib/python3.14/site-packages/cloudflare/_compat.py:48: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
from pydantic.v1.typing import (
```
The library uses Pydantic v2 for its models, but still imports from the pydantic.v1 namespace for compatibility. This warning originates from Pydantic itself, which now emits it on Python ≥ 3.14.
### To Reproduce
```
python3.14 -m venv .venv
source .venv/bin/activate
pip install cloudflare
python -c "import cloudflare; print(cloudflare.__version__)"
```
### Code snippets
```Python
```
### OS
Linux
### Python version
3.14
### Library version
4.3.1
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Warnung mit dem Python 3.14-Befehl aus dem Issue zu reproduzieren, und untersuche anschließend cloudflare/_compat.py im Bereich des Imports aus pydantic.v1.typing. Prüfe, wie die Pydantic v2-Modelle des Pakets dieses Kompatibilitätsmodul verwenden. Die Aufgabe ist abgeschlossen, wenn der Import von cloudflare unter Python 3.14 die gemeldete UserWarning nicht mehr ausgibt und das unterstützte Verhalten weiterhin intakt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100