Repository: fofix/fretwork (language: python)

Issue:
Porting code to python 3
Porting the code to python 3 should be a good thing as python 2 will not be maintained past 2020 (https://pythonclock.org). Here are some links to help porting it:
- http://python3porting.com
- https://docs.python.org/3/howto/pyporting.html.

The goal of this issue is to sum up the work the code needs:
- [x] add / run tests (see #22, #23, #24)
- [x] port the code (see #14)
- [x] run tests again.


Discussion / hints:
The disconnection of python versions between fofix and fretworks, plus the use of very old python2 packages, caused my distro to stop updating their fofix packages.

I have written a [new recipe](https://github.com/fofix/fretwork/files/6177292/fofix.zip), but it will only work when the game is ported.
Hi @es20490446e !

Which distribution are you talking about ? I think debian stopped packaging fofix v3 due to the python version.

About your recipe, I encourage you to make some PR to our projects (or to the distribution you are talking about), to be able to validate them ;). It is better than a zip file.

Thanks for you future contributions.
My distro is Manjaro.

The zip is for my future self 😛

On Sun, Mar 21, 2021, 15:33 François Magimel ***@***.***>
wrote:

> Hi @es20490446e <https://github.com/es20490446e> !
>
> Which distribution are you talking about ? I think debian stopped
> packaging fofix v3 due to the python version.
> About your recipe, I encourage you to make some PR to our projects, to be
> able to validate them ;). It is better than a zip file.
>
> Thanks for you future contributions.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/fofix/fretwork/issues/57#issuecomment-803592608>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACJGLXBO7TYAQHH66PCHMX3TEX7SDANCNFSM4HUDKYAQ>
> .
>


Fix patch:
diff --git a/setup.py b/setup.py
index 590edca..b5213a3 100644
--- a/setup.py
+++ b/setup.py
@@ -200,8 +200,7 @@ def combine_info(*args):
 
 needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
 pytest_runner = [
-    "pytest-runner<5.3;python_version<'3.3'",
-    "pytest-runner;python_version>'3.3'",
+    "pytest-runner",
 ] if needs_pytest else []
 setup(
     name='fretwork',
@@ -220,10 +219,7 @@ def combine_info(*args):
         'Intended Audience :: Developers',
         'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
         'Topic :: Multimedia',
@@ -236,8 +232,6 @@ def combine_info(*args):
         "Cython>=0.29.2,<3.0",
         "Pygame<2.0",
         "PyOpenGL",
-        "numpy<1.17;python_version<'3.4'",
-        "numpy<1.20;python_version=='3.6'",
         "numpy;python_version>'3.6'",
     ],
     ext_modules=cythonize(mixstreamExt),


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 9e4c461..cb6b907 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -14,15 +14,15 @@ jobs:
     strategy:
       fail-fast: true
       matrix:
-        python-version: [3.6]
+        python-version: ['3.7']
         experimental: [false]
 
         include:
-          - python-version: 3.7
+          - python-version: '3.8'
             experimental: true
-          - python-version: 3.8
+          - python-version: '3.9'
             experimental: true
-          - python-version: 3.9
+          - python-version: '3.10'
             experimental: true
 
     steps:
@@ -60,7 +60,7 @@ jobs:
           SDL_AUDIODRIVER: dummy
 
       - name: Upload coverage
-        if: ${{ matrix.python-version == '3.6' }}
+        if: ${{ matrix.python-version == '3.7' }}
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |