Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Deprecation warning due to invalid escape sequences in Python 3.8

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
backend

調査の方向性

まず、issue に示されている Python 3.8 コマンドを実行し、次に test/test_samplefile.py と odml/rdf/query_creator.py の報告された式を調べます。影響を受ける文字列リテラルを更新して警告が出力されないようにし、コマンドを再度実行して、報告された invalid-escape 警告がなくなったことを確認します。

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

説明

Deprecation warnings are emitted in Python 3.8 for invalid escape sequences. Escaping them or using raw strings will fix this issue.

find . -iname '*.py'  | xargs -P 4 -I{} python3.8 -Wall -m py_compile {}                               
./test/test_samplefile.py:41: DeprecationWarning: invalid escape sequence \s
  offset = len(re.compile('(\s*)').match(lines[0]).group())
./test/test_samplefile.py:43: DeprecationWarning: invalid escape sequence \w
  '[\w:]+)\])?(\s+linked to (?P<link>[\w/]+))?')
./odml/rdf/query_creator.py:91: DeprecationWarning: invalid escape sequence \(
  doc_pattern = re.compile("(doc|document)\(.*?\)")
./odml/rdf/query_creator.py:96: DeprecationWarning: invalid escape sequence \(
  sec_pattern = re.compile("(sec|section)\(.*?\)")
./odml/rdf/query_creator.py:101: DeprecationWarning: invalid escape sequence \(
  prop_pattern = re.compile("(prop|property)\(.*?\)")
./odml/rdf/query_creator.py:107: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[\(|, ](id|author|date|version|repository|sections)[\)|,]")
./odml/rdf/query_creator.py:112: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[\(|, ](id|name|definition|type|repository|reference|sections|properties)[\)|,]")
./odml/rdf/query_creator.py:117: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[\(|, ](id|name|definition|dtype|unit|uncertainty|reference|value_origin)[\)|,]")
./odml/rdf/query_creator.py:153: DeprecationWarning: invalid escape sequence \(
  doc_pattern = re.compile("(doc|document)\(.*?\)")
./odml/rdf/query_creator.py:158: DeprecationWarning: invalid escape sequence \(
  sec_pattern = re.compile("(sec|section)\(.*?\)")
./odml/rdf/query_creator.py:163: DeprecationWarning: invalid escape sequence \(
  prop_pattern = re.compile("(prop|property)\(.*?\)")
./odml/rdf/query_creator.py:171: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[, |\(](id|author|date|version|repository|sections):(.*?)[,|\)]")
./odml/rdf/query_creator.py:176: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[, |\(](id|name|definition|type|repository|reference|sections|properties):(.*?)[,|\)]")
./odml/rdf/query_creator.py:181: DeprecationWarning: invalid escape sequence \(
  p = re.compile("[, |\(](id|name|definition|dtype|unit|uncertainty|reference|value_origin):(.*?)[,|\)]")
./odml/rdf/query_creator.py:185: DeprecationWarning: invalid escape sequence \[
  p_value = re.compile("value:\[(.*)]")
主要言語
Python
スター
25
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

G-Node/python-odml のほかの issue

G-Node/python-odml の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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