Closed arogl closed 1 month ago
Hi @arogl 👋 thanks!
I think it's safe to say we should finally ditch 3.6 and 3.7
Please remove and then we'll let the workflows run and see what happens :-)
Hi @arogl 👋 thanks!
I think it's safe to say we should finally ditch 3.6 and 3.7
Please remove and then we'll let the workflows run and see what happens :-)
The build could also reference the 3.x from beets
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.x']
I did some fixes for our docs build, thus merged in master and resolving conflict here.
I'm not sure how we now should fix the issue that import enum
is not possible for older Python versions (3.8., 3.9.). Any idea @arogl ?
I did some fixes for our docs build, thus merged in master and resolving conflict here.
I'm not sure how we now should fix the issue that
import enum
is not possible for older Python versions (3.8., 3.9.). Any idea @arogl ?
@JOJ0 I think it will need to be a try/except, or test version >= 3.12.
@JOJ0 I am looking at the latest failure and my simple python searching shows I may need to duplicate the function, in an if-else wrapper due to the @enum.member
decorators not existing in versions of python before 3.12.
Thoughts?
@JOJ0 I am looking at the latest failure and my simple python searching shows I may need to duplicate the function, in an if-else wrapper due to the
@enum.member
decorators not existing in versions of python before 3.12.Thoughts?
@arogl @JOJ0 If I can chime in 🙂 You could try something like importing the enum.member in a try/except block and fallback to a "empty" decorator, this way you won't have to declare the function twice with if statements
try:
from enum import member
except ImportError:
member = no_op_decorator // this would be an decorator defined elsewhere that does nothing
@member
class By(Enum):
the no_op_decorator
could be declared in the utils.py file
def no_op_decorator():
pass
Note. this code isn't tested
Oh @AnssiAhola that sounds like a quite clean to read solution. Great idea. Give that a try @arogl
Let me think about where such a helper def should live...
Let me think about where such a helper def should live...
Could also just declare the empty decorator in the except
block? If python allows that.
This way it's not necessary to keep it in some random helper/utils file.
...
except ImportError:
def member():
pass
Seems like it still fails, because some arguments are being passed to the empty decorator. Hmm...
Maybe try adding *args and **kwargs as parameters.
def member(*args, **kwargs):
pass
Although that might still fail, because we need to return the function that is passed to the decorator 🤔 If that doesn't work try
def member(func):
return func
Sorry, not on my computer so cant test it myself, hence the trial and error 😅
Although that might still fail, because we need to return the function that is passed to the decorator 🤔 If that doesn't work try
def member(func): return func
Sorry, not on my computer so cant test it myself, hence the trial and error 😅
Second attempt ☹
Wohoo, we have a runner!
I'm just not sure what i could do about the kind of "hanging" build (3.6/3.7) CI checks. To trigger a re-run I'll now close and reopen the PR.
Ok I assume this is a bug. It should go away in future CI runs since we kicked out 3.6 and 3.7 build with this one.
Ok I assume this is a bug. It should go away in future CI runs since we kicked out 3.6 and 3.7 build with this one.
Yep, all green in master now :-)
Fixes #140
I did not want to drop earlier python versions.
The dateutil package is awaiting a maintainer release dateutil#1314