Skip to content

Commit

Permalink
Cleanup EOL Python versions to fix build (#30)
Browse files Browse the repository at this point in the history
* 💚 drop 2.7, 3.5, 3.6 as ubuntu-latest does not support them anymore and they are EOL

update setup.py accordingly

* ⚰️ cleanup imports after commit eb0cc7d

* 🎨 reformat logger line for line length and rename path variable to avoid shadowing

* addendum to 1cc3e04

* 💚 Fix build.yml to the with python 3.10 instead of 3.1

* 👷 update actions versions to most recent major versions

* because node version in setup-python was deprecated
  • Loading branch information
pokulo authored Sep 15, 2024
1 parent f68e862 commit 28a03cc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install .
Expand Down
17 changes: 6 additions & 11 deletions podcats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
from urllib.parse import quote
from xml.sax.saxutils import escape, quoteattr

try:
from urllib.request import pathname2url
except ImportError:
# For python 2
# noinspection PyUnresolvedReferences
from urllib import pathname2url

import mutagen
import humanize
from mutagen.id3 import ID3
Expand Down Expand Up @@ -63,7 +56,9 @@ def __init__(self, filename, relative_dir, root_url):
self.tags = mutagen.File(self.filename, easy=True) or {}
except HeaderNotFoundError as err:
self.tags = {}
logger.warning("Could not load tags of file {filename} due to: {err!r}".format(filename=self.filename, err=err))
logger.warning(
"Could not load tags of file {filename} due to: {err!r}".format(filename=self.filename, err=err)
)

try:
self.id3 = ID3(self.filename)
Expand Down Expand Up @@ -124,9 +119,9 @@ def get_tag(self, name):

def _to_url(self, filepath):
fn = os.path.basename(filepath)
path = STATIC_PATH + '/' + self.relative_dir + '/' + fn
path = re.sub(r'//', '/', path)
url = self.root_url + quote(path, errors="surrogateescape")
path_ = STATIC_PATH + '/' + self.relative_dir + '/' + fn
path_ = re.sub(r'//', '/', path_)
url = self.root_url + quote(path_, errors="surrogateescape")
return url

@property
Expand Down
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ def _get_long_description():

setup(
name='podcats',
version='0.6.3',
version='0.7.0',
description=('An application that generates RSS feeds for podcast '
'episodes from local audio files and, optionally, '
'exposes both via a built-in web server'),
long_description=_get_long_description(),
url='https://github.com/jakubroztocil/podcats',
download_url='https://github.com/jakubroztocil/podcats',
url='https://github.com/jkbrzt/podcats',
download_url='https://github.com/jkbrzt/podcats',
author='Jakub Roztocil',
author_email='[email protected]',
license='BSD',
Expand All @@ -37,8 +37,12 @@ def _get_long_description():
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Environment :: Console',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: BSD License',
Expand Down

0 comments on commit 28a03cc

Please sign in to comment.