Skip to content

Commit 261b48d

Browse files
authored
fix: drop python 3.7 (#402)
1 parent 4578e7f commit 261b48d

25 files changed

+63
-79
lines changed

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ['3.7', '3.8', '3.9', '3.10']
11+
python: ['3.8', '3.9', '3.10']
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v3

CONTRIBUTING.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
25+
3.8, 3.9 and 3.10 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -221,12 +221,10 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.7`_
225224
- `Python 3.8`_
226225
- `Python 3.9`_
227226
- `Python 3.10`_
228227

229-
.. _Python 3.7: https://docs.python.org/3.7/
230228
.. _Python 3.8: https://docs.python.org/3.8/
231229
.. _Python 3.9: https://docs.python.org/3.9/
232230
.. _Python 3.10: https://docs.python.org/3.10/
@@ -237,7 +235,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
237235
.. _config: https://github.com/googleapis/python-pubsublite/blob/main/noxfile.py
238236

239237

240-
We also explicitly decided to support Python 3 beginning with version 3.7.
238+
We also explicitly decided to support Python 3 beginning with version 3.8.
241239
Reasons for this include:
242240

243241
- Encouraging use of newest versions of Python 3

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ Code samples and snippets live in the `samples/` folder.
6969
Supported Python Versions
7070
^^^^^^^^^^^^^^^^^^^^^^^^^
7171
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
72-
Python.
72+
Python, excluding python 3.7.
7373

74-
Python >= 3.7
74+
Python >= 3.8
7575

7676
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
7777
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
7878

7979
Unsupported Python Versions
8080
^^^^^^^^^^^^^^^^^^^^^^^^^^^
81-
Python <= 3.6
81+
Python <= 3.7
8282

8383
If you are using an `end-of-life`_
8484
version of Python, we recommend that you update as soon as possible to an actively supported version.

google/cloud/pubsublite/testing/test_reset_signal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from asynctest.mock import MagicMock
15+
from unittest.mock import MagicMock
1616
from google.api_core.exceptions import Aborted, GoogleAPICallError
1717
from google.protobuf.any_pb2 import Any # pytype: disable=pyi-error
1818
from google.rpc.error_details_pb2 import ErrorInfo

google/cloud/pubsublite/testing/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import threading
1717
from typing import List, Union, Any, TypeVar, Generic, Optional, Callable, Awaitable
1818

19-
from asynctest import CoroutineMock
19+
from unittest.mock import AsyncMock
2020

2121
T = TypeVar("T")
2222

@@ -55,7 +55,7 @@ def __init__(self):
5555
self.results = asyncio.Queue()
5656

5757

58-
def wire_queues(mock: CoroutineMock) -> QueuePair:
58+
def wire_queues(mock: AsyncMock) -> QueuePair:
5959
queues = QueuePair()
6060
mock.side_effect = make_queue_waiter(queues.called, queues.results)
6161
return queues

noxfile.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232

3333
DEFAULT_PYTHON_VERSION = "3.8"
3434

35-
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
35+
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10"]
3636
UNIT_TEST_STANDARD_DEPENDENCIES = [
3737
"mock",
3838
"asyncmock",
3939
"pytest",
4040
"pytest-cov",
4141
"pytest-asyncio",
4242
]
43-
UNIT_TEST_EXTERNAL_DEPENDENCIES = [
44-
"asynctest",
45-
]
43+
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
4644
UNIT_TEST_LOCAL_DEPENDENCIES = []
4745
UNIT_TEST_DEPENDENCIES = []
4846
UNIT_TEST_EXTRAS = []
@@ -54,9 +52,7 @@
5452
"pytest",
5553
"google-cloud-testutils",
5654
]
57-
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [
58-
"asynctest",
59-
]
55+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = []
6056
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
6157
SYSTEM_TEST_DEPENDENCIES = []
6258
SYSTEM_TEST_EXTRAS = []

owlbot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@
6161
templated_files = gcp.CommonTemplates().py_library(
6262
cov_level=96,
6363
microgenerator=True,
64-
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10"],
65-
system_test_external_dependencies=["asynctest"],
66-
unit_test_external_dependencies=["asynctest"],
64+
unit_test_python_versions=["3.8", "3.9", "3.10"],
6765
versions=gcp.common.detect_versions(path="./google", default_first=True),
6866
)
6967
s.move(
@@ -73,6 +71,7 @@
7371
".github/release-please.yml",
7472
"docs/multiprocessing.rst",
7573
"docs/index.rst",
74+
"README.rst",
7675
],
7776
)
7877

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
"License :: OSI Approved :: Apache Software License",
7676
"Programming Language :: Python",
7777
"Programming Language :: Python :: 3",
78-
"Programming Language :: Python :: 3.7",
7978
"Programming Language :: Python :: 3.8",
8079
"Programming Language :: Python :: 3.9",
8180
"Programming Language :: Python :: 3.10",
@@ -84,7 +83,7 @@
8483
],
8584
platforms="Posix; MacOS X; Windows",
8685
packages=packages,
87-
python_requires=">=3.7",
86+
python_requires=">=3.8",
8887
namespace_packages=namespaces,
8988
install_requires=dependencies,
9089
include_package_data=True,

testing/constraints-3.7.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

testing/constraints-3.8.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# -*- coding: utf-8 -*-
2-
# This constraints file is required for unit tests.
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
33
# List all library dependencies and extras in this file.
4-
google-api-core
5-
proto-plus
6-
protobuf
4+
# Pin the version to the lower bound.
5+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
6+
# Then this file should have google-cloud-foo==1.14.0
7+
google-cloud-pubsub==2.10.0
8+
grpcio==1.38.1
9+
grpcio-status==1.38.1
10+
overrides==6.0.1
11+
google-api-core==1.33.2

0 commit comments

Comments
 (0)