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

Modernize `abc` stdlib usage. #7928

Merged
merged 2 commits into from Jun 22, 2019

Conversation

Projects
None yet
2 participants
@jsirois
Copy link
Member

commented Jun 21, 2019

Eliminate use of the deprecated abc.abstractproperty. See:
https://docs.python.org/3/library/abc.html#abc.abstractproperty

While in meta.py also simplify the Singleton baseclass.

@Eric-Arellano
Copy link
Contributor

left a comment

🐍🎉

Singleton = SingletonMetaclass(u'Singleton', (object,), {})
except TypeError: # Python2
Singleton = SingletonMetaclass(b'Singleton', (object,), {})
Singleton = SingletonMetaclass('Singleton', (object,), {})

This comment has been minimized.

Copy link
@Eric-Arellano

Eric-Arellano Jun 21, 2019

Contributor

This change makes me very happy :)

@jsirois jsirois force-pushed the jsirois:abcs/fix_deprecated branch 2 times, most recently from a7d84af to 91a968c Jun 22, 2019

@Eric-Arellano

This comment has been minimized.

Copy link
Contributor

commented Jun 22, 2019

This is certain to have merge conflicts with #7926, which I'm planning to merge upon green CI in an hour or so.

jsirois added some commits Jun 21, 2019

Modernize `abc` stdlib usage.
Eliminate use of the `deprecated abc.abstractproperty`. See:
  https://docs.python.org/3/library/abc.html#abc.abstractproperty

While in meta.py also simplify the `Singleton` baseclass and simplify
the now redundant `AbstractClass` to alias `abc.ABC` with inlining
tracked by #7927.

@jsirois jsirois force-pushed the jsirois:abcs/fix_deprecated branch from 91a968c to 0d0c31a Jun 22, 2019

@jsirois jsirois merged commit 057fda3 into pantsbuild:master Jun 22, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jsirois jsirois deleted the jsirois:abcs/fix_deprecated branch Jun 22, 2019

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