-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
Drop Python 2 Support #594
Conversation
Python 2 is well beyond EOL now and will soon be removed from github's workflows This PR seeks to remove all calls / references and tests that rely on Python 2. * Remove six imports and six.Py2 conditionals * Remove Py2 calls from github workflows * Merged example files (e.g exec-py2.py|exec-py3.py > exec.py) * Removed py2 env from setuptools * Removed py2 env from tox Resolves: PyCQA#584
hi @ericwb / @sigmavirus24 A
I have never seen a conditional following a declaration like that, but figured it might be a Looks like we can just remove
|
You return This is a Python ternary, I agree they can be disorienting at times |
How's this @sigmavirus24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add python_requires='>=3.5'
to strict enforcing versions where it can be installed.
Should I squash and merge @ericwb , do we need an ack from @sigmavirus24 ? |
@lukehinds Looks like there are still some things to fix up in the build. |
bandit/blacklists/calls.py
Outdated
@@ -265,20 +265,6 @@ | |||
| B321 | ftplib | - ftplib.\* | High | | |||
+------+---------------------+------------------------------------+-----------+ | |||
|
|||
B322: input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericwb removed B322 inline with #596
Was not sure if I should leave B322 as a gap or I should count -1 on the other remain tests. So for example B323 becomes B322, B324 becomes B323 etc. I was thinking around folks who are cherry picking tests to run and if we increment down, they may end up having an incorrect mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have to keep legacy numbers for historical reasons as to not break users including/excluding certain numbers. We have other examples where we leave the documentation for the ID, but indicate to the users that the test has been removed.
Seeing this failure a lot, any ideas, have you come across it before:
|
I haven't come across it before but I'm unsurprised that checking the output seems to be causing us grief here. I wonder if we can change our helper function to give us more detail here. I wonder if we could use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than trying to drop all of Py2 references in one PR, might be better to do incremental changes starting with the dropping of build of 2.7 and installability of 2.7.
@lukehinds I pushed a commit to do the bare minimum to remove Py2.7. Please rebase and resolve conflicts. |
thanks @ericwb , I am still working through this, but its a huge list of stuff breaking - quite surprised at how much this has broken. |
Python 2 is well beyond EOL now and will soon be removed from
github's workflows
This PR seeks to remove all calls / references and tests that
rely on Python 2.
Resolves: #584