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

Add Python 3.7 support #39

Merged
merged 7 commits into from Mar 21, 2019
Merged

Conversation

juliotrigo
Copy link
Contributor

@juliotrigo juliotrigo commented Mar 17, 2019

Preparing the library for Python 3.7.
After updating the dev requirements, it seems to work fine and all the tests pass successfully.

  • Add Python 3.7 support:
    • Use Ubuntu xenial
    • sudo Travis keyword has been fully deprecated
  • Upgrade dev requirements to the latest version:
    • Remove pinned versions that are no longer necessary
    • Pin pylint for Python 2
    • Fix pep8 after upgrading flake8
    • Fix tests after upgrading pytest
  • Improve Tox configuration: develop mode, install dev extras, remove unused code.
  • Remove unused mysql Travis service since we're user Docker containers
  • Update pytest references in the documentation

@juliotrigo
Copy link
Contributor Author

Hi @mattbennett , please take a look when you have a moment.

I've added Python 3.7 tests to start preparing to support it since that's what we would like to do at Sohonet soon.
I also took the chance to upgrade the dev packages, specially pytest and flake8, which required a couple of minor amendmends.

Copy link
Member

@mattbennett mattbennett left a comment

Choose a reason for hiding this comment

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

Looks good to me. One comment/question

test/conftest.py Outdated
@@ -40,7 +40,7 @@ def make_container(service_cls, config):
for c in all_containers:
try:
c.stop()
except:
except: # noqa: E722
Copy link
Member

Choose a reason for hiding this comment

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

I think you want except: Exception here. Can't see a reason why we should be catching anything else.

Also, I wonder why we are reimplementing the container_factory here. Does nameko-sqlalchemy require stop instead of kill for teardown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattbennett You're right about the exception and we do not seem to require stop instead of kill either. I have removed the fixture and all tests are passing without reimplementing it 👍

Copy link
Member

Choose a reason for hiding this comment

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

Nice! I poked around in the history and it turns out that this was ported from Nameko core before Nameko had its own pytest plugin, so that explains the need for reimplementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. Good to remove old code :)

Copy link
Member

@mattbennett mattbennett left a comment

Choose a reason for hiding this comment

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

Fantastic!

@juliotrigo
Copy link
Contributor Author

Thanks @mattbennett ! Please merge it if you're happy.

@mattbennett mattbennett merged commit e426fe2 into nameko:master Mar 21, 2019
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.

None yet

2 participants