Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-104773: PEP 594: Remove the nntplib module#104894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:remove_nntplib
May 24, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedMay 24, 2023
edited
Loading

  • 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.

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

@vstinner
Copy link
MemberAuthor

cc@mcepl

@mcepl
Copy link
Contributor

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

Julien-Elie and hugovk reacted with thumbs up emoji

* 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.
@Julien-Elie
Copy link

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!

@vstinner
Copy link
MemberAuthor

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 toease contributions. These days,pip install nntplib is trivial. And it's possible to only have a requirement onPython >= 3.13 using environment markers.

@vstinner
Copy link
MemberAuthor

For those who might be interested in this module, let’s continue with the fun onhttps://git.sr.ht/~mcepl/nntplib (and on PyPI ashttps://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

@vstinnervstinnerenabled auto-merge (squash)May 24, 2023 21:05
@vstinnervstinner merged commitded5f1f intopython:mainMay 24, 2023
@vstinnervstinner deleted the remove_nntplib branchMay 24, 2023 21:16
@vstinner
Copy link
MemberAuthor

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

zipfile36 only usesnntplib in a copy of the Pythontest/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 modulefrom Python 3.6 "which contains some improvements". Suggested usage:

if sys.version_info >= (3, 6):    import zipfileelse:    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 :-)

@mcepl
Copy link
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!

@mcepl
Copy link
Contributor

Usingimport 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 myhttps://pypi.org/project/pygn/ (which certainly isn’t in any Top anything ;)).

@vstinner
Copy link
MemberAuthor

I use it in myhttps://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).

@mcepl
Copy link
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.

@merwok
Copy link
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)

@mcepl
Copy link
Contributor

mcepl commentedMay 26, 2023
edited
Loading

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 thishttps://todo.sr.ht/~mcepl/pygn/9

Hmm, excepthttps://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?

@hugovk
Copy link
Member

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

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

@mcepl
Copy link
Contributor

mcepl commentedMay 27, 2023
edited
Loading

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

arhadthedev reacted with heart emoji

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

@hugovkhugovkhugovk approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@vstinner@mcepl@Julien-Elie@merwok@hugovk@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp