Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): pin pytest + ASGI tutorial fixes #2233

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions docs/user/tutorial-asgi.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Loading