diff --git a/.changeset/forty-ants-warn.md b/.changeset/forty-ants-warn.md new file mode 100644 index 0000000..3aea1c8 --- /dev/null +++ b/.changeset/forty-ants-warn.md @@ -0,0 +1,5 @@ +--- +'@e2b/desktop-python': minor +--- + +Drop support for Python 3.9 diff --git a/.github/workflows/js-sdk-tests.yml b/.github/workflows/js-sdk-tests.yml index 4771eb0..0cdb38f 100644 --- a/.github/workflows/js-sdk-tests.yml +++ b/.github/workflows/js-sdk-tests.yml @@ -21,16 +21,24 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Install pnpm uses: pnpm/action-setup@v3 id: pnpm-install with: - version: 9.5 + version: ${{ env.TOOL_VERSION_PNPM }} - name: Setup Node uses: actions/setup-node@v3 with: - node-version: '20.x' + node-version: '${{ env.TOOL_VERSION_NODEJS }}' registry-url: 'https://registry.npmjs.org' cache: pnpm cache-dependency-path: pnpm-lock.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 31020dd..c5aace2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,14 +12,22 @@ jobs: - name: Checkout Repo uses: actions/checkout@v4 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - uses: pnpm/action-setup@v4 with: - version: 9.15.9 + version: ${{ env.TOOL_VERSION_PNPM }} - - name: Setup Node.js 20 + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '${{ env.TOOL_VERSION_NODEJS }}' cache: pnpm - name: Configure pnpm @@ -31,14 +39,14 @@ jobs: run: pnpm install --frozen-lockfile - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '${{ env.TOOL_VERSION_PYTHON }}' - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 1.5.1 + version: ${{ env.TOOL_VERSION_POETRY }} virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true diff --git a/.github/workflows/publish_packages.yml b/.github/workflows/publish_packages.yml index edf12da..ce1b318 100644 --- a/.github/workflows/publish_packages.yml +++ b/.github/workflows/publish_packages.yml @@ -28,28 +28,36 @@ jobs: with: token: ${{ steps.app-token.outputs.token }} + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '${{ env.TOOL_VERSION_PYTHON }}' - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 1.5.1 + version: ${{ env.TOOL_VERSION_POETRY }} virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true - uses: pnpm/action-setup@v3 with: - version: 9.5 + version: ${{ env.TOOL_VERSION_PNPM }} - - name: Setup Node.js 22 + - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: "22.x" - registry-url: "https://registry.npmjs.org" + node-version: '${{ env.TOOL_VERSION_NODEJS }}' + registry-url: 'https://registry.npmjs.org' cache: pnpm - name: Configure pnpm @@ -90,7 +98,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - NPM_TOKEN: "" # See https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 + NPM_TOKEN: '' # See https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 - name: Update lock file run: pnpm i --no-link --no-frozen-lockfile diff --git a/.github/workflows/python-sdk-tests.yml b/.github/workflows/python-sdk-tests.yml index e6aaea6..85f7650 100644 --- a/.github/workflows/python-sdk-tests.yml +++ b/.github/workflows/python-sdk-tests.yml @@ -21,15 +21,23 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '${{ env.TOOL_VERSION_PYTHON }}' - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 1.5.1 + version: ${{ env.TOOL_VERSION_POETRY }} virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 230a427..5ff4bcb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,16 +21,24 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Install pnpm uses: pnpm/action-setup@v3 id: pnpm-install with: - version: 9.5 + version: ${{ env.TOOL_VERSION_PNPM }} - name: Setup Node uses: actions/setup-node@v6 with: - node-version: "22.x" + node-version: '${{ env.TOOL_VERSION_NODEJS }}' registry-url: "https://registry.npmjs.org" cache: pnpm cache-dependency-path: pnpm-lock.yaml @@ -61,16 +69,24 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Install pnpm uses: pnpm/action-setup@v3 id: pnpm-install with: - version: 9.5 + version: ${{ env.TOOL_VERSION_PNPM }} - name: Setup Node uses: actions/setup-node@v6 with: - node-version: '22.x' + node-version: '${{ env.TOOL_VERSION_NODEJS }}' registry-url: 'https://registry.npmjs.org' cache: pnpm cache-dependency-path: pnpm-lock.yaml diff --git a/.github/workflows/template.yml b/.github/workflows/template.yml index e635b3c..223fdb2 100644 --- a/.github/workflows/template.yml +++ b/.github/workflows/template.yml @@ -23,15 +23,23 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Parse .tool-versions + uses: wistia/parse-tool-versions@v2.1.1 + id: tool-versions + with: + filename: '.tool-versions' + uppercase: 'true' + prefix: 'tool_version_' + - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '${{ env.TOOL_VERSION_PYTHON }}' - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 2.1.1 + version: ${{ env.TOOL_VERSION_POETRY }} virtualenvs-create: true virtualenvs-in-project: true installer-parallel: true diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..4ec5e7e --- /dev/null +++ b/.tool-versions @@ -0,0 +1,4 @@ +nodejs 20.19.5 +pnpm 9.15.9 +python 3.10 +poetry 2.1.1 diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock index 8637330..5d8abde 100644 --- a/packages/python-sdk/poetry.lock +++ b/packages/python-sdk/poetry.lock @@ -273,7 +273,6 @@ files = [ Deprecated = ">=1.2.12,<2.0.0" nr-date = ">=2.0.0,<3.0.0" nr-stream = ">=1.0.0,<2.0.0" -setuptools = {version = ">=40.8.0", markers = "python_version < \"3.10\""} typeapi = ">=2.0.1,<3" typing-extensions = ">=3.10.0,<5" @@ -416,7 +415,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -1137,28 +1136,6 @@ files = [ {file = "ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514"}, ] -[[package]] -name = "setuptools" -version = "78.1.1" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.9" -groups = ["dev"] -markers = "python_version == \"3.9\"" -files = [ - {file = "setuptools-78.1.1-py3-none-any.whl", hash = "sha256:c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561"}, - {file = "setuptools-78.1.1.tar.gz", hash = "sha256:fcc17fd9cd898242f6b4adfaca46137a9edef687f43e6f78469692a5e70d851d"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] -core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"] - [[package]] name = "six" version = "1.16.0" @@ -1403,5 +1380,5 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [metadata] lock-version = "2.1" -python-versions = "^3.9" -content-hash = "cb5a49417739e325a2c2cdf8b2c7e75533df1770123ad880bef85aa210c0b1d4" +python-versions = "^3.10" +content-hash = "e86d4985c314890f544c06a32229fc954bac13dce4d1880a7fc83004890de73f" diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml index 2937f01..07e5be8 100644 --- a/packages/python-sdk/pyproject.toml +++ b/packages/python-sdk/pyproject.toml @@ -10,7 +10,7 @@ repository = "https://github.com/e2b-dev/desktop/tree/main/packages/python-sdk" packages = [{ include = "e2b_desktop" }] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" e2b = "^2.6.0" requests = "^2.32.3" diff --git a/template/poetry.lock b/template/poetry.lock index 3dd929b..3fa41c6 100644 --- a/template/poetry.lock +++ b/template/poetry.lock @@ -13,6 +13,7 @@ files = [ ] [package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} @@ -106,6 +107,25 @@ rich = ">=14.0.0" typing-extensions = ">=4.1.0" wcmatch = ">=10.1,<11.0" +[[package]] +name = "exceptiongroup" +version = "1.3.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +groups = ["main"] +markers = "python_version == \"3.10\"" +files = [ + {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, + {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "h11" version = "0.16.0" @@ -394,5 +414,5 @@ bracex = ">=2.1.1" [metadata] lock-version = "2.1" -python-versions = "^3.12" -content-hash = "dc20c232a40b14cfe7f5203e0663df571bf0d995a9484aed6bcbf1a52d281ba3" +python-versions = "^3.10" +content-hash = "967b686830ceb593e655394c32f0b836f5d9d6249d38221fd0e9ddeed4bd512c" diff --git a/template/pyproject.toml b/template/pyproject.toml index 9a90bb0..674e417 100644 --- a/template/pyproject.toml +++ b/template/pyproject.toml @@ -8,7 +8,7 @@ readme = "README.md" package-mode = false [tool.poetry.dependencies] -python = "^3.12" +python = "^3.10" e2b = "^2.3.5" [tool.poetry.group.dev.dependencies]