Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
aa0b0c1
updated pandas to use 3.x
andrewelamb Oct 12, 2026
0ac1ad1
fix tests that do not work in pandas 3.x
andrewelamb Oct 12, 2026
2f478d9
added support for python3.15
andrewelamb Oct 12, 2026
ed42c7f
made arg positional
andrewelamb Oct 12, 2026
22de5e5
made arg positional
andrewelamb Oct 12, 2026
7b2c442
ran black
andrewelamb Oct 12, 2026
3931394
fix issue with duplicated df indeces
andrewelamb Oct 13, 2026
5a1d60a
fix nan to none helper
andrewelamb Oct 13, 2026
38ec6f0
construct_rownames now takes a RowSet
andrewelamb Oct 13, 2026
71aba57
fix issue with duplicated df indeces
andrewelamb Oct 13, 2026
dd44de4
fix nan to none helper
andrewelamb Oct 13, 2026
f9f1949
construct_rownames now takes a RowSet
andrewelamb Oct 13, 2026
487f56b
Merge branch 'SYNPY-1933' into SYNPY-1926
andrewelamb Oct 13, 2026
95d3a79
added comments to tests
andrewelamb Oct 13, 2026
ebc6679
Merge branch 'SYNPY-1933' into SYNPY-1926
andrewelamb Oct 13, 2026
152a7c8
updated dockerfile
andrewelamb Oct 13, 2026
e7c5b71
updated pandas to use 3.x
andrewelamb Oct 12, 2026
e319fd7
fix tests that do not work in pandas 3.x
andrewelamb Oct 12, 2026
9e1826e
fix issue with duplicated df indeces
andrewelamb Oct 13, 2026
f5235a0
fix nan to none helper
andrewelamb Oct 13, 2026
b22c3e2
construct_rownames now takes a RowSet
andrewelamb Oct 13, 2026
dce02d2
added comments to tests
andrewelamb Oct 13, 2026
0ef0e85
handle merge conflict
andrewelamb Oct 23, 2026
08ff00a
cast columns to objects
andrewelamb Oct 26, 2026
c2368ee
Merge branch 'SYNPY-1933' into SYNPY-1926
andrewelamb Oct 26, 2026
82daa97
pinned numpy versiosn for specific pandas versions
andrewelamb Oct 28, 2026
614b451
added unit tests
andrewelamb Oct 28, 2026
d47cf64
added helper function
andrewelamb Oct 28, 2026
8a5691a
add type hints and unit tests
andrewelamb Oct 28, 2026
fa92153
handle merge conflict
andrewelamb Oct 28, 2026
7154e79
handle merge conflict
andrewelamb Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

