CINXE.COM
PEP 631 – Dependency specification in pyproject.toml based on PEP 508 | peps.python.org
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="color-scheme" content="light dark"> <title>PEP 631 – Dependency specification in pyproject.toml based on PEP 508 | peps.python.org</title> <link rel="shortcut icon" href="../_static/py.png"> <link rel="canonical" href="https://peps.python.org/pep-0631/"> <link rel="stylesheet" href="../_static/style.css" type="text/css"> <link rel="stylesheet" href="../_static/mq.css" type="text/css"> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" media="(prefers-color-scheme: light)" id="pyg-light"> <link rel="stylesheet" href="../_static/pygments_dark.css" type="text/css" media="(prefers-color-scheme: dark)" id="pyg-dark"> <link rel="alternate" type="application/rss+xml" title="Latest PEPs" href="https://peps.python.org/peps.rss"> <meta property="og:title" content='PEP 631 – Dependency specification in pyproject.toml based on PEP 508 | peps.python.org'> <meta property="og:description" content="This PEP specifies how to write a project’s dependencies in a pyproject.toml file for packaging-related tools to consume using the fields defined in PEP 621."> <meta property="og:type" content="website"> <meta property="og:url" content="https://peps.python.org/pep-0631/"> <meta property="og:site_name" content="Python Enhancement Proposals (PEPs)"> <meta property="og:image" content="https://peps.python.org/_static/og-image.png"> <meta property="og:image:alt" content="Python PEPs"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> <meta name="description" content="This PEP specifies how to write a project’s dependencies in a pyproject.toml file for packaging-related tools to consume using the fields defined in PEP 621."> <meta name="theme-color" content="#3776ab"> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-sun-half" viewBox="0 0 24 24" pointer-events="all"> <title>Following system colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="9"></circle> <path d="M12 3v18m0-12l4.65-4.65M12 14.3l7.37-7.37M12 19.6l8.85-8.85"></path> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24" pointer-events="all"> <title>Selected dark colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"></path> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24" pointer-events="all"> <title>Selected light colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> </svg> <script> document.documentElement.dataset.colour_scheme = localStorage.getItem("colour_scheme") || "auto" </script> <section id="pep-page-section"> <header> <h1>Python Enhancement Proposals</h1> <ul class="breadcrumbs"> <li><a href="https://www.python.org/" title="The Python Programming Language">Python</a> » </li> <li><a href="../pep-0000/">PEP Index</a> » </li> <li>PEP 631</li> </ul> <button id="colour-scheme-cycler" onClick="setColourScheme(nextColourScheme())"> <svg aria-hidden="true" class="colour-scheme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-light"><use href="#svg-sun"></use></svg> <span class="visually-hidden">Toggle light / dark / auto colour theme</span> </button> </header> <article> <section id="pep-content"> <h1 class="page-title">PEP 631 – Dependency specification in pyproject.toml based on PEP 508</h1> <dl class="rfc2822 field-list simple"> <dt class="field-odd">Author<span class="colon">:</span></dt> <dd class="field-odd">Ofek Lev <ofekmeister at gmail.com></dd> <dt class="field-even">Sponsor<span class="colon">:</span></dt> <dd class="field-even">Paul Ganssle <paul at ganssle.io></dd> <dt class="field-odd">Discussions-To<span class="colon">:</span></dt> <dd class="field-odd"><a class="reference external" href="https://discuss.python.org/t/5018">Discourse thread</a></dd> <dt class="field-even">Status<span class="colon">:</span></dt> <dd class="field-even"><abbr title="Replaced by another succeeding PEP">Superseded</abbr></dd> <dt class="field-odd">Type<span class="colon">:</span></dt> <dd class="field-odd"><abbr title="Normative PEP with a new feature for Python, implementation change for CPython or interoperability standard for the ecosystem">Standards Track</abbr></dd> <dt class="field-even">Topic<span class="colon">:</span></dt> <dd class="field-even"><a class="reference external" href="../topic/packaging/">Packaging</a></dd> <dt class="field-odd">Created<span class="colon">:</span></dt> <dd class="field-odd">20-Aug-2020</dd> <dt class="field-even">Post-History<span class="colon">:</span></dt> <dd class="field-even">20-Aug-2020</dd> <dt class="field-odd">Superseded-By<span class="colon">:</span></dt> <dd class="field-odd"><a class="reference external" href="../pep-0621/">621</a></dd> <dt class="field-even">Resolution<span class="colon">:</span></dt> <dd class="field-even"><a class="reference external" href="https://discuss.python.org/t/how-to-specify-dependencies-pep-508-strings-or-a-table-in-toml/5243/38">Discourse message</a></dd> </dl> <hr class="docutils" /> <section id="contents"> <details><summary>Table of Contents</summary><ul class="simple"> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#entries">Entries</a></li> <li><a class="reference internal" href="#specification">Specification</a><ul> <li><a class="reference internal" href="#dependencies">dependencies</a></li> <li><a class="reference internal" href="#optional-dependencies">optional-dependencies</a></li> </ul> </li> <li><a class="reference internal" href="#example">Example</a></li> <li><a class="reference internal" href="#implementation">Implementation</a><ul> <li><a class="reference internal" href="#parsing">Parsing</a></li> <li><a class="reference internal" href="#metadata">Metadata</a></li> </ul> </li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> </details></section> <section id="abstract"> <h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2> <p>This PEP specifies how to write a project’s dependencies in a <code class="docutils literal notranslate"><span class="pre">pyproject.toml</span></code> file for packaging-related tools to consume using the <a class="pep reference internal" href="../pep-0621/#dependencies-optional-dependencies" title="PEP 621 – Storing project metadata in pyproject.toml § dependencies/optional-dependencies">fields defined in PEP 621</a>.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>This PEP has been accepted and was merged into <a class="pep reference internal" href="../pep-0621/" title="PEP 621 – Storing project metadata in pyproject.toml">PEP 621</a>.</p> </div> </section> <section id="entries"> <h2><a class="toc-backref" href="#entries" role="doc-backlink">Entries</a></h2> <p>All dependency entries MUST be valid <a class="pep reference internal" href="../pep-0508/" title="PEP 508 – Dependency specification for Python Software Packages">PEP 508 strings</a>.</p> <p>Build backends SHOULD abort at load time for any parsing errors.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">packaging.requirements</span> <span class="kn">import</span> <span class="n">InvalidRequirement</span><span class="p">,</span> <span class="n">Requirement</span> <span class="o">...</span> <span class="k">try</span><span class="p">:</span> <span class="n">Requirement</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span> <span class="k">except</span> <span class="n">InvalidRequirement</span><span class="p">:</span> <span class="c1"># exit</span> </pre></div> </div> </section> <section id="specification"> <h2><a class="toc-backref" href="#specification" role="doc-backlink">Specification</a></h2> <section id="dependencies"> <h3><a class="toc-backref" href="#dependencies" role="doc-backlink">dependencies</a></h3> <ul class="simple"> <li>Format: array of strings</li> <li>Related core metadata:<ul> <li><a class="reference external" href="https://packaging.python.org/specifications/core-metadata/#requires-dist-multiple-use">Requires-Dist</a></li> </ul> </li> </ul> <p>Every element MUST be an <a class="reference external" href="#entries">entry</a>.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">project</span><span class="p">]</span> <span class="n">dependencies</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'PyYAML ~= 5.0'</span><span class="p">,</span> <span class="s1">'requests[security] < 3'</span><span class="p">,</span> <span class="s1">'subprocess32; python_version < "3.2"'</span><span class="p">,</span> <span class="p">]</span> </pre></div> </div> </section> <section id="optional-dependencies"> <h3><a class="toc-backref" href="#optional-dependencies" role="doc-backlink">optional-dependencies</a></h3> <ul class="simple"> <li>Format: table</li> <li>Related core metadata:<ul> <li><a class="reference external" href="https://packaging.python.org/specifications/core-metadata/#provides-extra-multiple-use">Provides-Extra</a></li> <li><a class="reference external" href="https://packaging.python.org/specifications/core-metadata/#requires-dist-multiple-use">Requires-Dist</a></li> </ul> </li> </ul> <p>Each key is the name of the provided option, with each value being the same type as the <a class="reference external" href="#dependencies">dependencies</a> field i.e. an array of strings.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">project</span><span class="o">.</span><span class="n">optional</span><span class="o">-</span><span class="n">dependencies</span><span class="p">]</span> <span class="n">tests</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'coverage>=5.0.3'</span><span class="p">,</span> <span class="s1">'pytest'</span><span class="p">,</span> <span class="s1">'pytest-benchmark[histogram]>=3.2.1'</span><span class="p">,</span> <span class="p">]</span> </pre></div> </div> </section> </section> <section id="example"> <h2><a class="toc-backref" href="#example" role="doc-backlink">Example</a></h2> <p>This is a real-world example port of what <a class="reference external" href="https://github.com/docker/compose/blob/789bfb0e8b2e61f15f423d371508b698c64b057f/setup.py#L28-L61">docker-compose</a> defines.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">project</span><span class="p">]</span> <span class="n">dependencies</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'cached-property >= 1.2.0, < 2'</span><span class="p">,</span> <span class="s1">'distro >= 1.5.0, < 2'</span><span class="p">,</span> <span class="s1">'docker[ssh] >= 4.2.2, < 5'</span><span class="p">,</span> <span class="s1">'dockerpty >= 0.4.1, < 1'</span><span class="p">,</span> <span class="s1">'docopt >= 0.6.1, < 1'</span><span class="p">,</span> <span class="s1">'jsonschema >= 2.5.1, < 4'</span><span class="p">,</span> <span class="s1">'PyYAML >= 3.10, < 6'</span><span class="p">,</span> <span class="s1">'python-dotenv >= 0.13.0, < 1'</span><span class="p">,</span> <span class="s1">'requests >= 2.20.0, < 3'</span><span class="p">,</span> <span class="s1">'texttable >= 0.9.0, < 2'</span><span class="p">,</span> <span class="s1">'websocket-client >= 0.32.0, < 1'</span><span class="p">,</span> <span class="c1"># Conditional</span> <span class="s1">'backports.shutil_get_terminal_size == 1.0.0; python_version < "3.3"'</span><span class="p">,</span> <span class="s1">'backports.ssl_match_hostname >= 3.5, < 4; python_version < "3.5"'</span><span class="p">,</span> <span class="s1">'colorama >= 0.4, < 1; sys_platform == "win32"'</span><span class="p">,</span> <span class="s1">'enum34 >= 1.0.4, < 2; python_version < "3.4"'</span><span class="p">,</span> <span class="s1">'ipaddress >= 1.0.16, < 2; python_version < "3.3"'</span><span class="p">,</span> <span class="s1">'subprocess32 >= 3.5.4, < 4; python_version < "3.2"'</span><span class="p">,</span> <span class="p">]</span> <span class="p">[</span><span class="n">project</span><span class="o">.</span><span class="n">optional</span><span class="o">-</span><span class="n">dependencies</span><span class="p">]</span> <span class="n">socks</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'PySocks >= 1.5.6, != 1.5.7, < 2'</span> <span class="p">]</span> <span class="n">tests</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'ddt >= 1.2.2, < 2'</span><span class="p">,</span> <span class="s1">'pytest < 6'</span><span class="p">,</span> <span class="s1">'mock >= 1.0.1, < 4; python_version < "3.4"'</span><span class="p">,</span> <span class="p">]</span> </pre></div> </div> </section> <section id="implementation"> <h2><a class="toc-backref" href="#implementation" role="doc-backlink">Implementation</a></h2> <section id="parsing"> <h3><a class="toc-backref" href="#parsing" role="doc-backlink">Parsing</a></h3> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">packaging.requirements</span> <span class="kn">import</span> <span class="n">InvalidRequirement</span><span class="p">,</span> <span class="n">Requirement</span> <span class="k">def</span> <span class="nf">parse_dependencies</span><span class="p">(</span><span class="n">config</span><span class="p">):</span> <span class="n">dependencies</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'dependencies'</span><span class="p">,</span> <span class="p">[])</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dependencies</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'Field `project.dependencies` must be an array'</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">entry</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">dependencies</span><span class="p">,</span> <span class="mi">1</span><span class="p">):</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">'Dependency #</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> of field `project.dependencies` must be a string'</span><span class="p">)</span> <span class="k">try</span><span class="p">:</span> <span class="n">Requirement</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span> <span class="k">except</span> <span class="n">InvalidRequirement</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s1">'Dependency #</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> of field `project.dependencies` is invalid: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s1">'</span><span class="p">)</span> <span class="k">return</span> <span class="n">dependencies</span> <span class="k">def</span> <span class="nf">parse_optional_dependencies</span><span class="p">(</span><span class="n">config</span><span class="p">):</span> <span class="n">optional_dependencies</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'optional-dependencies'</span><span class="p">,</span> <span class="p">{})</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">optional_dependencies</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'Field `project.optional-dependencies` must be a table'</span><span class="p">)</span> <span class="n">optional_dependency_entries</span> <span class="o">=</span> <span class="p">{}</span> <span class="k">for</span> <span class="n">option</span><span class="p">,</span> <span class="n">dependencies</span> <span class="ow">in</span> <span class="n">optional_dependencies</span><span class="o">.</span><span class="n">items</span><span class="p">():</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dependencies</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span> <span class="sa">f</span><span class="s1">'Dependencies for option `</span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="s1">` of field '</span> <span class="s1">'`project.optional-dependencies` must be an array'</span> <span class="p">)</span> <span class="n">entries</span> <span class="o">=</span> <span class="p">[]</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">entry</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">dependencies</span><span class="p">,</span> <span class="mi">1</span><span class="p">):</span> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">entry</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span> <span class="sa">f</span><span class="s1">'Dependency #</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> of option `</span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="s1">` of field '</span> <span class="s1">'`project.optional-dependencies` must be a string'</span> <span class="p">)</span> <span class="k">try</span><span class="p">:</span> <span class="n">Requirement</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span> <span class="k">except</span> <span class="n">InvalidRequirement</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> <span class="sa">f</span><span class="s1">'Dependency #</span><span class="si">{</span><span class="n">i</span><span class="si">}</span><span class="s1"> of option `</span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="s1">` of field '</span> <span class="sa">f</span><span class="s1">'`project.optional-dependencies` is invalid: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s1">'</span> <span class="p">)</span> <span class="k">else</span><span class="p">:</span> <span class="n">entries</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span> <span class="n">optional_dependency_entries</span><span class="p">[</span><span class="n">option</span><span class="p">]</span> <span class="o">=</span> <span class="n">entries</span> <span class="k">return</span> <span class="n">optional_dependency_entries</span> </pre></div> </div> </section> <section id="metadata"> <h3><a class="toc-backref" href="#metadata" role="doc-backlink">Metadata</a></h3> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">construct_metadata_file</span><span class="p">(</span><span class="n">metadata_object</span><span class="p">):</span> <span class="w"> </span><span class="sd">"""</span> <span class="sd"> https://packaging.python.org/specifications/core-metadata/</span> <span class="sd"> """</span> <span class="n">metadata_file</span> <span class="o">=</span> <span class="s1">'Metadata-Version: 2.1</span><span class="se">\n</span><span class="s1">'</span> <span class="o">...</span> <span class="k">if</span> <span class="n">metadata_object</span><span class="o">.</span><span class="n">dependencies</span><span class="p">:</span> <span class="c1"># Sort dependencies to ensure reproducible builds</span> <span class="k">for</span> <span class="n">dependency</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">metadata_object</span><span class="o">.</span><span class="n">dependencies</span><span class="p">):</span> <span class="n">metadata_file</span> <span class="o">+=</span> <span class="sa">f</span><span class="s1">'Requires-Dist: </span><span class="si">{</span><span class="n">dependency</span><span class="si">}</span><span class="se">\n</span><span class="s1">'</span> <span class="k">if</span> <span class="n">metadata_object</span><span class="o">.</span><span class="n">optional_dependencies</span><span class="p">:</span> <span class="c1"># Sort extras and dependencies to ensure reproducible builds</span> <span class="k">for</span> <span class="n">option</span><span class="p">,</span> <span class="n">dependencies</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">metadata_object</span><span class="o">.</span><span class="n">optional_dependencies</span><span class="o">.</span><span class="n">items</span><span class="p">()):</span> <span class="n">metadata_file</span> <span class="o">+=</span> <span class="sa">f</span><span class="s1">'Provides-Extra: </span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="se">\n</span><span class="s1">'</span> <span class="k">for</span> <span class="n">dependency</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">dependencies</span><span class="p">):</span> <span class="k">if</span> <span class="s1">';'</span> <span class="ow">in</span> <span class="n">dependency</span><span class="p">:</span> <span class="n">metadata_file</span> <span class="o">+=</span> <span class="sa">f</span><span class="s1">'Requires-Dist: </span><span class="si">{</span><span class="n">dependency</span><span class="si">}</span><span class="s1"> and extra == "</span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="s1">"</span><span class="se">\n</span><span class="s1">'</span> <span class="k">else</span><span class="p">:</span> <span class="n">metadata_file</span> <span class="o">+=</span> <span class="sa">f</span><span class="s1">'Requires-Dist: </span><span class="si">{</span><span class="n">dependency</span><span class="si">}</span><span class="s1">; extra == "</span><span class="si">{</span><span class="n">option</span><span class="si">}</span><span class="s1">"</span><span class="se">\n</span><span class="s1">'</span> <span class="o">...</span> <span class="k">return</span> <span class="n">metadata_file</span> </pre></div> </div> </section> </section> <section id="copyright"> <h2><a class="toc-backref" href="#copyright" role="doc-backlink">Copyright</a></h2> <p>This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive.</p> </section> </section> <hr class="docutils" /> <p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-0631.rst">https://github.com/python/peps/blob/main/peps/pep-0631.rst</a></p> <p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-0631.rst">2023-09-09 17:39:29 GMT</a></p> </article> <nav id="pep-sidebar"> <h2>Contents</h2> <ul> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#entries">Entries</a></li> <li><a class="reference internal" href="#specification">Specification</a><ul> <li><a class="reference internal" href="#dependencies">dependencies</a></li> <li><a class="reference internal" href="#optional-dependencies">optional-dependencies</a></li> </ul> </li> <li><a class="reference internal" href="#example">Example</a></li> <li><a class="reference internal" href="#implementation">Implementation</a><ul> <li><a class="reference internal" href="#parsing">Parsing</a></li> <li><a class="reference internal" href="#metadata">Metadata</a></li> </ul> </li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> <br> <a id="source" href="https://github.com/python/peps/blob/main/peps/pep-0631.rst">Page Source (GitHub)</a> </nav> </section> <script src="../_static/colour_scheme.js"></script> <script src="../_static/wrap_tables.js"></script> <script src="../_static/sticky_banner.js"></script> </body> </html>