Skip to content

Commit

Permalink
Drop support for Python 3.7 (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHjelmare authored Feb 13, 2023
1 parent e0c5b3a commit 086c132
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4.5.0
with:
python-version: "3.7"
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: "3.8"
install:
- requirements: docs/requirements.txt
- path: .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Control Leica microscopes with python

## Installation

- **The latest version of leicacam requires Python 3.7+**
- **The latest version of leicacam requires Python 3.8+**
- If you need to keep using Python 2.7, pin your version of leicacam to 0.3.0.

Install using `pip`:
Expand Down
1 change: 0 additions & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
asynctest==0.13.0
pytest==7.2.1
pytest-asyncio==0.20.3
pytest-cov==4.0.0
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
url="https://github.com/MartinHjelmare/leicacam",
packages=find_packages(exclude=["test", "test.*"]),
include_package_data=True,
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=["async_timeout", "pydebug"],
license="MIT",
zip_safe=False,
Expand All @@ -33,7 +33,6 @@
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
13 changes: 7 additions & 6 deletions test/test_async_cam.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests for async cam module."""
from unittest.mock import AsyncMock, Mock, patch

import pytest
from asynctest.mock import CoroutineMock, Mock, patch

from leicacam.async_cam import AsyncCAM
from leicacam.cam import bytes_as_dict, tuples_as_dict
Expand Down Expand Up @@ -35,8 +36,8 @@ def mock_writer(mock_connection):
"""Mock an asyncio connection writer."""
writer = Mock()
writer.write = mock_connection.write
writer.drain = CoroutineMock()
writer.wait_closed = CoroutineMock()
writer.drain = AsyncMock()
writer.wait_closed = AsyncMock()
yield writer


Expand All @@ -45,9 +46,9 @@ def mock_reader(mock_connection):
"""Mock an asyncio connection reader."""
reader = Mock()
reader.read = mock_connection.read
reader.read_line = CoroutineMock()
reader.readexactly = CoroutineMock()
reader.readuntil = CoroutineMock()
reader.read_line = AsyncMock()
reader.readexactly = AsyncMock()
reader.readuntil = AsyncMock()
yield reader


Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[tox]
envlist = py37, py38, py39, py310, lint, docs
envlist = py38, py39, py310, lint, docs
skip_missing_interpreters = True

[gh-actions]
python =
3.7: py37, docs, lint
3.8: py38
3.8: py38, docs, lint
3.9: py39
3.10: py310

Expand Down

0 comments on commit 086c132

Please sign in to comment.