Skip to content

Commit 5407f7c

Browse files
committed
Enforce Python 3.6 or greater for async
1 parent 6e288e8 commit 5407f7c

File tree

7 files changed

+292
-347
lines changed

7 files changed

+292
-347
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pytest-cov = "*"
1111
rope = "*"
1212
mygeotab = {editable = true,path = "."}
1313
mypy = {markers = "python_version >= '3.5'",version = "*"}
14-
pytest-asyncio = {markers = "python_version >= '3.5'",version = "*"}
14+
pytest-asyncio = {markers = "python_version >= '3.6'",version = "*"}
1515
sphinx = {markers = "python_version >= '3'",version = "*"}
1616
sphinx-rtd-theme = {markers = "python_version >= '3'",version = "*"}
1717
black = {markers = "python_version >= '3.6'",version = "*"}

Pipfile.lock

Lines changed: 284 additions & 339 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ It's very easy to get started once you've registered a `MyGeotab <https://www.ge
6060
# 'idleMinutes': 3.0,
6161
# ......
6262
63-
If you're using Python 3.5 and higher, you can also make calls asynchronously via `asyncio <https://docs.python.org/3/library/asyncio.html>`__:
63+
If you're using Python 3.6 and higher, you can also make calls asynchronously via `asyncio <https://docs.python.org/3/library/asyncio.html>`__:
6464

6565
.. code-block:: python
6666

mygeotab/py3/api_async.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
mygeotab.py3.api_async
55
~~~~~~~~~~~~~~~~~~~~~~
66
7-
Async/Await-able (Python 3.5+) public objects and methods wrapping the MyGeotab API.
7+
Async/Await-able (Python 3.6+) public objects and methods wrapping the MyGeotab API.
88
"""
99

1010
import asyncio
1111
import sys
1212

13-
if sys.version_info < (3, 5):
14-
raise Exception("Python 3.5+ is required to use the async API")
13+
if sys.version_info < (3, 6):
14+
raise Exception("Python 3.6+ is required to use the async API")
1515
import ssl
1616
from concurrent.futures import TimeoutError
1717

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
raise RuntimeError("This package requres Python 2.7.9+")
2727

2828
packages = ["mygeotab", "mygeotab.ext"]
29-
if py_version >= (3, 5, 0):
29+
if py_version >= (3, 6, 0):
3030
packages.append("mygeotab.async") # Deprecated
3131
packages.append("mygeotab.py3")
3232

tests/test_api_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
USERNAME = os.environ.get("MYGEOTAB_USERNAME_ASYNC", USERNAME)
2626
PASSWORD = os.environ.get("MYGEOTAB_PASSWORD_ASYNC", PASSWORD)
2727

28-
pytestmark = pytest.mark.skipif(sys.version_info < (3, 5), reason="Only testing API on Python 3.5")
28+
pytestmark = pytest.mark.skipif(sys.version_info < (3, 6), reason="Only testing API on Python 3.6")
2929

3030

3131
@pytest.fixture(scope="session")

tests/test_api_performance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def mock_api():
1717

1818
@pytest.mark.skip("Too slow to run automatically")
1919
class TestApiPerformance:
20-
@pytest.mark.skipif(sys.version_info < (3, 5), reason="Requires Python 3.5 or higher")
20+
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Requires Python 3.6 or higher")
2121
def test_timeout_large_json_rapidjson(self, mock_api, datadir, benchmark):
2222
server = "https://example.com/apiv1"
2323
json_response = (datadir / "big_nested_date_response.json").read_text()

0 commit comments

Comments
 (0)