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-30096: Use ABC in abc reference examples #1220

Merged
merged 3 commits into from Aug 30, 2017

Conversation

appeltel
Copy link
Contributor

@appeltel appeltel commented Apr 20, 2017

  • Update example code to use abc.ABC rather than abc.ABCMeta to define abstract base classes.

  • Add examples using both methods in the documentation for abc.ABC.

  • Reorder the documentation of the classes so that the examples make sense when the document is read from top to bottom.

bpo-30096

https://bugs.python.org/issue30096

Update example code to use abc.ABC rather than abc.ABCMeta
to define abstract base classes. Add examples using both
methods in the documentation for abc.ABC. Reorder the
documentation of the classes so that the examples make sense
when the document is read from top to bottom.
@mention-bot
Copy link

@appeltel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @merwok and @birkenfeld to be potential reviewers.

@Mariatta Mariatta added the docs Documentation in the Doc dir label Apr 20, 2017
@rhettinger
Copy link
Contributor

LGTM

@@ -46,9 +72,7 @@ This module provides the following classes:
Register *subclass* as a "virtual subclass" of this ABC. For
example::

from abc import ABCMeta
Copy link
Member

Choose a reason for hiding this comment

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

I would keep the import here (just change ABCMeta to ABC)

@merwok merwok self-assigned this Aug 30, 2017
Copy link
Member

@merwok merwok left a comment

Choose a reason for hiding this comment

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

I updated the file to address my minor comment.

@merwok
Copy link
Member

merwok commented Aug 30, 2017

I think this change could get a "skip news" label. @Mariatta do you think I interpret the policy right?

@Mariatta
Copy link
Member

Yes, we can skip news for this. It doesn't require a Misc/News.d entry.
I'll let you add the skip news label :)

@merwok merwok merged commit 122e88a into python:master Aug 30, 2017
@Mariatta
Copy link
Member

I'm deleting the comment above.

@python python deleted a comment Aug 30, 2017
@merwok
Copy link
Member

merwok commented Aug 31, 2017

@appeltel Would you like to do the backport PR?

@appeltel
Copy link
Contributor Author

appeltel commented Sep 4, 2017

@merwok - Sure! I'll get that put together.

jimmylai pushed a commit to jimmylai/cpython that referenced this pull request Sep 4, 2017
* 'master' of https://github.com/python/cpython: (601 commits)
  remove check for bug last seem in Solaris 9 (python#3285)
  Change code owners for hashlib and ssl to the crypto team (python#3284)
  bpo-31281: Fix pathlib.Path incompatibility in fileinput (pythongh-3208)
  remove autoconf check for select() (python#3283)
  remove configure check for 'volatile' (python#3281)
  Add missing _sha3 module to Setup.dist (python#2395)
  bpo-12383: Also ignore __PYVENV_LAUNCHER__ (python#3278)
  bpo-9146: add the missing NEWS entry. (python#3275)
  Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (python#3270)
  bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (python#3076)
  remove a redundant lower in urllib.parse.urlsplit (python#3008)
  bpo-31323: Fix reference leak in test_ssl (python#3263)
  bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (python#3264)
  bpo-31326: ProcessPoolExecutor waits for the call queue thread (python#3265)
  bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (python#1560)
  bpo-31250, test_asyncio: fix dangling threads (python#3252)
  bpo-31217: Fix regrtest -R for small integer (python#3260)
  bpo-30096: Use ABC in abc reference examples (python#1220)
  bpo-30737: Update DevGuide links to new URL (pythonGH-3228)
  [Trivial] Remove now redundant assert (python#3245)
  ...
@miss-islington
Copy link
Contributor

🐍🍒⛏🤖 Thanks @appeltel for the PR, and @merwok for merging it 🌮🎉.I'm working now to backport this PR to: 3.6.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2017
Use base class rather than metaclass in examples.
(cherry picked from commit 122e88a)
@bedevere-bot
Copy link

GH-3408 is a backport of this pull request to the 3.6 branch.

Mariatta pushed a commit that referenced this pull request Sep 7, 2017
Use base class rather than metaclass in examples.
(cherry picked from commit 122e88a)
GadgetSteve pushed a commit to GadgetSteve/cpython that referenced this pull request Sep 10, 2017
Use base class rather than metaclass in examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants