Skip to content

Commit

Permalink
Drop support for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Oct 10, 2023
1 parent 0b4ad04 commit 324cf7e
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.8', '3.10']
PYTHON_VERSION: ['3.9', '3.10']
timeout-minutes: 30
steps:
- name: Checkout Pull Requests
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
INSTALL_TYPE: ['pip', 'conda']
PYTHON_VERSION: ['3.8', '3.10']
TEST_TYPE: ['fast', 'slow']
exclude:
# Only test Python 3.8 with pip because Conda-forge will drop it soon
- INSTALL_TYPE: 'conda'
PYTHON_VERSION: '3.8'
timeout-minutes: 90
steps:
- name: Checkout Pull Requests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ to install them separately in those cases.
### Build dependencies

When installing Spyder from its source package, the only requirement is to have
a Python version equal or greater than 3.7.
a Python version equal or greater than 3.8.

### Runtime dependencies

The basic dependencies to run Spyder are:

* **Python** 3.7+: The core language Spyder is written in and for.
* **Python** 3.8+: The core language Spyder is written in and for.
* **PyQt5** 5.9+: Python bindings for Qt, used for Spyder's GUI.

The rest our dependencies (both required and optional) are declared in
Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cookiecutter >=1.6.0
- diff-match-patch >=20181111
- intervaltree >=3.0.2
- ipython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0,!=8.11.0,!=8.12.0,!=8.12.1
- ipython >=8.13.0,<9.0.0
- jedi >=0.17.2,<0.20.0
- jellyfish >=0.7
- jsonschema >=3.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- cookiecutter >=1.6.0
- diff-match-patch >=20181111
- intervaltree >=3.0.2
- ipython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0,!=8.11.0,!=8.12.0,!=8.12.1
- ipython >=8.13.0,<9.0.0
- jedi >=0.17.2,<0.20.0
- jellyfish >=0.7
- jsonschema >=3.2.0
Expand Down
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
# Taken from the notebook setup.py -- Modified BSD License
# =============================================================================
v = sys.version_info
if v[0] >= 3 and v[:2] < (3, 7):
error = "ERROR: Spyder requires Python version 3.7 and above."
if v[0] >= 3 and v[:2] < (3, 8):
error = "ERROR: Spyder requires Python version 3.8 and above."
print(error, file=sys.stderr)
sys.exit(1)

Expand Down Expand Up @@ -180,16 +180,18 @@ def run(self):
package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST)},
scripts=[osp.join('scripts', fname) for fname in SCRIPTS],
data_files=get_data_files(),
python_requires='>=3.7',
python_requires='>=3.8',
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'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',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
Expand All @@ -209,7 +211,8 @@ def run(self):
'cookiecutter>=1.6.0',
'diff-match-patch>=20181111',
'intervaltree>=3.0.2',
'ipython>=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0,!=8.11.0,!=8.12.0,!=8.12.1',
'ipython>=8.12.2,<8.13.0; python_version=="3.8"',
'ipython>=8.13.0,<9.0.0; python_version>"3.8"',
'jedi>=0.17.2,<0.20.0',
'jellyfish>=0.7',
'jsonschema>=3.2.0',
Expand Down
3 changes: 0 additions & 3 deletions spyder/app/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
# Time to wait for the completion services to be up or give a response
COMPLETION_TIMEOUT = 30000

# Python 3.7
PY37 = sys.version_info[:2] == (3, 7)


# =============================================================================
# ---- Auxiliary functions
Expand Down
3 changes: 1 addition & 2 deletions spyder/app/tests/spyder-boilerplate/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
author_email="spyder.python@gmail.com",
description="Plugin that registers a programmatic custom layout",
license="MIT license",
python_requires='>= 3.7',
python_requires='>= 3.8',
install_requires=[
"qtpy",
"qtawesome",
Expand All @@ -36,7 +36,6 @@
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Development Status :: 5 - Production/Stable",
Expand Down
4 changes: 1 addition & 3 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from spyder.app.tests.conftest import (
COMPILE_AND_EVAL_TIMEOUT, COMPLETION_TIMEOUT, EVAL_TIMEOUT,
find_desired_tab_in_window, LOCATION, open_file_in_editor,
preferences_dialog_helper, PY37, read_asset_file, reset_run_code,
preferences_dialog_helper, read_asset_file, reset_run_code,
SHELL_TIMEOUT, start_new_kernel)
from spyder.config.base import (
get_home_dir, get_conf_path, get_module_path, running_in_ci)
Expand Down Expand Up @@ -2727,7 +2727,6 @@ def test_preferences_checkboxes_not_checked_regression(main_window, qtbot):
False)


@pytest.mark.skipif(PY37, reason="Segfaults too much on Python 3.7")
def test_preferences_change_font_regression(main_window, qtbot):
"""
Test for spyder-ide/spyder/#10284 regression.
Expand Down Expand Up @@ -3295,7 +3294,6 @@ def test_runcell_pdb(main_window, qtbot):

@flaky(max_runs=3)
@pytest.mark.parametrize("debug", [False, True])
@pytest.mark.skipif(PY37, reason="Segfaults too much on Python 3.7")
def test_runcell_cache(main_window, qtbot, debug):
"""Test the runcell command cache."""
# Write code with a cell to a file
Expand Down
8 changes: 6 additions & 2 deletions spyder/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
from spyder.config.base import _, is_pynsist, running_in_ci, running_in_mac_app
from spyder.utils import programs


HERE = osp.dirname(osp.abspath(__file__))

# Python 3.8
PY38 = sys.version_info[:2] == (3, 8)


# =============================================================================
# Kind of dependency
# =============================================================================
Expand All @@ -38,8 +43,7 @@
# None for pynsist install for now
# (check way to add dist.info/egg.info from packages without wheels available)
INTERVALTREE_REQVER = None if is_pynsist() else '>=3.0.2'
IPYTHON_REQVER = (
">=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0,!=8.11.0,!=8.12.0,!=8.12.1")
IPYTHON_REQVER = ">=8.12.2,<8.13.0" if PY38 else ">=8.13.0,<9.0.0"
JEDI_REQVER = '>=0.17.2,<0.20.0'
JELLYFISH_REQVER = '>=0.7'
JSONSCHEMA_REQVER = '>=3.2.0'
Expand Down
4 changes: 3 additions & 1 deletion spyder/tests/test_dependencies_in_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
import os.path as osp

# Third party imports
import pytest
import yaml

# Local imports
from spyder.dependencies import DESCRIPTIONS, OPTIONAL
from spyder.dependencies import DESCRIPTIONS, OPTIONAL, PY38

# Constants
HERE = osp.abspath(osp.dirname(__file__))
Expand Down Expand Up @@ -187,6 +188,7 @@ def test_dependencies_for_binder_in_sync():
assert spyder_env == full_reqs


@pytest.mark.skipif(PY38, reason="Fails in Python 3.8")
def test_dependencies_for_spyder_dialog_in_sync():
"""
Spyder dependencies dialog should share deps with main.yml.
Expand Down

0 comments on commit 324cf7e

Please sign in to comment.