Skip to content

PEP 829: Accepted#4937

Open
warsaw wants to merge 7 commits intopython:mainfrom
warsaw:829-accept
Open

PEP 829: Accepted#4937
warsaw wants to merge 7 commits intopython:mainfrom
warsaw:829-accept

Conversation

@warsaw
Copy link
Copy Markdown
Member

@warsaw warsaw commented Apr 25, 2026

Also, updates based on SC acceptance feedback


📚 Documentation preview 📚: https://pep-previews--4937.org.readthedocs.build/

Also, updates based on SC acceptance feedback
@warsaw warsaw self-assigned this Apr 25, 2026
Comment thread peps/pep-0829.rst Outdated
Comment thread peps/pep-0829.rst Outdated
Comment thread peps/pep-0829.rst Outdated
* A 3 year deprecating for the processing of ``import`` lines in ``.pth``
files, after which, ``import`` lines in ``.pth`` files will be silently
ignored.
* A 5 year period after which a warning will be produced for the existence of
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, they're deprecated after 3 years, and then after 5 years we produce a warning?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thinking behind this is that there's a strong desire to stop processing import lines asap (3 years) but not to annoy people with warnings until the last active Python that doesn't support 829 is EOL (5 years). Without this, you can't "roman ride" with both a legacy .pth file for older Pythons and a .start file for newer Pythons without warnings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the earlier deprecation is silent? I know this has been decided on already, just want to make sure it's presented clearly. Perhaps something like this:

Support for import lines in .pth files will be gradually removed:

  • For the first three years (expected to be Python 3.15, 3.16, and 3.17) the behavior will remain as it is now.
  • For the next two years (expected to be Python 3.18 and 3.19), import lines will be silently ignored.
  • Afterwards (expected to be Python 3.20 and higher), a warning will be produced for the existence of import lines in .pth files.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's much clearer, thanks! Let me push an update.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, approved!

Comment thread peps/pep-0829.rst Outdated
warsaw and others added 5 commits April 24, 2026 20:06
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Copy link
Copy Markdown
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @warsaw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants