GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-docs-ja/c-api/stable.po at 3.14 · python/python-docs-ja Expand file tree/ Copy pathstable.poMore file actions 769 lines (672 loc) · 35.6 KB / Copy pathstable.poFile metadata and controls769 lines (672 loc) · 35.6 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # # Translators: # python-doc bot, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-10-03 17:41+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "C API and ABI Stability" msgstr "C API と ABI の安定性" msgid "" "Unless documented otherwise, Python's C API is covered by the Backwards " "Compatibility Policy, :pep:`387`. Most changes to it are source-compatible " "(typically by only adding new API). Changing existing API or removing API is " "only done after a deprecation period or to fix serious issues." msgstr "" "特記のない限り、Python の C API には後方互換性ポリシー :pep:`387` が適用され" "ます。\n" "変更の大半はソース互換性を保ちます (通常は新しい API の追加だけを行いま" "す)。\n" "既存 API の変更や削除は、非推奨の期間を経た後、または重大な問題を修正するため" "にのみ行います。" msgid "" "CPython's Application Binary Interface (ABI) is forward- and backwards-" "compatible across a minor release (if these are compiled the same way; " "see :ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 " "will work on 3.10.8 and vice versa, but will need to be compiled separately " "for 3.9.x and 3.11.x." msgstr "" "CPython のアプリケーションバイナリインターフェース (ABI) は、同じマイナーリ" "リース内で前方互換性と後方互換性を持ちます (同じ方法でコンパイルされている場" "合。下記の :ref:`stable-abi-platform` を参照)。\n" "したがって、Python 3.10.0 向けにコンパイルしたコードは 3.10.8 で動作し、その" "逆も同様ですが、3.9.x や 3.11.x 向けには別にコンパイルする必要があります。" msgid "There are two tiers of C API with different stability expectations:" msgstr "C API には、期待される安定性が異なる二つの階層があります。" msgid "" ":ref:`Unstable API <unstable-c-api>`, may change in minor versions without a " "deprecation period. It is marked by the ``PyUnstable`` prefix in names." msgstr "" ":ref:`不安定な API <unstable-c-api>` は、非推奨の期間なしにマイナーバージョン" "間で変更される可能性があります。\n" "名前の接頭辞 ``PyUnstable`` で識別できます。" msgid "" ":ref:`Limited API <limited-c-api>`, is compatible across several minor " "releases. When :c:macro:`Py_LIMITED_API` is defined, only this subset is " "exposed from ``Python.h``." msgstr "" ":ref:`Limited API <limited-c-api>` は、複数のマイナーリリースにわたって互換性" "を持ちます。\n" ":c:macro:`Py_LIMITED_API` を定義すると、``Python.h`` から公開されるのはこの部" "分集合だけになります。" msgid "These are discussed in more detail below." msgstr "以下でそれぞれを詳しく説明します。" msgid "" "Names prefixed by an underscore, such as ``_Py_InternalState``, are private " "API that can change without notice even in patch releases. If you need to " "use this API, consider reaching out to `CPython developers <https://" "discuss.python.org/c/core-dev/c-api/30>`_ to discuss adding public API for " "your use case." msgstr "" "``_Py_InternalState`` のようにアンダースコアで始まる名前はプライベート API " "で、パッチリリースでも予告なく変更される可能性があります。\n" "この API を使う必要がある場合は、`CPython 開発者 <https://discuss.python.org/" "c/core-dev/c-api/30>`_ に連絡し、用途に合う公開 API の追加を相談することを検" "討してください。" msgid "Unstable C API" msgstr "不安定な C API" msgid "" "Any API named with the ``PyUnstable`` prefix exposes CPython implementation " "details, and may change in every minor release (e.g. from 3.9 to 3.10) " "without any deprecation warnings. However, it will not change in a bugfix " "release (e.g. from 3.10.0 to 3.10.1)." msgstr "" "接頭辞 ``PyUnstable`` を持つ API は CPython の実装の詳細を公開しており、マイ" "ナーリリースごとに (例えば 3.9 から 3.10 で) 非推奨の警告なしに変更される可能" "性があります。\n" "ただし、バグ修正リリース (例えば 3.10.0 から 3.10.1) では変更されません。" msgid "" "It is generally intended for specialized, low-level tools like debuggers." msgstr "通常はデバッガのような、低レベルの専門的なツールを対象としています。" msgid "" "Projects that use this API are expected to follow CPython development and " "spend extra effort adjusting to changes." msgstr "" "この API を使うプロジェクトには、CPython の開発を追い、変更への対応に追加の労" "力をかけることが期待されます。" msgid "Stable Application Binary Interfaces" msgstr "安定したアプリケーションバイナリインターフェース" msgid "" "Python's :dfn:`Stable ABI` allows extensions to be compatible with multiple " "versions of Python, without recompilation." msgstr "" "Python の :dfn:`Stable ABI` を使うと、再コンパイルせずに複数バージョンの " "Python と互換性を持つ拡張を作成できます。" msgid "" "For simplicity, this document talks about *extensions*, but Stable ABI works " "the same way for all uses of the API – for example, embedding Python." msgstr "" "説明を簡単にするため、この文書では *拡張* について述べますが、Python の組み込" "みなど、API のあらゆる用途で Stable ABI は同じように機能します。" msgid "There are two Stable ABIs:" msgstr "Stable ABI は二つあります。" msgid "" "``abi3``, introduced in Python 3.2, is compatible with **non**-:term:`free-" "threaded <free-threaded build>` builds of CPython." msgstr "" "Python 3.2 で導入された ``abi3`` は、CPython の :term:`フリースレッドビルド " "<free-threaded build>` **ではない** ビルドと互換性を持ちます。" msgid "" "``abi3t``, introduced in Python 3.15, is compatible with :term:`free-" "threaded <free-threaded build>` builds of CPython. It has stricter API " "limitations than ``abi3``." msgstr "" "Python 3.15 で導入された ``abi3t`` は、CPython の :term:`フリースレッドビル" "ド <free-threaded build>` と互換性を持ちます。\n" "``abi3`` より API の制約が厳しくなっています。" msgid "``abi3t`` was added in :pep:`803`" msgstr "``abi3t`` は :pep:`803` で追加されました。" msgid "" "It is possible for an extension to be compiled for *both* ``abi3`` and " "``abi3t`` at the same time; the result will be compatible with both free-" "threaded and non-free-threaded builds of Python. Currently, this has no " "downsides compared to compiling for ``abi3t`` only." msgstr "" "拡張を ``abi3`` と ``abi3t`` の *両方* 向けに同時にコンパイルすることもできま" "す。\n" "その結果は、フリースレッドビルドとそうでないビルドの両方で使えます。\n" "現在のところ、``abi3t`` だけを対象にコンパイルする場合と比べて不利な点はあり" "ません。" msgid "" "Each Stable ABI is versioned using the first two numbers of the Python " "version. For example, Stable ABI 3.14 corresponds to Python 3.14. An " "extension compiled for Stable ABI 3.x is ABI-compatible with Python 3.x and " "above." msgstr "" "各 Stable ABI のバージョンには、Python のバージョンの最初の二つの数値を使いま" "す。\n" "例えば Stable ABI 3.14 は Python 3.14 に対応します。\n" "Stable ABI 3.x 向けにコンパイルした拡張は、Python 3.x 以降と ABI 互換性を持ち" "ます。" msgid "" "Extensions that target a stable ABI must only use a limited subset of the C " "API. This subset is known as the :dfn:`Limited API`; its contents " "are :ref:`listed below <limited-api-list>`." msgstr "" "Stable ABI を対象にする拡張は、C API の限定された部分集合だけを使わなければな" "りません。\n" "この部分集合を :dfn:`Limited API` と呼びます。\n" "内容は :ref:`後述の一覧 <limited-api-list>` を参照してください。" msgid "" "On Windows, extensions that use a Stable ABI should be linked against " "``python3.dll`` rather than a version-specific library such as " "``python39.dll``. This library only exposes the relevant symbols." msgstr "" "Windows では、Stable ABI を使う拡張は ``python39.dll`` のようなバージョン固有" "のライブラリではなく、``python3.dll`` とリンクしてください。\n" "このライブラリは、該当するシンボルだけを公開します。" msgid "" "On some platforms, Python will look for and load shared library files named " "with the ``abi3`` or ``abi3t`` tag (for example, " "``mymodule.abi3.so``). :term:`Free-threaded <free-threaded build>` " "interpreters only recognize the ``abi3t`` tag, while non-free-threaded ones " "will prefer ``abi3`` but fall back to ``abi3t``. Thus, extensions compatible " "with both ABIs should use the ``abi3t`` tag." msgstr "" "一部のプラットフォームでは、Python は名前に ``abi3`` または ``abi3t`` タグを" "持つ共有ライブラリファイル (例えば ``mymodule.abi3.so``) を探して読み込みま" "す。\n" ":term:`フリースレッド <free-threaded build>` のインタープリタは ``abi3t`` タ" "グだけを認識し、それ以外のインタープリタは ``abi3`` を優先しますが、なければ " "``abi3t`` を使います。\n" "したがって、両方の ABI と互換性のある拡張には ``abi3t`` タグを使ってくださ" "い。" msgid "" "Python does not necessarily check that extensions it loads have compatible " "ABI. Extension authors are encouraged to add a check using " "the :c:macro:`Py_mod_abi` slot or the :c:func:`PyABIInfo_Check` function, " "but the user (or their packaging tool) is ultimately responsible for " "ensuring that, for example, extensions built for Stable ABI 3.10 are not " "installed for lower versions of Python." msgstr "" "Python は、読み込む拡張の ABI に互換性があるかどうかを必ずしも確認しませ" "ん。\n" "拡張の作者には :c:macro:`Py_mod_abi` スロットまた" "は :c:func:`PyABIInfo_Check` 関数による確認を追加することが推奨されます。\n" "ただし、例えば Stable ABI 3.10 向けの拡張をそれより古い Python にインストール" "しないようにする最終的な責任は、利用者 (またはパッケージ管理ツール) にありま" "す。" msgid "" "All functions in Stable ABI are present as functions in Python's shared " "library, not solely as macros. This makes them usable in languages that " "don't use the C preprocessor, including Python's :py:mod:`ctypes`." msgstr "" "Stable ABI のすべての関数は、マクロだけでなく Python の共有ライブラリ内の関数" "としても存在します。\n" "このため、Python の :py:mod:`ctypes` を含め、C プリプロセッサを使わない言語か" "らも利用できます。" msgid "Compiling for Stable ABI" msgstr "Stable ABI 向けのコンパイル" msgid "" "Build tools (such as, for example, meson-python, scikit-build-core, or " "Setuptools) often have a mechanism for setting macros and synchronizing them " "with extension filenames and other metadata. Prefer using such a mechanism, " "if it exists, over defining the macros manually." msgstr "" "meson-python、scikit-build-core、Setuptools などのビルドツールには、マクロを" "設定し、拡張のファイル名やほかのメタデータと同期させる仕組みがあることが多い" "です。\n" "その仕組みがある場合は、手動でマクロを定義するよりもそちらを使ってください。" msgid "" "The rest of this section is mainly relevant for tool authors, and for people " "who compile extensions manually." msgstr "" "この節の残りは、主にツールの作者と手動で拡張をコンパイルする人に関係します。" msgid "`list of recommended tools`_ in the Python Packaging User Guide" msgstr "" "Python Packaging User Guide の `推奨ツールの一覧 <list of recommended " "tools_>`_" msgid "" "To compile for a Stable ABI, define one or both of the following macros to " "the lowest Python version your extension should support, " "in :c:macro:`Py_PACK_VERSION` format. Typically, you should choose a " "specific value rather than the version of the Python headers you are " "compiling against." msgstr "" "Stable ABI 向けにコンパイルするには、以下のマクロの一方または両方を、拡張でサ" "ポートする最も古い Python バージョンに :c:macro:`Py_PACK_VERSION` 形式で定義" "します。\n" "通常は、コンパイルに使う Python ヘッダのバージョンではなく、具体的な値を選ん" "でください。" msgid "" "The macros must be defined before including ``Python.h``. " "Since :c:macro:`Py_PACK_VERSION` is not available at this point, you will " "need to use the numeric value directly. For reference, the values for a few " "recent Python versions are:" msgstr "" "マクロは ``Python.h`` をインクルードする前に定義する必要があります。\n" "この時点では :c:macro:`Py_PACK_VERSION` を使えないため、数値を直接使う必要が" "あります。\n" "参考として、最近の Python バージョンの値をいくつか示します。" msgid "" "0x30a0000 /* Py_PACK_VERSION(3,10) */\n" "0x30b0000 /* Py_PACK_VERSION(3,11) */\n" "0x30c0000 /* Py_PACK_VERSION(3,12) */\n" "0x30d0000 /* Py_PACK_VERSION(3,13) */\n" "0x30e0000 /* Py_PACK_VERSION(3,14) */\n" "0x30f0000 /* Py_PACK_VERSION(3,15) */" msgstr "" "0x30a0000 /* Py_PACK_VERSION(3,10) */\n" "0x30b0000 /* Py_PACK_VERSION(3,11) */\n" "0x30c0000 /* Py_PACK_VERSION(3,12) */\n" "0x30d0000 /* Py_PACK_VERSION(3,13) */\n" "0x30e0000 /* Py_PACK_VERSION(3,14) */\n" "0x30f0000 /* Py_PACK_VERSION(3,15) */" msgid "" "When one of the macros is defined, ``Python.h`` will only expose API that is " "compatible with the given Stable ABI -- that is, the :ref:`Limited API " "<limited-api-list>` plus some definitions that need to be visible to the " "compiler but should not be used directly. When both are defined, " "``Python.h`` will only expose API compatible with both Stable ABIs." msgstr "" "どちらかのマクロを定義すると、``Python.h`` は指定した Stable ABI と互換性のあ" "る API だけを公開します。\n" "つまり :ref:`Limited API <limited-api-list>` と、コンパイラから見える必要は" "あっても直接使うべきでない一部の定義です。\n" "両方を定義した場合は、両方の Stable ABI と互換性のある API だけを公開します。" msgid "" "Target ``abi3``, that is, non-:term:`free-threaded builds <free-threaded " "build>` of CPython. See :ref:`above <abi3-compiling>` for common information." msgstr "" "``abi3``、つまり CPython の :term:`フリースレッドビルド <free-threaded " "build>` ではないビルドを対象にします。\n" "共通の情報は :ref:`前述の説明 <abi3-compiling>` を参照してください。" msgid "" "Target ``abi3t``, that is, :term:`free-threaded builds <free-threaded " "build>` of CPython. See :ref:`above <abi3-compiling>` for common information." msgstr "" "``abi3t``、つまり CPython の :term:`フリースレッドビルド <free-threaded " "build>` を対象にします。\n" "共通の情報は :ref:`前述の説明 <abi3-compiling>` を参照してください。" msgid "" "Both macros specify a target ABI; the different naming style is due to " "backwards compatibility." msgstr "" "どちらのマクロも対象の ABI を指定します。\n" "名前の形式が異なるのは、後方互換性のためです。" msgid "Historical note" msgstr "歴史的な補足" msgid "" "You can also define ``Py_LIMITED_API`` as ``3``. This works the same as " "``0x03020000`` (Python 3.2, the version that introduced Stable ABI)." msgstr "" "``Py_LIMITED_API`` を ``3`` と定義することもできます。\n" "これは ``0x03020000`` (Stable ABI を導入した Python 3.2) と同じように機能しま" "す。" msgid "" "When both are defined, ``Python.h`` may, or may not, redefine :c:macro:`!" "Py_LIMITED_API` to match :c:macro:`!Py_TARGET_ABI3T`." msgstr "" "両方が定義されている場合、``Python.h`` は :c:macro:`!Py_LIMITED_API` " "を :c:macro:`!Py_TARGET_ABI3T` に合わせて再定義する場合としない場合がありま" "す。" msgid "" "On a :term:`free-threaded build` -- that is, when :c:macro:`Py_GIL_DISABLED` " "is defined -- :c:macro:`!Py_TARGET_ABI3T` defaults to the value " "of :c:macro:`!Py_LIMITED_API`. This means that there are two ways to build " "for both ``abi3`` and ``abi3t``:" msgstr "" ":term:`フリースレッドビルド <free-threaded build>`、つま" "り :c:macro:`Py_GIL_DISABLED` が定義されている場合、:c:macro:`!" "Py_TARGET_ABI3T` のデフォルトは :c:macro:`!Py_LIMITED_API` の値です。\n" "このため、``abi3`` と ``abi3t`` の両方を対象にビルドする方法は二つあります。" msgid "" "define both :c:macro:`!Py_LIMITED_API` and :c:macro:`!Py_TARGET_ABI3T`, or" msgstr "" ":c:macro:`!Py_LIMITED_API` と :c:macro:`!Py_TARGET_ABI3T` の両方を定義する、" "または" msgid "define only :c:macro:`!Py_LIMITED_API` and:" msgstr ":c:macro:`!Py_LIMITED_API` だけを定義し、さらに次を行う。" msgid "on Windows, define :c:macro:`!Py_GIL_DISABLED`;" msgstr "Windows では :c:macro:`!Py_GIL_DISABLED` を定義する。" msgid "on other systems, use the headers of free-threaded build of Python." msgstr "それ以外のシステムでは、Python のフリースレッドビルドのヘッダを使う。" msgid "Stable ABI Scope and Performance" msgstr "Stable ABI の範囲と性能" msgid "" "The goal for Stable ABI is to allow everything that is possible with the " "full C API, but possibly with a performance penalty. Generally, " "compatibility with Stable ABI will require some changes to an extension's " "source code." msgstr "" "Stable ABI の目標は、性能が低下する可能性はあるものの、完全な C API で可能な" "ことをすべて可能にすることです。\n" "一般に Stable ABI に対応するには、拡張のソースコードに多少の変更が必要です。" msgid "" "For example, while :c:func:`PyList_GetItem` is available, its \"unsafe\" " "macro variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster " "because it can rely on version-specific implementation details of the list " "object." msgstr "" "例えば :c:func:`PyList_GetItem` は利用できますが、「安全でない」マクロ版" "の :c:func:`PyList_GET_ITEM` は利用できません。\n" "このマクロは、リストオブジェクトのバージョン固有の実装の詳細に依存できるた" "め、高速な場合があります。" msgid "" "For another example, when *not* compiling for Stable ABI, some C API " "functions are inlined or replaced by macros. Compiling for Stable ABI " "disables this inlining, allowing stability as Python's data structures are " "improved, but possibly reducing performance." msgstr "" "また、Stable ABI 向けにコンパイル *しない* 場合、一部の C API 関数はインライ" "ン展開されたりマクロに置き換えられたりします。\n" "Stable ABI 向けのコンパイルではこのインライン展開を無効にするため、Python の" "データ構造が改良されても安定性を保てますが、性能が低下する可能性があります。" msgid "" "By leaving out the :c:macro:`!Py_LIMITED_API` or :c:macro:`!Py_TARGET_ABI3T` " "definition, it is possible to compile Stable-ABI-compatible source for a " "version-specific ABI. A potentially faster version-specific extension can " "then be distributed alongside a version compiled for Stable ABI -- a slower " "but more compatible fallback." msgstr "" ":c:macro:`!Py_LIMITED_API` または :c:macro:`!Py_TARGET_ABI3T` の定義を省く" "と、Stable ABI 対応のソースをバージョン固有の ABI 向けにコンパイルできま" "す。\n" "その結果、性能が高くなる可能性のあるバージョン固有の拡張と、低速でも互換性の" "高い代替として Stable ABI 向けにコンパイルした版を、併せて配布できます。" msgid "Stable ABI Caveats" msgstr "Stable ABI の注意点" msgid "" "Note that compiling for Stable ABI is *not* a complete guarantee that code " "will be compatible with the expected Python versions. Stable ABI prevents " "*ABI* issues, like linker errors due to missing symbols or data corruption " "due to changes in structure layouts or function signatures. However, other " "changes in Python can change the *behavior* of extensions." msgstr "" "Stable ABI 向けにコンパイルしても、意図した Python バージョンでコードが動作す" "る完全な保証には *なりません*。\n" "Stable ABI は、シンボル不足によるリンクエラーや、構造体のレイアウトや関数シグ" "ネチャの変更によるデータ破損などの *ABI* の問題を防ぎます。\n" "ただし、Python のほかの変更によって拡張の *動作* が変わることはあります。" msgid "" "One issue that the :c:macro:`Py_TARGET_ABI3T` and :c:macro:`Py_LIMITED_API` " "macros do not guard against is calling a function with arguments that are " "invalid in a lower Python version. For example, consider a function that " "starts accepting ``NULL`` for an argument. In Python 3.9, ``NULL`` now " "selects a default behavior, but in Python 3.8, the argument will be used " "directly, causing a ``NULL`` dereference and crash. A similar argument works " "for fields of structs." msgstr "" ":c:macro:`Py_TARGET_ABI3T` と :c:macro:`Py_LIMITED_API` で防げない問題の一つ" "に、古い Python では無効な引数で関数を呼び出すことがあります。\n" "例えば、ある関数が引数として ``NULL`` を受け取るようになった場合を考えてくだ" "さい。\n" "Python 3.9 では ``NULL`` がデフォルトの動作を選択するのに、Python 3.8 では引" "数をそのまま使ってしまい、``NULL`` の参照先へのアクセスによってクラッシュする" "かもしれません。\n" "構造体のフィールドにも同様のことが言えます。" msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " "versions it supports." msgstr "" "このため、拡張がサポートする *すべて* の Python マイナーバージョンでテストす" "ることを推奨します。" #: ../../c-api/stable.rst:249 msgid "" "We also recommend reviewing documentation of all used API to check if it is " "explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " "few private declarations are exposed for technical reasons (or even " "unintentionally, as bugs)." msgstr "" "また、使用するすべての API のドキュメントを確認し、それが明示的に Limited " "API の一部であるかどうかをチェックすることをお勧めします。``Py_LIMITED_API`` " "が定義されていても、技術的な理由で(あるいはバグとして意図せず)いくつかのプラ" "イベート宣言が公開されることがあります。" msgid "" "Also note that while compiling with ``Py_LIMITED_API`` 3.8 means that the " "extension should *load* on Python 3.12, and *compile* with Python 3.12, the " "same source will not necessarily compile with ``Py_LIMITED_API`` set to " "3.12. In general, parts of the Limited API may be deprecated and removed, " "provided that Stable ABI stays stable." msgstr "" "また、``Py_LIMITED_API`` を 3.8 にしてコンパイルした拡張は Python 3.12 で *読" "み込め*、Python 3.12 で *コンパイルできる* はずですが、同じソースが " "``Py_LIMITED_API`` を 3.12 にしてコンパイルできるとは限りません。\n" "一般に、Stable ABI の安定性を維持する限り、Limited API の一部は非推奨になった" "り削除されたりすることがあります。" #: ../../c-api/stable.rst:265 msgid "Platform Considerations" msgstr "プラットフォームで考慮すべき点" msgid "" "ABI stability depends not only on Python, but also on the compiler used, " "lower-level libraries and compiler options. For the purposes of " "the :ref:`Stable ABIs <stable-abi>`, these details define a “platform”. They " "usually depend on the OS type and processor architecture" msgstr "" "ABI の安定性は Python だけでなく、使用するコンパイラ、低レベルのライブラリ、" "コンパイラオプションにも依存します。\n" ":ref:`Stable ABI <stable-abi>` では、これらの詳細をまとめて「プラットフォー" "ム」と呼びます。\n" "通常は OS の種類とプロセッサのアーキテクチャによって決まります。" msgid "" "It is the responsibility of each particular distributor of Python to ensure " "that all Python versions on a particular platform are built in a way that " "does not break the Stable ABIs, or the version-specific ABIs. This is the " "case with Windows and macOS releases from ``python.org`` and many third-" "party distributors." msgstr "" "特定のプラットフォーム上のすべての Python バージョンが、Stable ABI やバージョ" "ン固有の ABI の互換性を壊さない方法でビルドされるようにするのは、それぞれの " "Python 配布者の責任です。\n" "``python.org`` の Windows 版と macOS 版、および多くのサードパーティの配布者は" "これを行っています。" msgid "ABI Checking" msgstr "ABI の確認" msgid "Python includes a rudimentary check for ABI compatibility." msgstr "Python は ABI 互換性の基本的な確認機能を備えています。" msgid "" "This check is not comprehensive. It only guards against common cases of " "incompatible modules being installed for the wrong interpreter. It also does " "not take :ref:`platform incompatibilities <stable-abi-platform>` into " "account. It can only be done after an extension is successfully loaded." msgstr "" "この確認は網羅的ではありません。\n" "互換性のないモジュールが誤ったインタープリタ向けにインストールされる、よくあ" "る場合だけを防ぎます。\n" ":ref:`プラットフォームの非互換性 <stable-abi-platform>` も考慮しません。\n" "確認できるのは、拡張の読み込みに成功した後だけです。" msgid "" "Despite these limitations, it is recommended that extension modules use this " "mechanism, so that detectable incompatibilities raise exceptions rather than " "crash." msgstr "" "このような制限はありますが、検出できる非互換性によってクラッシュする代わりに" "例外を送出できるよう、拡張モジュールではこの仕組みを使うことを推奨します。" msgid "" "Most modules can use this check via the :c:data:`Py_mod_abi` slot and " "the :c:macro:`PyABIInfo_VAR` macro, for example like this:" msgstr "" "ほとんどのモジュールでは、:c:data:`Py_mod_abi` スロット" "と :c:macro:`PyABIInfo_VAR` マクロを使って、例えば次のように確認できます。" msgid "" "PyABIInfo_VAR(abi_info);\n" "\n" "static PyModuleDef_Slot mymodule_slots[] = {\n" " {Py_mod_abi, &abi_info},\n" " ...\n" "};" msgstr "" "PyABIInfo_VAR(abi_info);\n" "\n" "static PyModuleDef_Slot mymodule_slots[] = {\n" " {Py_mod_abi, &abi_info},\n" " ...\n" "};" msgid "The full API is described below for advanced use cases." msgstr "高度な用途向けに、以下で API 全体を説明します。" msgid "" "Verify that the given *info* is compatible with the currently running " "interpreter." msgstr "" "指定された ``info`` が、現在実行中のインタープリタと互換性があるかどうかを確" "認します。" msgid "Return 0 on success. On failure, raise an exception and return -1." msgstr "" "成功した場合は 0 を返します。\n" "失敗した場合は例外を送出し、-1 を返します。" msgid "" "If the ABI is incompatible, the raised exception will " "be :py:exc:`ImportError`." msgstr "ABI に互換性がない場合、送出する例外は :py:exc:`ImportError` です。" msgid "" "The *module_name* argument can be ``NULL``, or point to a NUL-terminated " "UTF-8-encoded string used for error messages." msgstr "" "``module_name`` 引数は ``NULL``、またはエラーメッセージに使う NUL 終端の " "UTF-8 エンコード文字列へのポインタです。" #: ../../c-api/stable.rst:324 msgid "" "Note that if *info* describes the ABI that the current code uses (as defined " "by :c:macro:`PyABIInfo_VAR`, for example), using any other Python C API may " "lead to crashes. In particular, it is not safe to examine the raised " "exception." msgstr "" msgid "" "Define a static :c:struct:`PyABIInfo` variable with the given *NAME* that " "describes the ABI that the current code will use. This macro expands to:" msgstr "" "指定された名前 ``NAME`` で、現在のコードが使う ABI を記述する静的" "な :c:struct:`PyABIInfo` 変数を定義します。\n" "このマクロは次のように展開されます。" msgid "" "static PyABIInfo NAME = {\n" " 1, 0,\n" " PyABIInfo_DEFAULT_FLAGS,\n" " PY_VERSION_HEX,\n" " PyABIInfo_DEFAULT_ABI_VERSION\n" "}" msgstr "" "static PyABIInfo NAME = {\n" " 1, 0,\n" " PyABIInfo_DEFAULT_FLAGS,\n" " PY_VERSION_HEX,\n" " PyABIInfo_DEFAULT_ABI_VERSION\n" "}" msgid "The major version of :c:struct:`PyABIInfo`. Can be set to:" msgstr "" ":c:struct:`PyABIInfo` のメジャーバージョン。\n" "次の値を設定できます。" msgid "``0`` to skip all checking, or" msgstr "``0``: すべての確認を省略する、または" msgid "``1`` to specify this version of :c:struct:`!PyABIInfo`." msgstr "``1``: このバージョンの :c:struct:`!PyABIInfo` を指定する。" msgid "" "The minor version of :c:struct:`PyABIInfo`. Must be set to ``0``; larger " "values are reserved for backwards-compatible future versions of :c:struct:`!" "PyABIInfo`." msgstr "" ":c:struct:`PyABIInfo` のマイナーバージョン。\n" "``0`` に設定する必要があります。\n" "それより大きな値は、将来の後方互換性を持つ :c:struct:`!PyABIInfo` のバージョ" "ン用に予約されています。" msgid "This field is usually set to the following macro:" msgstr "通常、このフィールドには次のマクロを設定します。" msgid "" "Default flags, based on current values of macros such " "as :c:macro:`Py_LIMITED_API` and :c:macro:`Py_GIL_DISABLED`." msgstr "" ":c:macro:`Py_LIMITED_API` や :c:macro:`Py_GIL_DISABLED` などのマクロの現在の" "値に基づく、デフォルトのフラグです。" msgid "" "Alternately, the field can be set to the following flags, combined by " "bitwise OR. Unused bits must be set to zero." msgstr "" "または、以下のフラグをビット OR で組み合わせて設定できます。\n" "未使用のビットはゼロにする必要があります。" msgid "ABI variant -- one of:" msgstr "ABI の種類。次のいずれかです。" msgid "Specifies that Stable ABI is used." msgstr "Stable ABI を使うことを指定します。" msgid "" "Specifies ABI specific to a particular build of CPython. Internal use only." msgstr "" "CPython の特定のビルドに固有の ABI を指定します。\n" "内部専用です。" msgid "Free-threading compatibility -- one of:" msgstr "フリースレッド対応。次のいずれかです。" msgid "" "Specifies ABI compatible with :term:`free-threaded builds <free-threaded " "build>` of CPython. (That is, ones compiled with :option:`--disable-gil`; " "with ``t`` in :py:data:`sys.abiflags`)" msgstr "" "CPython の :term:`フリースレッドビルド <free-threaded build>` と互換性のある " "ABI を指定します。\n" "つまり :option:`--disable-gil` でコンパイルされ、:py:data:`sys.abiflags` に " "``t`` があるビルドです。" msgid "" "Specifies ABI compatible with non-free-threaded builds of CPython (ones " "compiled *without* :option:`--disable-gil`)." msgstr "" "CPython のフリースレッドでないビルド (:option:`--disable-gil` を指定 *せずに" "* コンパイルしたもの) と互換性のある ABI を指定します。" msgid "" "Specifies ABI compatible with both free-threaded and non-free-threaded " "builds of CPython, that is, both ``abi3`` and ``abi3t``." msgstr "" "CPython のフリースレッドビルドとそれ以外のビルドの両方、つまり ``abi3`` と " "``abi3t`` の両方と互換性のある ABI を指定します。" msgid "" "The version of the Python headers used to build the code, in the format used " "by :c:macro:`PY_VERSION_HEX`." msgstr "" "コードのビルドに使った Python ヘッダのバージョン" "を、:c:macro:`PY_VERSION_HEX` と同じ形式で指定します。" msgid "" "This can be set to ``0`` to skip any checks related to this field. This " "option is meant mainly for projects that do not use the CPython headers " "directly, and do not emulate a specific version of them." msgstr "" "``0`` に設定すると、このフィールドに関する確認をすべて省略できます。\n" "主に、CPython ヘッダを直接使わず、特定バージョンのヘッダをエミュレートもしな" "いプロジェクト向けの設定です。" msgid "The ABI version." msgstr "ABI のバージョン。" msgid "" "For Stable ABI, this field should be the value of :c:macro:`Py_LIMITED_API` " "or :c:macro:`Py_TARGET_ABI3T`. If both are defined, use the smaller value. " "(If :c:macro:`Py_LIMITED_API` is ``3``; use :c:expr:`Py_PACK_VERSION(3, 2)` " "instead of ``3``.)" msgstr "" "Stable ABI では、このフィールドを :c:macro:`Py_LIMITED_API` また" "は :c:macro:`Py_TARGET_ABI3T` の値に設定します。\n" "両方が定義されている場合は小さい方を使います。\n" "(:c:macro:`Py_LIMITED_API` が ``3`` の場合は、``3`` の代わり" "に :c:expr:`Py_PACK_VERSION(3, 2)` を使ってください。)" msgid "Otherwise, it should be set to :c:macro:`PY_VERSION_HEX`." msgstr "それ以外の場合は :c:macro:`PY_VERSION_HEX` に設定します。" msgid "It can also be set to ``0`` to skip any checks related to this field." msgstr "" "``0`` に設定して、このフィールドに関する確認をすべて省略することもできます。" msgid "" "The value that should be used for this field, based on current values of " "macros such as :c:macro:`Py_LIMITED_API`, :c:macro:`PY_VERSION_HEX` " "and :c:macro:`Py_GIL_DISABLED`." msgstr "" ":c:macro:`Py_LIMITED_API`、:c:macro:`PY_VERSION_HEX`、:c:macro:`Py_GIL_DISABLED` " "などのマクロの現在の値に基づき、このフィールドに使うべき値を示します。" #: ../../c-api/stable.rst:447 msgid "Contents of Limited API" msgstr "限定版APIの内容" msgid "" "This is the definitive list of :ref:`Limited API <limited-c-api>` for Python " "|version|:" msgstr "" "Python |version| の :ref:`Limited API <limited-c-api>` の正式な一覧です。" msgid "PyUnstable" msgstr "PyUnstable" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |