diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67b4fd3546..50ab1d39ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,9 @@ jobs: steps: - uses: actions/checkout@v5.0.0 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - uses: actions/setup-python@v6 with: python-version: 3.12 diff --git a/scripts/populate_tox/populate_tox.py b/scripts/populate_tox/populate_tox.py index 070ce82492..f13fa6d002 100644 --- a/scripts/populate_tox/populate_tox.py +++ b/scripts/populate_tox/populate_tox.py @@ -8,6 +8,7 @@ import hashlib import json import os +import subprocess import sys import time from bisect import bisect_left @@ -509,9 +510,7 @@ def _render_dependencies(integration: str, releases: list[Version]) -> list[str] return rendered -def write_tox_file( - packages: dict, update_timestamp: bool, last_updated: datetime -) -> None: +def write_tox_file(packages: dict) -> None: template = ENV.get_template("tox.jinja") context = {"groups": {}} @@ -530,11 +529,6 @@ def write_tox_file( } ) - if update_timestamp: - context["updated"] = datetime.now(tz=timezone.utc).isoformat() - else: - context["updated"] = last_updated.isoformat() - rendered = template.render(context) with open(TOX_FILE, "w") as file: @@ -623,19 +617,21 @@ def get_file_hash() -> str: def get_last_updated() -> Optional[datetime]: - timestamp = None - - with open(TOX_FILE, "r") as f: - for line in f: - if line.startswith("# Last generated:"): - timestamp = datetime.fromisoformat(line.strip().split()[-1]) - break - - if timestamp is None: - print( - "Failed to find out when tox.ini was last generated; the timestamp seems to be missing from the file." - ) - + repo_root = subprocess.run( + ["git", "rev-parse", "--show-toplevel"], + capture_output=True, + text=True, + ).stdout.strip() + tox_ini_path = Path(repo_root) / "tox.ini" + + timestamp = subprocess.run( + ["git", "log", "-1", "--pretty=%ct", str(tox_ini_path)], + capture_output=True, + text=True, + ).stdout.strip() + + timestamp = datetime.fromtimestamp(int(timestamp), timezone.utc) + print(f"Last committed tox.ini update: {timestamp}") return timestamp @@ -675,7 +671,7 @@ def main(fail_on_changes: bool = False) -> None: print(f"Running in {'fail_on_changes' if fail_on_changes else 'normal'} mode.") last_updated = get_last_updated() if fail_on_changes: - # We need to make the script ignore any new releases after the `last_updated` + # We need to make the script ignore any new releases after the last updated # timestamp so that we don't fail CI on a PR just because a new package # version was released, leading to unrelated changes in tox.ini. print( @@ -769,9 +765,7 @@ def main(fail_on_changes: bool = False) -> None: if fail_on_changes: old_file_hash = get_file_hash() - write_tox_file( - packages, update_timestamp=not fail_on_changes, last_updated=last_updated - ) + write_tox_file(packages) # Sort the release cache file releases = [] diff --git a/scripts/populate_tox/releases.jsonl b/scripts/populate_tox/releases.jsonl index fa82e6b1cd..96eb2da8e0 100644 --- a/scripts/populate_tox/releases.jsonl +++ b/scripts/populate_tox/releases.jsonl @@ -107,7 +107,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": "<4.0,>=3.8", "version": "2.6.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Logging"], "name": "loguru", "requires_python": "<4.0,>=3.5", "version": "0.7.3", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.0.1", "yanked": false}} -{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.109.0", "yanked": false}} +{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.109.1", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.37.2", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.73.0", "yanked": false}} {"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai-agents", "requires_python": ">=3.9", "version": "0.0.19", "yanked": false}} diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index f47d5db692..039b93c42e 100755 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -9,8 +9,6 @@ # or in the script (if you want to change the auto-generated part). # The file (and all resulting CI YAMLs) then needs to be regenerated via # "scripts/generate-test-files.sh". -# -# Last generated: {{ updated }} [tox] requires = diff --git a/tox.ini b/tox.ini index e0295707ab..8e4c6e5a36 100644 --- a/tox.ini +++ b/tox.ini @@ -9,8 +9,6 @@ # or in the script (if you want to change the auto-generated part). # The file (and all resulting CI YAMLs) then needs to be regenerated via # "scripts/generate-test-files.sh". -# -# Last generated: 2025-09-24T10:52:00.519014+00:00 [tox] requires = @@ -68,12 +66,12 @@ envlist = {py3.8,py3.11,py3.12}-openai-base-v1.0.1 {py3.8,py3.11,py3.12}-openai-base-v1.37.2 {py3.8,py3.11,py3.12}-openai-base-v1.73.0 - {py3.8,py3.12,py3.13}-openai-base-v1.109.0 + {py3.8,py3.12,py3.13}-openai-base-v1.109.1 {py3.8,py3.11,py3.12}-openai-notiktoken-v1.0.1 {py3.8,py3.11,py3.12}-openai-notiktoken-v1.37.2 {py3.8,py3.11,py3.12}-openai-notiktoken-v1.73.0 - {py3.8,py3.12,py3.13}-openai-notiktoken-v1.109.0 + {py3.8,py3.12,py3.13}-openai-notiktoken-v1.109.1 {py3.9,py3.12,py3.13}-langgraph-v0.6.7 {py3.10,py3.12,py3.13}-langgraph-v1.0.0a3 @@ -364,7 +362,7 @@ deps = openai-base-v1.0.1: openai==1.0.1 openai-base-v1.37.2: openai==1.37.2 openai-base-v1.73.0: openai==1.73.0 - openai-base-v1.109.0: openai==1.109.0 + openai-base-v1.109.1: openai==1.109.1 openai-base: pytest-asyncio openai-base: tiktoken openai-base-v1.0.1: httpx<0.28 @@ -373,7 +371,7 @@ deps = openai-notiktoken-v1.0.1: openai==1.0.1 openai-notiktoken-v1.37.2: openai==1.37.2 openai-notiktoken-v1.73.0: openai==1.73.0 - openai-notiktoken-v1.109.0: openai==1.109.0 + openai-notiktoken-v1.109.1: openai==1.109.1 openai-notiktoken: pytest-asyncio openai-notiktoken-v1.0.1: httpx<0.28 openai-notiktoken-v1.37.2: httpx<0.28