diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 168c28664..908d85e33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.12 cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies @@ -67,7 +67,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.12 cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies diff --git a/demos/blog/aiohttpdemo_blog/db.py b/demos/blog/aiohttpdemo_blog/db.py index d81238331..faf188414 100644 --- a/demos/blog/aiohttpdemo_blog/db.py +++ b/demos/blog/aiohttpdemo_blog/db.py @@ -1,6 +1,7 @@ -from datetime import datetime +from datetime import datetime, UTC +from functools import partial -from sqlalchemy import ForeignKey, String +from sqlalchemy import DateTime, ForeignKey, String from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine from sqlalchemy.orm import ( DeclarativeBase, @@ -36,7 +37,7 @@ class Posts(Base): id: Mapped[int] = mapped_column(primary_key=True) body: Mapped[str] = mapped_column(String(140)) - timestamp: Mapped[datetime] = mapped_column(index=True, default=datetime.utcnow) + timestamp: Mapped[datetime] = mapped_column(DateTime(timezone=True), index=True, default=partial(datetime.now, UTC)) user_id: Mapped[int] = mapped_column(ForeignKey("users.id")) user: Mapped[Users] = relationship(back_populates="posts", lazy="raise_on_sql") diff --git a/demos/imagetagger/requirements.txt b/demos/imagetagger/requirements.txt index a44bc39e3..0d2fe7e6d 100644 --- a/demos/imagetagger/requirements.txt +++ b/demos/imagetagger/requirements.txt @@ -2,5 +2,5 @@ aiohttp==3.10.10 aiohttp-jinja2==1.6 keras==3.6.0 Pillow==11.0.0 -tensorflow==2.16.1 +tensorflow==2.18 trafaret_config==2.0.2 diff --git a/demos/motortwit/motortwit/views.py b/demos/motortwit/motortwit/views.py index e64eb50e5..074389242 100644 --- a/demos/motortwit/motortwit/views.py +++ b/demos/motortwit/motortwit/views.py @@ -180,5 +180,5 @@ async def add_message(self, request): 'email': user['email'], 'username': user['username'], 'text': form['text'], - 'pub_date': datetime.datetime.utcnow()}) + 'pub_date': datetime.datetime.now(datetime.UTC)}) return redirect(request, 'timeline')