Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39259: nntplib.NNTP/NNTP_SSL refactoring #17939

Merged
merged 3 commits into from Jan 11, 2020

Conversation

@corona10
Copy link
Member

corona10 commented Jan 10, 2020

This PR is only refactoring work, so the news is skipped. :)

https://bugs.python.org/issue39259

@corona10 corona10 requested a review from vstinner Jan 10, 2020
@vstinner vstinner changed the title nntplib.NNTP/NNTP_SSL refactoring bpo-39259: nntplib.NNTP/NNTP_SSL refactoring Jan 10, 2020
@vstinner vstinner removed the skip issue label Jan 10, 2020
@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Jan 10, 2020

This PR is only refactoring work, so I skip the news and issue.

I prefer to always attach a bpo to get more context. This change is connected to: https://bugs.python.org/issue39259

Copy link
Member

vstinner left a comment

Hum, you changed how _NNTPBase. With this change, I'm not sure that it's still relevant to have _NNTPBase and NNTP. What do you think of merging _NNTPBase and NNTP into NNTP? The most tricky part is to merge the two __init__() methods. Maybe just move NNTP code at the end of _NNTPBase.init().

Lib/nntplib.py Outdated Show resolved Hide resolved
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Jan 10, 2020

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Jan 10, 2020

@vstinner Yes, that's reasonable. I will update this PR with merging 2 classes.

@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Jan 10, 2020

@vstinner

self.server = nntplib._NNTPBase(file, 'test.server', *args, **kwargs)

Hmm... _NNTPBase is also used for testing server code.
IMHO, if we merge _NNTPBase and NNTP, the work looks pretty large.
How about creating a separate issue for this (e.g remove _NNTPBase)?

usenetrc, timeout)

def _create_socket(self, timeout):
self.sock = super()._create_socket(timeout)

This comment has been minimized.

Copy link
@vstinner

vstinner Jan 10, 2020

Member

In NNTP, the method only creates a socket, it doesn't assign self.sock. Please replace self.sock with sock.

@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Jan 10, 2020

Hmm... _NNTPBase is also used for testing server code.
IMHO, if we merge _NNTPBase and NNTP, the work looks pretty large.
How about creating a separate issue for this (e.g remove _NNTPBase)?

Ok.

@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Jan 11, 2020

@vstinner Updated!

Ok.

I will create a new issue for this :)

@corona10 corona10 requested a review from vstinner Jan 11, 2020
@vstinner vstinner merged commit 5d978a2 into python:master Jan 11, 2020
8 checks passed
8 checks passed
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200111.7 succeeded
Details
bedevere/issue-number Issue number 39259 found
Details
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@corona10 corona10 deleted the corona10:nntplib_refactoring branch Jan 11, 2020
@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Jan 11, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.