Skip to content

Commit

Permalink
Remove support for Python 3.8 and 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
peytondmurray committed Nov 12, 2024
1 parent 4843280 commit 8157f0a
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test_conda_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
working-directory: conda-store
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4

- name: "Set up Python 🐍"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version-file: .python-version-default
cache: "pip"

- name: "Install Dependencies 📦"
Expand All @@ -56,7 +56,7 @@ jobs:
- name: "Deploy docker compose 🏗️"
run: |
docker compose up -d
python_version=${{ matrix.python-version }} docker compose up --build -d
docker ps
wait-for-it localhost:5432 # postgresql
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_conda_store_server_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
test-type: ["playwright", "integration", "user-journey"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -el {0}
Expand All @@ -57,7 +57,7 @@ jobs:
- name: "Deploy docker compose 🏗️"
run: |
docker compose up -d
python_version=${{ matrix.python-version }} docker compose up --build -d
docker ps
wait-for-it localhost:5432 # postgresql
Expand Down
7 changes: 4 additions & 3 deletions conda-store-server/conda_store_server/_internal/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import os
import re
import sys
from typing import Any, Callable, Dict, List, Optional, Union
from collections.abc import Callable
from typing import Any, Dict, List, Optional, TypeAlias, Union

from conda_lock.lockfile.v1.models import Lockfile
from pydantic import BaseModel, Field, ValidationError, constr, validator
Expand Down Expand Up @@ -36,7 +37,7 @@ def _datetime_factory(offset: datetime.timedelta):
# Authentication Schema
#########################

RoleBindings = Dict[constr(regex=ARN_ALLOWED), List[str]]
RoleBindings: TypeAlias = Dict[constr(regex=ARN_ALLOWED), List[str]]


class Permissions(enum.Enum):
Expand Down Expand Up @@ -129,7 +130,7 @@ class Config:

@classmethod
def from_list(cls, lst):
return cls(**{k: v for k, v in zip(cls.__fields__.keys(), lst)})
return cls(**{k: v for k, v in zip(cls.__fields__.keys(), lst, strict=False)})


class Namespace(BaseModel):
Expand Down
8 changes: 5 additions & 3 deletions conda-store-server/conda_store_server/_internal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import subprocess
import sys
import time
from typing import Tuple
from typing import AnyStr

from filelock import FileLock

Expand Down Expand Up @@ -154,7 +154,9 @@ def callable_or_value(v, *args, **kwargs):
return v


def compile_arn_sql_like(arn: str, allowed_regex: re.Pattern) -> Tuple[str, str]:
def compile_arn_sql_like(
arn: str, allowed_regex: re.Pattern[AnyStr]
) -> tuple[str, str]:
"""Turn an arn into a string suitable for use in a SQL LIKE statement.
Parameters
Expand All @@ -170,7 +172,7 @@ def compile_arn_sql_like(arn: str, allowed_regex: re.Pattern) -> Tuple[str, str]
Returns
-------
Tuple[str, str]
tuple[str, str]
(namespace regex, environment regex) to match in a sql LIKE statement.
See conda_store_server.server.auth.Authentication.filter_environments
for usage.
Expand Down
7 changes: 4 additions & 3 deletions conda-store-server/conda_store_server/server/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import re
import secrets
from collections import defaultdict
from typing import Iterable, Optional, Set, Tuple
from collections.abc import Iterable
from typing import Optional, Set

import jwt
import requests
Expand Down Expand Up @@ -228,7 +229,7 @@ def compile_arn_regex(arn: str) -> re.Pattern:
return re.compile(regex_arn)

@staticmethod
def compile_arn_sql_like(arn: str) -> Tuple[str, str]:
def compile_arn_sql_like(arn: str) -> tuple[str, str]:
"""Turn an arn into a string suitable for use in a SQL LIKE statement.
The use of this function is discouraged; use
Expand All @@ -247,7 +248,7 @@ def compile_arn_sql_like(arn: str) -> Tuple[str, str]:
Returns
-------
Tuple[str, str]
tuple[str, str]
(namespace regex, environment regex) to match in a sql LIKE statement.
See conda_store_server.server.auth.Authentication.filter_environments
for usage.
Expand Down
7 changes: 4 additions & 3 deletions conda-store-server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ name = "conda-store-server"
description = "Conda Environment Management, Builds, and Serve"
readme = "README.md"
license = "BSD-3-Clause"
requires-python = ">=3.8"
requires-python = ">=3.10,<3.13"
keywords = ["conda"]
authors = [
{ name = "Christopher Ostrouchov", email = "[email protected]" },
]
maintainers = [
{ name = "Tania Allard", email = "[email protected]" },
{ name = "Pavithra Eswaramoorthy", email = "[email protected]" },
{ name = "Peyton Murray", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down Expand Up @@ -192,6 +191,8 @@ ignore = [
"UP007", # non-pep604-annotation
"UP030", # format-literals
"UP031", # printf-string-formatting
"UP035", # deprecated-import
"UP038", # non-pep604-isinstance
]
select = [
"E", # pycodestyle
Expand Down
11 changes: 6 additions & 5 deletions conda-store-server/tests/user_journeys/utils/api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import json
import time
import uuid
from collections.abc import Callable
from enum import Enum
from typing import Any, Callable, Dict, Optional, Union
from typing import Any, Dict, Optional, Union

import requests

Expand Down Expand Up @@ -251,7 +252,7 @@ def get_builds(
self,
environment: Optional[str] = None,
namespace: Optional[str] = None,
) -> Dict[str, Any]:
) -> dict[str, Any]:
"""Get information about an environment.
Parameters
Expand All @@ -263,7 +264,7 @@ def get_builds(
Returns
-------
Dict[str, Any]
dict[str, Any]
Dict of build properties; see API docs for
api/v1/build/ for more information.
"""
Expand All @@ -278,7 +279,7 @@ def get_builds(
"data"
]

def get_environment(self, namespace: str, environment: str) -> Dict[str, Any]:
def get_environment(self, namespace: str, environment: str) -> dict[str, Any]:
"""Get information about an environment.
Parameters
Expand All @@ -290,7 +291,7 @@ def get_environment(self, namespace: str, environment: str) -> Dict[str, Any]:
Returns
-------
Dict[str, Any]
dict[str, Any]
Dict of environment properties; see API docs for
api/v1/environment/{namespace}/{environment}/ for more information.
"""
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: conda-store-server
target: dev
args:
python_version=$python_version
user: 1000:1000
volumes:
- ./tests/assets/environments:/opt/environments:ro
Expand All @@ -22,6 +24,8 @@ services:
build:
context: conda-store-server
target: dev
args:
python_version=$python_version
user: 1000:1000
depends_on:
postgres:
Expand Down
18 changes: 10 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% set name = "conda-store" %}
# version MUST be updated when a new release is made
{% set version = "2024.6.1" %}
{% set version = "2024.11.1" %}

package:
name: {{ name|lower }}-split
Expand All @@ -27,17 +27,17 @@ outputs:
- conda-store = conda_store.__main__:main
requirements:
host:
- python >=3.8
- python >=3.10,<3.13
- pip
- hatchling >=1.14.0
- hatch-vcs
run:
- __linux # [linux]
- __osx # [osx]
- __win # [win]
- aiohttp>=3.8.1
- aiohttp >=3.8.1
- click
- python >=3.8
- python >=3.10,<3.13
- rich
- ruamel.yaml
- yarl
Expand All @@ -60,7 +60,7 @@ outputs:
- conda-store-worker = conda_store_server._internal.worker.__main__:main
requirements:
host:
- python >=3.8
- python >=3.10,<3.13
- pip
- hatchling >=1.14.0
- hatch-vcs
Expand All @@ -82,10 +82,10 @@ outputs:
- minio
- pydantic <2.0a0
- pyjwt
- python >=3.8
- python >=3.10,<3.13
- python-docker
- python-multipart
- pyyaml
- pyyaml <=5.3.1
- redis-py
- requests
- sqlalchemy <2.0a0
Expand Down Expand Up @@ -115,11 +115,13 @@ about:
philosophy of conda-store is to serve identical conda environments
in as many ways as possible. Conda Store controls the environment
lifecycle: management, builds, and serving of environments.
doc_url: https://conda.store
doc_url: https://conda.store/
dev_url: https://github.com/conda-incubator/conda-store

extra:
feedstock-name: conda-store
recipe-maintainers:
- peytondmurray
- soapy1
- trallard
- jaimergp

0 comments on commit 8157f0a

Please sign in to comment.