python / python/cpython

Bad advice in DeprecationWarning about sqlite3 datetime adapter

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

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

docs topic-sqlite3
主要言語
Python
スター
77.2k
フォーク
36k
PR マージ指標
PR 指標を取得中

説明

When using the datetime adapter of sqlite3, you'll get:

DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes

The relevant documentation likely is located at https://docs.python.org/3/library/sqlite3.html#default-adapters-and-converters-deprecated

The suggested recipe likely is https://docs.python.org/3/library/sqlite3.html#sqlite3-adapter-converter-recipes

This recipe suggests modifying global state in the sqlite3 module. This is a no-go for libraries as two libraries registering adapters would quickly run into a conflict.

Please offer a recipe suitable for use in libraries or undeprecate the default adapters.

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

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

はじめの一歩

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

調査の方向性

sqlite3 のドキュメントにあるデフォルトのアダプターとコンバーターのセクション、および issue にリンクされているアダプター/コンバーターのレシピから始めます。提案されたレシピのグローバル登録がライブラリコードに適しているかを調べ、そのうえで、ドキュメントにライブラリで安全に使えるレシピが必要か、それとも deprecation を再検討すべきかを判断します。依頼されたガイダンスまたは deprecation の判断が sqlite3 のドキュメントとサポートされる動作に明確に反映されていれば完了です。

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

評価

技術スタック
python
領域
databases, documentation
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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