Skip to content

Commit

Permalink
Remove Python 3.7 support (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo authored Aug 31, 2023
2 parents ee84c63 + 93ffc11 commit 746bd4b
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
testLinux:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"]
runs-on: ubuntu-latest
steps:
- name: Python Setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
architecture: x64
- name: Install Packages (brew)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
architecture: x64
- name: Checkout Source
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ documentation.

## Implementation

novelWriter is written with Python 3 (3.7+) using Qt5 and PyQt5 (5.10+), and is released on Linux,
novelWriter is written with Python 3 (3.8+) using Qt5 and PyQt5 (5.10+), and is released on Linux,
Windows and macOS. It can in principle run on any Operating System that also supports Qt, PyQt and
Python.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/int_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Installing Python on Windows
In order to run novelWriter from source, or install from PyPi, you need to have Python set up on
your system. Unlike Linux and MacOS, Windows does not come with Python pre-installed.

You can download Python from `python.org`_. Python 3.7 or higher is required for running
You can download Python from `python.org`_. Python 3.8 or higher is required for running
novelWriter, but it is recommended that you install the latest version.

Make sure you select the "Add Python to PATH" option during installation, otherwise the ``python``
Expand Down
4 changes: 2 additions & 2 deletions novelwriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ def main(sysArgs: list | None = None):
# Check Packages and Versions
errorData = []
errorCode = 0
if sys.hexversion < 0x030700f0:
if sys.hexversion < 0x030800f0:
errorData.append(
"At least Python 3.7 is required, found %s" % CONFIG.verPyString
"At least Python 3.8 is required, found %s" % CONFIG.verPyString
)
errorCode |= 0x04
if CONFIG.verQtValue < 0x050a00:
Expand Down
8 changes: 2 additions & 6 deletions novelwriter/core/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,8 @@ def deleteDocument(self) -> bool:
docTemp = docPath.with_suffix(".tmp")

try:
# ToDo: When Python 3.7 is dropped, these can be changed to
# path.unlink(missing_ok=True)
if docPath.exists():
docPath.unlink()
if docTemp.exists():
docTemp.unlink()
docPath.unlink(missing_ok=True)
docTemp.unlink(missing_ok=True)
except Exception as exc:
self._docError = formatException(exc)
return False
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ license_files = LICENSE.md
license = GNU General Public License v3
classifiers =
Programming Language :: Python :: 3 :: Only
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
Programming Language :: Python :: Implementation :: CPython
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Development Status :: 5 - Production/Stable
Expand All @@ -30,7 +30,7 @@ project_urls =

[options]
zip_safe = False
python_requires = >=3.7
python_requires = >=3.8
include_package_data = True
packages = find_namespace:
install_requires =
Expand Down
6 changes: 3 additions & 3 deletions setup/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Source: novelwriter
Maintainer: Veronica Berglyd Olsen <[email protected]>
Section: text
Priority: optional
Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), python3 (>=3.7), python3-pyqt5 (>= 5.10), python3-enchant (>= 2.0)
Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), python3 (>=3.8), python3-pyqt5 (>= 5.10), python3-enchant (>= 2.0)
Standards-Version: 4.5.1
Homepage: https://novelwriter.io
X-Python3-Version: >= 3.7
X-Python3-Version: >= 3.8

Package: novelwriter
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>=3.7), python3-pyqt5 (>= 5.10), python3-enchant (>= 2.0)
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>=3.8), python3-pyqt5 (>= 5.10), python3-enchant (>= 2.0)
Description: A markdown-like text editor for planning and writing novels
novelWriter is a plain text editor designed for writing novels assembled from
many smaller text documents. It uses a minimal formatting syntax inspired by
Expand Down
2 changes: 1 addition & 1 deletion setup/description_pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ synchronisation tools. All text is saved as plain text files with a meta data he
project structure is stored in a single project XML file, and other meta data is primarily saved as
JSON files.

The application is written with Python 3 (3.7+) using Qt5 and PyQt5 (5.3+). It is developed on
The application is written with Python 3 (3.8+) using Qt5 and PyQt5 (5.3+). It is developed on
Linux, but should in principle work fine on other operating systems as well as long as dependencies
are met. It is regularly tested on Debian and Ubuntu Linux, Windows, and macOS.

Expand Down
2 changes: 1 addition & 1 deletion setup/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ rm Miniconda3-latest-MacOSX-x86_64.sh
export PATH="$HOME/miniconda/bin:$PATH"

echo "Creating Conda env ..."
conda create -n novelWriter -c conda-forge python=3.10 --yes
conda create -n novelWriter -c conda-forge python=3.11 --yes
source activate novelWriter

echo "Installing dictionaries ..."
Expand Down

0 comments on commit 746bd4b

Please sign in to comment.