Merge pull request #5176 from minrk/test-314

test with 3.14 (and 3.14t)
This commit is contained in:
Min RK
2025-10-14 16:42:15 -07:00
committed by GitHub
4 changed files with 13 additions and 9 deletions

View File

@@ -82,12 +82,12 @@ jobs:
subset: singleuser
- python: "3.9"
db: mysql
- python: "3.10"
db: postgres
- python: "3.12"
db: postgres
- python: "3.13"
subdomain: subdomain
serverextension: serverextension
- python: "3.11"
- python: "3.13"
ssl: ssl
serverextension: serverextension
- python: "3.11"
@@ -101,12 +101,14 @@ jobs:
ssl: ssl
noextension: noextension
subset: singleuser
- python: "3.11"
- python: "3.13"
browser: browser
- python: "3.11"
subdomain: subdomain
browser: browser
- python: "3.12"
- python: "3.14"
main_dependencies: main_dependencies
- python: "3.14t"
main_dependencies: main_dependencies
steps:

View File

@@ -21,7 +21,7 @@ fi
# Configure a set of databases in the database server for upgrade tests
# this list must be in sync with versions in test_db.py:test_upgrade
set -x
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211 _upgrade_311; do
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211 _upgrade_311 _upgrade_416; do
$SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true
$SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};"
done

View File

@@ -547,7 +547,7 @@ class Expiring:
which should be unix timestamp or datetime object
"""
now = utcnow # function, must return float timestamp or datetime
now = staticmethod(utcnow) # function, must return float timestamp or datetime
expires_at = None # must be defined
@property
@@ -1078,7 +1078,7 @@ class APIToken(Hashed, Base):
session_id = Column(Unicode(255), nullable=True)
# token metadata for bookkeeping
now = utcnow # for expiry
now = staticmethod(utcnow) # for expiry
created = Column(DateTime, default=utcnow)
expires_at = Column(DateTime, default=None, nullable=True)
last_activity = Column(DateTime)

View File

@@ -45,9 +45,11 @@ def generate_old_db(env_dir, hub_version, db_url):
# changes to this version list must also be reflected
# in ci/init-db.sh
@pytest.mark.parametrize(
'hub_version', ['1.1.0', '1.2.2', '1.3.0', '1.5.0', '2.1.1', '3.1.1']
'hub_version', ['1.1.0', '1.2.2', '1.3.0', '1.5.0', '2.1.1', '3.1.1', '4.1.6']
)
async def test_upgrade(tmpdir, hub_version):
if sys.version_info >= (3, 13) and V(hub_version) < V("4"):
pytest.skip("jupyterhub < 4 needs Python 3.12 or earlier")
db_url = os.getenv('JUPYTERHUB_TEST_DB_URL')
if db_url:
db_url += '_upgrade_' + hub_version.replace('.', '')