Results of 1 - 10 of about 42 for warnings (0.008 sec.)
- warnings --- 警告の制御 15932
- warnings --- 警告の制御 ソースコード: Lib/warnings.py 警告メッセージは一般に、ユーザに警告しておいた方がよいような状況下にプログラムが置かれているが、その状況は (通常は) 例外を送出したりそのプログラムを終了させるほどの正当な理由がないといっ
...うかの決定は、 警告フィルタ によって制御されます。警告フィルタは一致規則 (matching rule)と動作からなるシーケンスです。 filterwarnings() を呼び出して一致規則をフィルタに追加することができ、 resetwarnings() を呼び出してフィルタを標準設定の状態にリセットするこ...rning() を呼び出して警告メッセージを書式化しますが、この関数についても自作の実装を使うことができます。 参考 logging.captureWarnings() を使うことで、標準ロギング基盤ですべての警告を扱うことができます。 警告カテゴリ 警告カテゴリを表現する組み込み例外は数多...ring containing a regular expression that the start of the warning message must match, case-insensitively. In -W and PYTHONWARNINGS , message is a literal string that the start of the warning message must contain (case-insensitively), ignoring any whites... - https://man.mtool.work/python/3.14/library/warnings.html
- test --- Python の回帰テストパッケージ 12681
- test --- Python の回帰テストパッケージ 注釈 test パッケージは Python 内部での使用のみを目的としています。 このドキュメントは Python のコア開発者向けに用意されています。 ここで説明するコードは Python のリリース間で予告なく変更または削除される
...この関数は ImportError を送出します。 使用例: # テストスイートの他の部分が使うモジュールに影響を与えずにテストできるよう、 # warnings モジュールのコピーを取得する。 # 一方は C の実装を使い、もう一方はフォールバック用の純 Python 実装を # 強制的に使う py_war...nings = import_fresh_module ( 'warnings' , blocked = [ '_warnings' ]) c_warnings = import_fresh_module ( 'warnings' , fresh = [ '_warnings' ]) Added in version 3....path への すべての 変更は、オブジェクトの置き換えも含めて、ブロックの終了時に元に戻ることに注意してください。 test.support.warnings_helper --- 警告のテスト用ユーティリティ test.support.warnings_helper モジュールは警告のテストを支援する機能を提供します。... - https://man.mtool.work/python/3.14/library/test.html
- Python 3.15 で削除予定 8206
- Python 3.15 で削除予定 The PyImport_ImportModuleNoBlock() : Use PyImport_ImportModule() instead. PyWeakref_GetObject() and PyWeakref_GET_OBJECT() : Use PyWeakref_GetRef() instead. The pythoncapi-compat project can be used to get PyWeakref_G
...さい。 Py_SetPythonHome() :代わりに PyConfig.home を設定してください。 PySys_ResetWarnOptions() : Clear sys.warnoptions and warnings.filters instead. 代わりに PyConfig と Py_InitializeFromConfig() API を使ってください。 グローバルな設定変数: Py_DebugFlag...PyConfig.bytes_warning または PyConfig_Get("bytes_warning") を使ってください。 Py_FrozenFlag :代わりに PyConfig.pathconfig_warnings または PyConfig_Get("pathconfig_warnings") を使ってください。 Py_IgnoreEnvironmentFlag :代わりに PyConfig.use_environment... - https://man.mtool.work/python/3.14/deprecations/c-api-pending-removal-in-3.15.ht...
- 1. コマンドラインと環境 8206
- 1. コマンドラインと環境 CPython インタプリタはコマンドラインと環境を読み取って様々な設定を行ないます。 ほかの実装では、コマンドラインの形式が異なる場合があります。 関連情報は 別のPythonの実装 を参照してください。 1.1. コマンドライン Python
...ョンは無視されます (ただし、最初の警告が出される際に、不正なオプションについての警告メッセージが表示されます)。 警告は PYTHONWARNINGS 環境変数や、Python プログラム内から warnings モジュールを使って制御することもできます。 例えば、 warnings.filterwarnings()...ドでは 1 、それ以外では 0 です。 PYTHON_THREAD_INHERIT_CONTEXT も参照してください。 Added in version 3.14. -X context_aware_warnings= 0,1 を 1 に設定すると、 warnings.catch_warnings コンテキストマネージャは、警告フィルタの状態の保存に ContextVar を使います...。 未設定の場合、このオプションのデフォルト値は、フリースレッドビルドでは 1 、それ以外では 0 です。 PYTHON_CONTEXT_AWARE_WARNINGS も参照してください。 Added in version 3.14. -X tlbc= 0,1 は、 --disable-gil を指定して構成したビルドで、スレッドローカルな... - https://man.mtool.work/python/3.14/using/cmdline.html
- Python のフリースレッド対応 8144
- Python のフリースレッド対応 CPython 3.13 から、 global interpreter lock (GIL) を無効にした free threading という Python のビルドがサポートされています。 フリースレッド実行では、利用可能な CPU コアでスレッドを並列に動かし、処理能力を十分に活
...フラグはデフォルトで偽なので、スレッドは空の Context() で開始します。 警告フィルタ フリースレッドビルドでは、 context_aware_warnings フラグはデフォルトで真です。 デフォルトの GIL が有効なビルドでは、偽になっています。 真の場合、 warnings.catch_warnings コ...ンテキストマネージャは、警告フィルタにコンテキスト変数を使います。 偽の場合、 catch_warnings はグローバルなフィルタのリストを変更するため、スレッドセーフではありません。 詳しくは warnings モジュールを参照してください... - https://man.mtool.work/python/3.14/howto/free-threading-python.html
- Python 初期化設定 8005
- Python 初期化設定 PyInitConfig C API Added in version 3.14. Python は Py_InitializeFromInitConfig() で初期化できます。 Py_RunMain() 関数は、カスタマイズされた Python プログラムを書くために使用できます。 Initialization, Finalization, and Thr
...ig_argv list[str] 読み出し専用 "parse_argv" parse_argv bool 読み出し専用 "parser_debug" parser_debug bool 公開 "pathconfig_warnings" pathconfig_warnings bool 読み出し専用 "perf_profiling" perf_profiling bool 読み出し専用 "platlibdir" platlibdir str 公開...定されます。 Python のデバッグビルド が必要です ( Py_DEBUG マクロを定義する必要があります)。 デフォルト: 0 。 int pathconfig_warnings ゼロ以外の場合、パス設定の計算中に stderr に警告を出せます。 0 の場合は、これらの警告を抑制します。 デフォルト: Python モー...インオプションで値が増加します。 PYTHONVERBOSE 環境変数の値から設定されます。 デフォルト: 0 。 PyWideStringList warnoptions warnings モジュールが警告フィルターを作成するためのオプションで、優先度の低いものから高いものの順に並びます。 sys.warnoptions に対応... - https://man.mtool.work/python/3.14/c-api/init_config.html
- Pythonモジュール索引 7803
- Pythonモジュール索引 _ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z _ __future__ Future statement definitions __main__ The environment where top-level code is run. Covers command-line i
...st.support.socket_helper Support for socket tests. test.support.threading_helper Support for threading tests. test.support.warnings_helper Support for warnings tests. textwrap Text wrapping and filling threading Thread-based parallelism. time Time access...3.13. uuid UUID objects (universally unique identifiers) according to RFC 9562 v venv Creation of virtual environments. w warnings Issue warning messages and control their disposition. wave Provide an interface to the WAV sound format. weakref Support f... - https://man.mtool.work/python/3.14/py-modindex.html
- What's New in Python 2.6 7726
- What's New in Python 2.6 著者 : A.M. Kuchling (amk at amk.ca) この記事では、2008 年 10 月 1 日にリリースされた Python 2.6 の新機能を説明します。 リリース日程は PEP 361 に記載されています。 Python 2.6 の主要なテーマは、言語を大幅に再設計する
...や自由変数を返しません。(この場合、自由変数は class ステートメント内で参照される変数で、クラスの属性ではありません。) 最適化 warnings モジュールが C で書き直されました。これにより警告をパーサから発行出来、また、インタプリタの起動が高速化しています。 (Contr.... TransientResource ( IOError , errno = errno . ETIMEDOUT ): f = urllib . urlopen ( 'https://sf.net' ) ... 最後に、 check_warnings() は warnings の警告フィルターをリセットし、発生したすべての警告メッセージを記録するオブジェクトを返します ( bpo-3781 )。...with test_support . check_warnings () as wrec : warnings . simplefilter ( "always" ) # ... 警告を発生させるコード ... assert str ( wrec . message ) == "funct... - https://man.mtool.work/python/3.14/whatsnew/2.6.html
- What's new in Python 3.14 7726
- What's new in Python 3.14 エディタ : Adam Turner と Hugo van Kemenade この記事では Python 3.13 と比較した Python 3.14 の新機能を解説します。Python 3.14 は2025年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP
...中のインタープリタについて、コンパイル時に使われた設定は sysconfig.get_config_var() で調べられます。 新しい -X context_aware_warnings フラグは、 並行処理で安全に使える警告の制御 を有効にするかどうかを制御します。 デフォルト値は、フリースレッドビルドでは真、...the Context() of the caller of start() . Most significantly, this makes the warning filtering context established by catch_warnings be "inherited" by threads (or asyncio tasks) started within that context. It also affects other modules that use context v...o Galindo、Łukasz Langa、Yury Selivanov、Marta Gomez Macias が gh-91048 で貢献しました。) 並行処理で安全に使える警告の制御 warnings.catch_warnings コンテキストマネージャは、警告フィルタにコンテキスト変数を使うよう選択できるようになりました。 -X コマンドラ... - https://man.mtool.work/python/3.14/whatsnew/3.14.html
- What's New in Python 2.1 7664
- What's New in Python 2.1 著者 : A.M. Kuchling はじめに この記事はPython 2.1の新機能について説明します。Python 2.1には Python 2.0ほど多くの変更点はありませんが、楽しい驚きがあります。2.1はPythonの拡張計画(PEP)を使い動かす最初のリリースであ
...はこのスキームで使われる警告フレームワークを追加します。また、警告の表示機能や表示させたくない警告を除外する機能を提供する、 warnings モジュールを追加します。サードパーティーのモジュールはまた、彼らがサポート対象外にしたい古い機能を非推奨と知らしめるのにこ...ます。 >>> import regex __main__:1: DeprecationWarning: the regex module is deprecated; please use the re module >>> 警告は warnings.warn() 関数を呼び出すことで発行できます: warnings . warn ( "feature X no longer supported" ) 最初のパラメータは警告メッセー...ムがあり、今すぐ re モジュールに置き換えるための時間を取りたくないかもしれません。 次の呼び出しで警告を抑制できます。 import warnings warnings . filterwarnings ( action = 'ignore' , message = '.*regex module is deprecated' , category = DeprecationWarning ,... - https://man.mtool.work/python/3.14/whatsnew/2.1.html