GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104773: PEP 594: Remove the nntplib module by vstinner · Pull Request #104894 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 24, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • socket_helper.transient_internet() no longer imports nntplib to catch nntplib.NNTPTemporaryError.
  • ssltests.py no longer runs test_nntplib.
  • "make quicktest" no longer runs test_nntplib.
  • WASM: remove nntplib from OMIT_NETWORKING_FILES.
  • Remove mentions to nntplib in the email documentation.
  • Issue: PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773

📚 Documentation preview 📚: https://cpython-previews--104894.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
vstinner requested a review from a team as a code owner May 24, 2023 20:40
@bedevere-bot bedevere-bot added the awaiting core review label May 24, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 24, 2023
PEP 594: Remove stdlib modules scheduled for deletion in Python 3.13 #104773
Closed
19 tasks done
@vstinner

vstinner commented May 24, 2023

Copy link
Copy Markdown
Member Author

cc @mcepl

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcepl

mcepl commented May 24, 2023

Copy link
Copy Markdown
Contributor

For those who might be interested in this module, let’s continue with the fun on https://git.sr.ht/~mcepl/nntplib (and on PyPI as https://pypi.org/project/nntplib/).

Julien-Elie and hugovk reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
pythongh-104773: PEP 594: Remove the nntplib module
7f5da02
* socket_helper.transient_internet() no longer imports nntplib to
  catch nntplib.NNTPTemporaryError.
* ssltests.py no longer runs test_nntplib.
* "make quicktest" no longer runs test_nntplib.
* WASM: remove nntplib from OMIT_NETWORKING_FILES.
* Remove mentions to nntplib in the email documentation.
@vstinner
vstinner force-pushed the remove_nntplib branch from b6cadfe to 7f5da02 Compare May 24, 2023 20:51
@Julien-Elie

Julien-Elie commented May 24, 2023

Copy link
Copy Markdown

Thanks @mcepl for having created nntplib on PyPi and making it still alive :)
It is greatly appreciated as this module works pretty fine, has a great documentation, and implements the latest version of the NNTP standard (RFC 3977). Too bad that its test suite had too many false alerts :(

And thanks @vstinner too for all your work on Python!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk approved these changes May 24, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 24, 2023
@vstinner

vstinner commented May 24, 2023

Copy link
Copy Markdown
Member Author

Too bad that its test suite had too many false alerts :(

Running a CI on a live server is hard. Each time that the server is busy, being upgraded, or has some network issues, the test fails. Sadly, no one managed to modify test_nntplib to tolerate temporary server/network issues.

IMO it's better to maintain such project outside Python to ease contributions. These days, pip install nntplib is trivial. And it's possible to only have a requirement on Python >= 3.13 using environment markers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 24, 2023

Copy link
Copy Markdown
Member Author

For those who might be interested in this module, let’s continue with the fun on https://git.sr.ht/~mcepl/nntplib (and on PyPI as https://pypi.org/project/nntplib/).

If you look carefully to my PR, you will see that I recommend this replacement in What's New in Python 3.13, where the removal is documented ;-)

hugovk reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner enabled auto-merge (squash) May 24, 2023 21:05
@vstinner
vstinner merged commit ded5f1f into python:main May 24, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 24, 2023
@vstinner
vstinner deleted the remove_nntplib branch May 24, 2023 21:16
@vstinner

vstinner commented May 24, 2023

Copy link
Copy Markdown
Member Author

Using import nntplib|from nntplib regex, I found a single project on PyPI top 5,000 projects (2023-04-13) using nntplib: zipfile36 project.

zipfile36 only uses nntplib in a copy of the Python test/support/__init__.py file:

zipfile36-0.1.3.tar.gz: zipfile36-0.1.3/test/support/__init__.py: import nntplib

https://pypi.org/project/zipfile36/ is a backport of the zipfile module from Python 3.6 "which contains some improvements". Suggested usage:

if sys.version_info >= (3, 6):
    import zipfile
else:
    import zipfile36 as zipfile

I suppose that Python 3.13 users are not supposed to use a backport of the Python 3.6 zipfile module :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcepl

mcepl commented May 24, 2023

Copy link
Copy Markdown
Contributor

If you look carefully to my PR, you will see that I recommend this replacement in What's New in Python 3.13, where the removal is documented ;-)

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcepl

mcepl commented May 24, 2023

Copy link
Copy Markdown
Contributor

Using import nntplib|from nntplib regex, I found a single project on PyPI top 5,000 projects (2023-04-13) using nntplib: zipfile36 project.

I use it in my https://pypi.org/project/pygn/ (which certainly isn’t in any Top anything ;)).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 25, 2023

Copy link
Copy Markdown
Member Author

I use it in my https://pypi.org/project/pygn/ (which certainly isn’t in any Top anything ;)).

Maybe add a requirement to your own PyPI nntplib module? :-) (with a env markers to only install it on Python 3.13 and newer).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arhadthedev arhadthedev mentioned this pull request May 25, 2023
gh-82082: Make our test suite pass on an IPv6-only Linux host #26225
Closed
@mcepl

mcepl commented May 25, 2023

Copy link
Copy Markdown
Contributor

Thanks @mcepl for having created nntplib on PyPi and making it still alive :) It is greatly appreciated as this module works pretty fine, has a great documentation, and implements the latest version of the NNTP standard (RFC 3977). Too bad that its test suite had too many false alerts :(

Any patches are hugely welcome! Especially if somebody helped with mocking out the servers. It doesn't make a sense to run the test suite against real servers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@merwok

merwok commented May 26, 2023

Copy link
Copy Markdown
Member

How can the module be under the BSD license, as it was copied from the stdlib that’s under the Python license? (not the same thing as the PSF license)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcepl

mcepl commented May 26, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

How can the module be under the BSD license, as it was copied from the stdlib that’s under the Python license? (not the same thing as the PSF license)

You are right, I have to investigate this https://todo.sr.ht/~mcepl/pygn/9

Hmm, except https://docs.python.org/3/license.html#psf-license-agreement-for-python-release really doesn’t read like something which could be used outside of the Python 3.11 itself.

Does anybody have any good example of a stand-alone Python module which would be licensed under PSF License?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented May 26, 2023

Copy link
Copy Markdown
Member

Via https://pypi.org/classifiers/ here's the PyPI packages with the "License :: OSI Approved :: Python License (CNRI Python License" Trove classifier:

  • https://pypi.org/search/?q=&o=-created&c=License+%3A%3A+OSI+Approved+%3A%3A+Python+License+%28CNRI+Python+License%29

(There's also a PSF licence one, but I guess you need Python licence.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcepl

mcepl commented May 27, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Any comments on https://git.sr.ht/~mcepl/nntplib/commit/4cb431e3e40d ?

arhadthedev reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@hugovk hugovk hugovk approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@vstinner @mcepl @Julien-Elie @merwok @hugovk @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — 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.