# if changing the below change the run-integration-tests versions and the check-deploy versions
# Make sure that we are running the integration tests on the first and last versions of the matrix
python: ['3.11', '3.12', '3.13', '3.14']
python: ['3.11', '3.12', '3.13', '3.14', '3.15']

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
pytest -sv --cov-append --cov=. --cov-report xml tests/unit
- name: Check for Secret availability
id: secret-check
if: ${{ contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.14"]'), matrix.python) }}
if: ${{ contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.15"]'), matrix.python) }}
# perform secret check & put boolean result as an output
shell: bash
run: |
Expand All @@ -126,7 +126,7 @@ jobs:
fi

- name: Download Failed Tests from Previous Attempt
if: ${{ github.run_attempt > 1 && (contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.14"]'), matrix.python)) && steps.secret-check.outputs.secrets_available == 'true'}}
if: ${{ github.run_attempt > 1 && (contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.15"]'), matrix.python)) && steps.secret-check.outputs.secrets_available == 'true'}}
uses: actions/download-artifact@v4
with:
name: failed-tests-${{ matrix.os }}-${{ matrix.python }}
Expand All @@ -142,25 +142,25 @@ jobs:
shell: bash

# keep versions consistent with the first and last from the strategy matrix
if: ${{ (contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.14"]'), matrix.python)) && steps.secret-check.outputs.secrets_available == 'true' && github.event_name != 'release'}}
if: ${{ (contains(fromJSON('["3.11"]'), matrix.python) || contains(fromJSON('["3.15"]'), matrix.python)) && steps.secret-check.outputs.secrets_available == 'true' && github.event_name != 'release'}}
run: |
# Set SYNAPSE_PROFILE based on OS and Python version
if [ "${{ startsWith(matrix.os, 'ubuntu') }}" == "true" ]; then
if [ "${{ matrix.python }}" == "3.11" ]; then
export SYNAPSE_PROFILE="TestUbuntuMinimumPython"
elif [ "${{ matrix.python }}" == "3.14" ]; then
elif [ "${{ matrix.python }}" == "3.15" ]; then
export SYNAPSE_PROFILE="TestUbuntuMaximumPython"
fi
elif [ "${{ startsWith(matrix.os, 'windows') }}" == "true" ]; then
if [ "${{ matrix.python }}" == "3.11" ]; then
export SYNAPSE_PROFILE="TestWindowsMinimumPython"
elif [ "${{ matrix.python }}" == "3.14" ]; then
elif [ "${{ matrix.python }}" == "3.15" ]; then
export SYNAPSE_PROFILE="TestWindowsMaximumPython"
fi
elif [ "${{ startsWith(matrix.os, 'macos') }}" == "true" ]; then
if [ "${{ matrix.python }}" == "3.11" ]; then
export SYNAPSE_PROFILE="TestMacosMinimumPython"
elif [ "${{ matrix.python }}" == "3.14" ]; then
elif [ "${{ matrix.python }}" == "3.15" ]; then
export SYNAPSE_PROFILE="TestMacosMaximumPython"
fi
fi
Expand Down Expand Up @@ -547,7 +547,7 @@ jobs:
os: [ubuntu-24.04, macos-15-intel, windows-2022]

# python versions should be consistent with the strategy matrix and the runs-integration-tests versions
python: ['3.11', '3.12', '3.13', '3.14']
python: ['3.11', '3.12', '3.13', '3.14', '3.15']

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.14'
python-version: '3.15'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Synapse Python Client — official Python SDK and CLI for Synapse (synapse.org),

## Stack

- Python 3.11–3.14 (`setup.cfg`: `python_requires = >=3.11, <3.15`)
- Python 3.11–3.15 (`setup.cfg`: `python_requires = >=3.11, <3.16`)
- HTTP: httpx (async), requests (sync/legacy)
- Models: stdlib dataclasses (NOT Pydantic)
- pandas (optional): `pandas>=1.5,<4.0` (`setup.cfg`, 4 places)
Expand Down Expand Up @@ -132,7 +132,7 @@ Code must work on every pandas version from 1.5 to 3.x. Use one code path that w
- Integration tests use `--reruns 3` for flaky retries and `-n 4 --dist loadscope` for parallelism
- Integration fixtures create per-worker Synapse projects; use `schedule_for_cleanup()` for teardown
- Auth env vars: `SYNAPSE_AUTH_TOKEN` (bearer token), `SYNAPSE_PROFILE` (config file profile, default: `"default"`), `SYNAPSE_TOKEN_AWS_SSM_PARAMETER_NAME` (AWS SSM path)
- CI runs integration tests only on Python 3.11 and 3.14 (oldest + newest) to limit Synapse server load
- CI runs integration tests only on Python 3.11 and 3.15 (oldest + newest) to limit Synapse server load
- CI job `test-pandas-versions` (`.github/workflows/build.yml`) runs the unit tests on older pandas versions: 1.5.3 on Python 3.11, 2.1.4 on Python 3.12, 2.2.3 on Python 3.13 (ubuntu only). The `package` job needs it. pandas < 2.2.2 requires `numpy<2`, so each matrix entry pins its own numpy version (1.26.4, 1.26.4, 2.5.4).

## Maintenance
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ copied to forks).
#### Installing the Python Client in a virtual environment with pipenv
Perform the following one-time steps to set up your local environment.

1. This package uses Python, if you have not already, please install [pyenv](https://github.com/pyenv/pyenv#installation) to manage your Python versions. Versions supported by this package are all versions >=3.11 and <=3.14. If you do not install `pyenv` make sure that Python and `pip` are installed correctly and have been added to your PATH by running `python3 --version` and `pip3 --version`. If your installation was successful, your terminal will return the versions of Python and `pip` that you installed. **Note**: If you have `pyenv` it will install a specific version of Python for you.
1. This package uses Python, if you have not already, please install [pyenv](https://github.com/pyenv/pyenv#installation) to manage your Python versions. Versions supported by this package are all versions >=3.11 and <=3.15. If you do not install `pyenv` make sure that Python and `pip` are installed correctly and have been added to your PATH by running `python3 --version` and `pip3 --version`. If your installation was successful, your terminal will return the versions of Python and `pip` that you installed. **Note**: If you have `pyenv` it will install a specific version of Python for you.

2. Install `pipenv` by running `pip install pipenv`.
- If you already have `pipenv` installed, ensure that the version is >=2023.9.8 to avoid compatibility issues.
Expand Down Expand Up @@ -271,18 +271,18 @@ When adding support for a new Python version or dropping support for an old vers

#### Adding a new Python version

When adding support for a new Python version (e.g., adding Python 3.15), update the following:
When adding support for a new Python version (e.g., adding Python 3.16), update the following:

**Code configuration files:**
1. **`setup.cfg`**:
- Add the new version to the `classifiers` list under `[metadata]` (e.g., `Programming Language :: Python :: 3.15`)
- Update the `python_requires` constraint under `[options]` to include the new version (e.g., `>=3.11, <3.16`)
- Add the new version to the `classifiers` list under `[metadata]` (e.g., `Programming Language :: Python :: 3.16`)
- Update the `python_requires` constraint under `[options]` to include the new version (e.g., `>=3.11, <3.17`)

2. **`pyproject.toml`**:
- Update the `target-version` list in the `[tool.black]` section to include the new version if needed

3. **`Dockerfile`**:
- Update the base image to use the new Python version (e.g., `FROM python:3.15-slim`)
- Update the base image to use the new Python version (e.g., `FROM python:3.16-slim`)

**CI/CD configuration files:**
1. **`.github/workflows/build.yml`**:
Expand All @@ -301,7 +301,7 @@ When dropping support for an old Python version (e.g., removing Python 3.11), up
**Code configuration files:**
1. **`setup.cfg`**:
- Remove the old version from the `classifiers` list under `[metadata]`
- Update the `python_requires` constraint under `[options]` to reflect the new minimum version (e.g., `>=3.12, <3.15`)
- Update the `python_requires` constraint under `[options]` to reflect the new minimum version (e.g., `>=3.12, <3.16`)

2. **`pyproject.toml`**:
- Update the `target-version` list in the `[tool.black]` section to remove the old version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.14-slim
FROM python:3.15-slim
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ flowchart TD
Installation
------------

We test the client on Python 3.11, 3.12, 3.13, and 3.14. It runs on Mac OS X, Linux, and Windows.
We test the client on Python 3.11, 3.12, 3.13, 3.14, and 3.15. It runs on Mac OS X, Linux, and Windows.

**Version 3.0 and later needs Python 3.10 or higher. Version 4.15.0 and later needs Python 3.11 or higher.**

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The [synapseclient](https://pypi.python.org/pypi/synapseclient/) package is avai
- conda: Please follow instructions [here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) to manage environments:

```bash
conda create -n synapseclient python=3.14
conda create -n synapseclient python=3.15
conda activate synapseclient

# Here are a few ways to install the client. Choose the one that fits your use-case
Expand All @@ -43,8 +43,8 @@ to the `/usr/local/lib` directory. [See here](https://github.com/conda/conda/iss
- pyenv: Use [virtualenv](https://virtualenv.pypa.io/en/latest/) to manage your python environment:

```bash
pyenv install -v 3.14.0
pyenv global 3.14.0
pyenv install -v 3.15.0
pyenv global 3.15.0
python -m venv env
source env/bin/activate

Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers =
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.14
Programming Language :: Python :: 3.15
Operating System :: MacOS
Operating System :: Microsoft :: Windows
Operating System :: Unix
Expand All @@ -41,7 +42,7 @@ classifiers =
zip_safe = False
include_package_data = True
packages = find:
python_requires = >=3.11, <3.15
python_requires = >=3.11, <3.16
install_requires =
requests>=2.34.0,<3.0
urllib3>=2.8.0
Expand Down
4 changes: 2 additions & 2 deletions synapseclient/core/download/download_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ def _ftp_report_hook(
destination=destination, file_handle_id=file_handle_id
)
range_header = (
{"Range": f"bytes={os.path.getsize(filename=temp_destination)}-"}
{"Range": f"bytes={os.path.getsize(temp_destination)}-"}
if os.path.exists(temp_destination)
else {}
)
Expand Down Expand Up @@ -1103,7 +1103,7 @@ def _ftp_report_hook(
# Servers that respect the Range header return 206 Partial Content
if response.status_code == 206:
mode = "ab"
previously_transferred = os.path.getsize(filename=temp_destination)
previously_transferred = os.path.getsize(temp_destination)
to_be_transferred += previously_transferred
transferred += previously_transferred
increment_progress_bar_total(
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/synapseclient/core/unit_test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,9 +986,7 @@ async def test_download_end_early_retry(self, syn: Synapse) -> None:

# assert getsize() called 2 times
# once because exists()=True and another time because response status code = 206
assert [
call(filename=temp_destination)
] * 2 == mocked_getsize.call_args_list
assert [call(temp_destination)] * 2 == mocked_getsize.call_args_list

# assert shutil.move() called 1 time
mocked_move.assert_called_once_with(temp_destination, destination)
Expand Down
Loading