Skip to content

Commit

Permalink
Drop support for Python v3.6 (and EPEL8)
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Jul 6, 2024
1 parent 6733953 commit 0f99f5f
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pkgbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# items within the `services` section of `docker-compose.yml`.
matrix:
target: [
"rpmbuild.el8",
"rpmbuild.el9",
]

defaults:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ jobs:
python-version: "3.11"

# Test more available versions of CPython on Linux.
- os: "ubuntu-20.04"
# v3.6 (exclusively referenced) is not supported by GitHub anymore)
# v3.6.8 is fixed since it is the version CentOS/Rocky/RedHat v8 uses
python-version: "3.6.8"
- os: "ubuntu-latest"
python-version: "3.7"
- os: "ubuntu-latest"
Expand Down
64 changes: 0 additions & 64 deletions Dockerfile.el8

This file was deleted.

45 changes: 0 additions & 45 deletions Dockerfile.py36

This file was deleted.

9 changes: 2 additions & 7 deletions apprise/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,13 +1518,8 @@ def environ(*remove, **update):
finally:
# Restore our snapshot
os.environ = env_orig.copy()
try:
# Restore locale
locale.setlocale(locale.LC_ALL, loc_orig)

except locale.Error:
# Thrown in py3.6
pass
# Restore locale
locale.setlocale(locale.LC_ALL, loc_orig)


def apply_template(template, app_mode=TemplateType.RAW, **kwargs):
Expand Down
3 changes: 0 additions & 3 deletions bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ export PATH="$(pwd)/bin:$PATH"

