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

Did not really dropped python 2.7 #487

Closed
cansjt opened this issue Aug 13, 2021 · 4 comments · Fixed by #488
Closed

Did not really dropped python 2.7 #487

cansjt opened this issue Aug 13, 2021 · 4 comments · Fixed by #488

Comments

@cansjt
Copy link

cansjt commented Aug 13, 2021

Summary

In PR #413 a mere comment was added to tell python 2.7 is no longer supported. But no actual code change was made.
Not even in the setup.py which still suggest python 2.7 is indeed supported.

Expected vs actual result

n/a

Reproducer

n/a

Versions

2.12.1

Config

n/a

Code

n/a

@graingert
Copy link
Member

pyupgrade would be good

@cans
Copy link

cans commented Aug 13, 2021

Looking at the code itself, it does not look like there is much to do. But on the dependency side, it could be more complicated.
For example coverage dropped <=3.5 in version 6.x onwards, while pytest >4.6 dropped only Python <=3.4.
Is it ok to only depend on coverage >= 6.x ? Do we want to keep 5.5 around ?
It is more or less the same story with pytest-xdist, as you probably know.

@ionelmc
Copy link
Member

ionelmc commented Aug 26, 2021

I think it's a matter of CI really. Whoever wants to overhaul the CI to use github actions or whatever can drop 2.7 as well (afaik running 2.7 on github actions is very unpleasant).

@cansjt
Copy link
Author

cansjt commented Aug 26, 2021

I am sorry I had a look into it but got busy otherwise. I think you should also drop six. A single function from it is used !

diff --git a/setup.py b/setup.py
index c345f56..a2103f0 100755
--- a/setup.py
+++ b/setup.py
@@ -131,7 +131,6 @@ setup(
             'fields',
             'hunter',
             'process-tests',
-            'six',
             'pytest-xdist',
             'virtualenv',
         ]
diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py
index 0d1b5a2..edb4801 100644
--- a/tests/test_pytest_cov.py
+++ b/tests/test_pytest_cov.py
@@ -16,7 +16,6 @@ from fields import Namespace
 from process_tests import TestProcess as _TestProcess
 from process_tests import dump_on_error
 from process_tests import wait_for_strings
-from six import exec_
 
 import pytest_cov.plugin
 
@@ -1964,7 +1963,7 @@ def test_pth_failure(monkeypatch):
     monkeypatch.setattr(embed, 'init', bad_init)
     monkeypatch.setattr(sys, 'stderr', buff)
     monkeypatch.setitem(os.environ, 'COV_CORE_SOURCE', 'foobar')
-    exec_(payload)
+    exec(payload)
     assert buff.getvalue() == '''pytest-cov: Failed to setup subprocess coverage. Environ: {'COV_CORE_SOURCE': 'foobar'} Exception: SpecificError()
 '''
 

But, if your plan to only do this while migrating to github actions, then I am really not familiar with it, so I am not sure I can help.

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 a pull request may close this issue.

4 participants