Warning: “Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater” when importing cloudflare

オープン
#2,675 コメント 4 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
api

調査の方向性

まず、issueに記載されているPython 3.14のコマンドで警告を再現し、次にpydantic.v1.typingからのimport周辺にあるcloudflare/_compat.pyを調べます。パッケージのPydantic v2モデルがこの互換性モジュールをどのように使用しているかを確認します。Python 3.14でcloudflareをimportしても報告されたUserWarningが出力されず、サポート対象の動作が維持されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Confirm this is a Python library issue and not an underlying Cloudflare API issue.
  • 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

OS

Linux

Python version

3.14

Library version

4.3.1

主要言語
Python
スター
509
フォーク
150
平均マージ
3時間 15分
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudflare/cloudflare-python のほかの issue

cloudflare/cloudflare-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。