Skip to content

[SYNPY-1926] Added support for python 3.15 - #1470

Open
andrewelamb wants to merge 18 commits into
SYNPY-1933from
SYNPY-1926
Open

andrewelamb wants to merge 18 commits into
SYNPY-1933from
SYNPY-1926

Conversation

@andrewelamb

@andrewelamb andrewelamb commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem:

  • Python 3.15 is released, but the client declares python_requires = >=3.11, <3.15. Users cannot install synapseclient on Python 3.15 with pip.
  • CI does not test on Python 3.15.
  • The docs (README, CONTRIBUTING, installation tutorial, CLAUDE.md) list 3.14 as the newest supported version.

Solution:

This PR follows the "Adding a new Python version" checklist in CONTRIBUTING.md.

Package metadata (setup.cfg)

  • Add the Programming Language :: Python :: 3.15 classifier.
  • Change python_requires to >=3.11, <3.16.

CI (.github/workflows/build.yml, .github/workflows/validate-release.yml)

  • Add 3.15 to the unit-tests matrix and to the check-deploy matrix.
  • Integration tests now run on the oldest and newest versions, 3.11 and 3.15 (before: 3.11 and 3.14). The 3.15 jobs now use the Test{Ubuntu,Windows,Macos}MaximumPython Synapse profiles. Python 3.14 still gets unit tests on all platforms.
  • validate-release now uses Python 3.15.

Docs

  • README.md, CONTRIBUTING.md, docs/tutorials/installation.md and CLAUDE.md now show 3.15 as the newest supported version. The examples in the CONTRIBUTING version checklist now use 3.16.

Download code (synapseclient/core/download/download_functions.py)

  • On Python 3.15, the filename parameter of os.path.getsize is positional-only. Two calls used os.path.getsize(filename=temp_destination), which raised TypeError: getsize() got some positional-only arguments passed as keyword arguments: 'filename'. This made tests/unit/synapseclient/core/unit_test_download.py::test_mock_download fail on 3.15. Both calls now pass the argument by position.

@andrewelamb
andrewelamb requested a review from a team as a code owner October 12, 2026 15:52
@andrewelamb
andrewelamb marked this pull request as draft October 12, 2026 18:28
@andrewelamb
andrewelamb changed the base branch from develop to SYNPY-1933 October 12, 2026 18:29
@andrewelamb
andrewelamb added this pull request to stack #1472 October 12, 2026 18:30
@andrewelamb andrewelamb changed the title added support for python3.15 [SYNPY-1926] Added support for python 3.15 Oct 12, 2026
@andrewelamb
andrewelamb marked this pull request as ready for review October 13, 2026 18:14

@linglp linglp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker file is currently FROM python:3.14-slim, but that would need to be updated if we want to support 3.15? Also, in the pyproject.toml should also be updated? Currently, there's target-version = ['py311']

@andrewelamb

Copy link
Copy Markdown
Contributor Author

The docker file is currently FROM python:3.14-slim, but that would need to be updated if we want to support 3.15?

Yep, looks like I had a commit that didn't get pushed!

Also, in the pyproject.toml should also be updated? Currently, there's target-version = ['py311']

target-version sets the minimum syntax level, so py311 is correct for python_requires >=3.11. Also, black 26.3.1 does not accept py315.

@andrewelamb
andrewelamb requested a review from linglp October 23, 2026 15:05

@linglp linglp left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. But I noticed some integration tests failure:

=========================== short test summary info ===========================
FAILED tests/integration/synapseclient/models/async/test_table_async.py::TestRowStorage::test_store_rows_from_df_with_datetime_columns - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,1] was not a valid DATE. Invalid format: "1609502400000.0" is malformed at "0000.0"
FAILED tests/integration/synapseclient/models/async/test_table_async.py::TestRowStorage::test_store_rows_with_quotes_and_apostrophes_ellipses - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,5] was not a valid INTEGER. For input string: "10.0"
FAILED tests/integration/synapseclient/models/async/test_entityview_async.py::TestEntityView::test_update_rows_and_annotations - AssertionError: Series are different

Series values are different (75.0 %)
[index]: [0, 1, 2, 3]
[left]:  [None, None, None, value4]
[right]: <StringArray>
['value1', 'value2', 'value3', 'value4']
Length: 4, dtype: str
At positional index 0, first diff: None != 'value1'
FAILED tests/integration/synapseclient/models/async/test_table_async.py::TestUpsertRows::test_upsert_all_data_types_using_dataframe - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,2] was not a valid INTEGER. For input string: "1.0"
FAILED tests/integration/synapseclient/models/async/test_table_async.py::TestUpsertRows::test_upsert_all_data_types_using_csv - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,2] was not a valid INTEGER. For input string: "11.0"
ERROR tests/integration/synapseclient/models/async/test_table_async.py::TestQuerying::test_query_to_csv - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,1] was not a valid INTEGER. For input string: "1.0"
ERROR tests/integration/synapseclient/models/async/test_table_async.py::TestQuerying::test_part_mask_query_everything - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,1] was not a valid INTEGER. For input string: "1.0"
ERROR tests/integration/synapseclient/models/async/test_table_async.py::TestQuerying::test_part_mask_query_results_only - synapseclient.core.exceptions.SynapseHTTPError: 400 Client Error: Value at [0,1] was not a valid INTEGER. For input string: "1.0"
=

Could you help look into the failures and make sure the integration tests all pass before merging?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants