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

Minor Python 3.5+ improvements #73

Open
wants to merge 2 commits into
base: req_py3
Choose a base branch
from

Conversation

Stealthii
Copy link

This PR makes two small changes to the req_py3 branch:

Implement nested using contextmanager

A reimplementation of nested for Python 3 from 43cdd22, using the already imported contextmanager from contextlib.

This should silence linter warnings about the implementation method, but also be Python 3.4+ compatible and more future proof for changes in later Python versions.

Fix test_tasks for Python 3

This is a rework of cadc78f that doesn't use six for Python 3.5+ support.

This is a rework of cadc78f that doesn't use six for Python 3.5+
support.
A reimplementation of nested for Python 3 from 43cdd22, using the
already imported contextmanager from contextlib.

This should silence linter warnings about the implementation method, but
also be Python 3.4+ compatible and more future proof for changes in
later Python versions.
@@ -195,7 +195,7 @@ def dict_contains(superset, subset):
"""
Assert that all key/val pairs in dict 'subset' also exist in 'superset'
"""
for key, value in subset.iteritems():
for key, value in subset.items():
Copy link
Owner

Choose a reason for hiding this comment

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

hah - this wasn't noticed before, because nothing has used this helper function since 2011 (usage removed in 0194237)

Copy link
Owner

Choose a reason for hiding this comment

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

... if you open a pull request against the master branch which just deletes this function, I'd merge it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants