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

Updates to Drop Python 3.6 #195

Merged
merged 25 commits into from
Aug 11, 2022
Merged

Updates to Drop Python 3.6 #195

merged 25 commits into from
Aug 11, 2022

Conversation

jvanderaa
Copy link
Collaborator

Looking to drop the Python3.6 compatibility.

  • Drops end of support Python version
  • Supports M1 Mac Support
  • Nautobot no longer supports Python3.6 with the new features

@jvanderaa
Copy link
Collaborator Author

jvanderaa commented Jul 9, 2022

Hmm, trying to figure out why the Flake8 tests are failing. They are supposed to be ignored.

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
nautobot_circuit_maintenance/tests/test_views.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Comment on lines 20 to 21
@classmethod
def setUp(cls):
def setUp(cls): # pylint: disable=arguments-differ
Copy link
Contributor

Choose a reason for hiding this comment

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

This sure looks wrong to me - should either be @classmethod setUpTestData(cls) or just simply setUp(self), right?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jvanderaa have you taken care of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is the thought? I am not clear in understanding what either is doing immediately. Just disabling pylint rule from the pylint updates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If not I will take a look more upon my return.

Copy link
Contributor

Choose a reason for hiding this comment

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

@classmethod setUpTestData(cls) runs once before all tests in this TestCase, setUp(self) runs before each individual test in this TestCase. @classmethod setUp(cls) is some sort of weird hybrid between these two and is incorrect. I suspect that changing it to setUp(self) should be the correct fix here.

.flake8 Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@glennmatthews glennmatthews mentioned this pull request Jul 12, 2022
2 tasks
Copy link
Contributor

@scetron scetron left a comment

Choose a reason for hiding this comment

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

Thanks @jvanderaa. Are the 'test_has_advanced_tab' now required or are these just place holders?

@jvanderaa
Copy link
Collaborator Author

The tests are auto generated as part of the inheritance for the test case. We need to adjust the HTML templates to have a new base to get these views for free. @scetron

@@ -132,7 +132,10 @@ jobs:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9"]
nautobot-version: ["1.1.5", "1.2.11", "1.3.7"]
nautobot-version: ["1.3.8"]
Copy link
Contributor

Choose a reason for hiding this comment

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

which was the problem with mysql?
BTW, would make sense to leave the nautboto-version to "stable" to always check against hte latest by default? (don't recall if we already commented this point)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

stable doesn't work. There is a parser error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm just trying to get things into a working state. What didn't work with MySQL is that I didn't have a matrix set up for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry Josh, I don't get it, because the matrix was already set up before, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not for stable. It was set up to test individual versions.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I understand, not for stable, but the matrix was working well for mysql before, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it was. I guess the wording of fix mysql was poor. Probably should have just been update mysql matrix.

@jvanderaa jvanderaa requested a review from scetron July 22, 2022 14:01
chadell
chadell previously approved these changes Jul 23, 2022
Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

to not block you, let's move this forward, but I would support adding the workaround for the stable that @glennmatthews suggested (in another PR if you want)

@jvanderaa
Copy link
Collaborator Author

I am not able to merge. I think this is still you @scetron and @chadell

scetron
scetron previously approved these changes Aug 1, 2022
glennmatthews
glennmatthews previously approved these changes Aug 1, 2022
nautobot_circuit_maintenance/tests/test_graphql.py Outdated Show resolved Hide resolved
nautobot_circuit_maintenance/tests/test_views.py Outdated Show resolved Hide resolved
@jvanderaa jvanderaa dismissed stale reviews from glennmatthews, scetron, and chadell via 9d2b62a August 9, 2022 18:33
@scetron scetron merged commit e9e8cc0 into nautobot:develop Aug 11, 2022
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.

4 participants