Skip to content

Commit

Permalink
chore(CI): pin pytest + ASGI tutorial fixes (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed May 7, 2024
1 parent e619c39 commit c4a5f32
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions docs/user/tutorial-asgi.rst
Expand Up @@ -180,13 +180,12 @@ We can now implement a basic async image store. Save the following code as
class Image:
def __init__(self, config, image_id, size):
self._config = config
self.image_id = image_id
self.size = size
self.modified = datetime.datetime.utcnow()
self.modified = datetime.datetime.now(datetime.timezone.utc)
@property
def path(self):
Expand All @@ -206,7 +205,6 @@ We can now implement a basic async image store. Save the following code as
class Store:
def __init__(self, config):
self._config = config
self._images = {}
Expand Down Expand Up @@ -272,7 +270,6 @@ of images. Place the code below in a file named ``images.py``:
class Images:
def __init__(self, config, store):
self._config = config
self._store = store
Expand Down
2 changes: 1 addition & 1 deletion examples/asgilook/asgilook/store.py
Expand Up @@ -13,7 +13,7 @@ def __init__(self, config, image_id, size):

self.image_id = image_id
self.size = size
self.modified = datetime.datetime.utcnow()
self.modified = datetime.datetime.now(datetime.timezone.utc)

@property
def path(self):
Expand Down
5 changes: 4 additions & 1 deletion requirements/tests
@@ -1,5 +1,8 @@
coverage >= 4.1
pytest
# TODO(vytas): Our use of testtools breaks under pytest 8.2 along the lines of
# https://github.com/pytest-dev/pytest/issues/12263, unpin when fixed
# (or drop support for testtools altogether?)
pytest >= 7.0, < 8.2
pyyaml
requests
# TODO(vytas): Check if testtools still brings anything to the table, and
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Expand Up @@ -435,7 +435,6 @@ commands =
# --------------------------------------------------------------------

[testenv:look]
basepython = python3.10
deps =
-r{toxinidir}/examples/look/requirements/test
commands =
Expand All @@ -446,7 +445,7 @@ commands =
# --------------------------------------------------------------------

[testenv:asgilook]
basepython = python3.10
basepython = python3.12
deps =
-r{toxinidir}/examples/asgilook/requirements/asgilook
-r{toxinidir}/examples/asgilook/requirements/test
Expand Down

0 comments on commit c4a5f32

Please sign in to comment.