Apprise is also packaged for Redhat/Fedora as an RPM. To verify this processs works correctly an additional tool called `build-rpm.sh` is provided. It's best tested using the Docker environments:
```bash
# To test with el8; do the following:
docker-compose run --rm rpmbuild.el8 build-rpm.sh
# To test with el9; do the following:
docker-compose run --rm rpmbuild.el9 build-rpm.sh
Expand Down
19 changes: 5 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
version: "3.3"
services:
test.py36:
build:
context: .
dockerfile: Dockerfile.py36
volumes:
- ./:/apprise

test.py310:
build:
context: .
Expand Down Expand Up @@ -75,20 +68,20 @@ services:
# Other Testing
#
# Connect to web and create a new project using the manage script
# -> docker-compose run --rm test.py36 bash
# -> docker-compose run --rm test.py311 bash
# bin/apprise -
# bin/checkdone.sh
#
# Run a set of tests for just a certain section
# docker-compose run --rm test.py36 bin/test.sh fcm
# docker-compose run --rm test.py311 bin/test.sh fcm
#
# Or just run all the tests in python 3.6
# docker-compose run --rm test.py36 bin/test.sh
# Or just run all the tests in python 3.11
# docker-compose run --rm test.py311 bin/test.sh
#
# Want to run the whole test suite:
#
# [ -f .coverage ] && rm -f .coverage
# docker-compose run --rm test.py36 coverage run --append -m pytest -vv
# docker-compose run --rm test.py311 coverage run --append -m pytest -vv
# docker-compose run --rm test.py310 coverage run --append -m pytest -vv
#
# # Now produce a report
Expand All @@ -98,8 +91,6 @@ services:
# RPM Building
#

# el8
# - docker-compose run --rm rpmbuild.el8 build-rpm.sh
# el9
# - docker-compose run --rm rpmbuild.el9 build-rpm.sh
# f39 (Fedora)
Expand Down
12 changes: 6 additions & 6 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
This directory contains any supporting files to grant usage of Apprise in various distributions.

### RPM Based Packages
* [EPEL](https://fedoraproject.org/wiki/EPEL) based distributions are only supported if they are of v8 or higher. This includes:
* Red Hat 8.x (or higher)
* Scientific OS 8.x (or higher)
* Oracle Linux 8.x (or higher)
* Rocky Linux 8.x (or higher)
* Alma Linux 8.x (or higher)
* [EPEL](https://fedoraproject.org/wiki/EPEL) based distributions are only supported if they are of v9 or higher. This includes:
* Red Hat 9.x (or higher)
* Scientific OS 9.x (or higher)
* Oracle Linux 9.x (or higher)
* Rocky Linux 9.x (or higher)
* Alma Linux 9.x (or higher)
* Fedora 29 (or higher)

Provided you are connected to the [EPEL repositories](https://fedoraproject.org/wiki/EPEL), the following will just work for you:
Expand Down
39 changes: 0 additions & 39 deletions packaging/redhat/apprise-click67-support.patch

This file was deleted.

15 changes: 0 additions & 15 deletions packaging/redhat/apprise-no-macosx-testing.patch

This file was deleted.

29 changes: 0 additions & 29 deletions packaging/redhat/apprise-pytest-session_mocker-removal.patch

This file was deleted.

44 changes: 0 additions & 44 deletions packaging/redhat/python-apprise.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,6 @@ Summary: A simple wrapper to many popular notification services used toda
License: BSD
URL: https://github.com/caronc/%{pypi_name}
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz

# RHEL/Rocky 8 ship with Click v6.7 which does not support the .stdout
# directive used in the unit testing. This patch just makes it so our package
# continues to be compatible with these linux distributions
Patch0: %{pypi_name}-click67-support.patch

# RHEL/Rocky 8 ship with Pytest v3.4.2 which does not support the
# session_mocker fixture. This patch removes the session_mocker
# Patch thanks to Andreas Motl and his PR:
# - https://github.com/caronc/apprise/pull/763
Patch1: %{pypi_name}-pytest-session_mocker-removal.patch

# RHEL/Rocky 8 ship with Pytest v3.4.2 which does not support the
# tmp_path fixture. This patch removes the macos testing as it
# leverages this unavailabe fixture.
# At the end of the day, the macos testing it is not needed by a
# RHEL/Fedora environment anyway for obvious reasons.
Patch2: %{pypi_name}-no-macosx-testing.patch

BuildArch: noarch

%description %{common_description}
Expand Down Expand Up @@ -119,18 +100,9 @@ Requires: python%{python3_pkgversion}-certifi
Requires: python%{python3_pkgversion}-yaml
Recommends: python%{python3_pkgversion}-paho-mqtt

%if 0%{?rhel} && 0%{?rhel} <= 8
BuildRequires: python%{python3_pkgversion}-dataclasses
Requires: python%{python3_pkgversion}-dataclasses
%endif

%if %{with tests}
%if 0%{?rhel} >= 9
# Do not import python3-mock
%else
# python-mock switched to unittest.mock
BuildRequires: python%{python3_pkgversion}-mock
%endif
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-mock
BuildRequires: python%{python3_pkgversion}-pytest-runner
Expand All @@ -142,14 +114,6 @@ BuildRequires: python%{python3_pkgversion}-pytest-xdist

%prep
%setup -q -n %{pypi_name}-%{version}
%if 0%{?rhel} && 0%{?rhel} <= 8
# Rocky/RHEL 8 click v6.7 unit testing support
%patch0 -p1
# Rocky/RHEL 8 Drop session_mocker support
%patch1 -p1
# Rocky/RHEL 8 Lose MacOSX Testing
%patch2 -p1
%endif

# 2023.08.27: This test fails for some uknown reason only during the test
# section of this RPM, but works completley fine under all other circumstances.
Expand All @@ -161,14 +125,6 @@ BuildRequires: python%{python3_pkgversion}-pytest-xdist
# at this time; remove failing test until this is resolved
%{__rm} test/test_apprise_translations.py

%if 0%{?rhel} >= 9
# Do nothing
%else
# CentOS 8.x requires python-mock (cororlates with import ab)ve
find test -type f -name '*.py' -exec \
sed -i -e 's|^from unittest import mock|import mock|g' {} \;
%endif

%build
%py3_build

Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Root certificate authority bundle.
# Root certificate authority bundle
certifi

# Application dependencies.
dataclasses; python_version<"3.7"
# Application dependencies
requests
requests-oauthlib
click >= 5.0
Expand Down
Loading

0 comments on commit 0f99f5f

Please sign in to comment.