Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "Cython>=3.0", "toml", "cassandra-driver"]
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

Critical circular dependency issue: The build-system requires "cassandra-driver" as a build dependency, but this is the package being built. This will cause build failures as pip cannot install cassandra-driver before building cassandra-driver. The "cassandra-driver" entry should be removed from the requires list.

Suggested change
requires = ["setuptools", "Cython>=3.0", "toml", "cassandra-driver"]
requires = ["setuptools", "Cython>=3.0", "toml"]

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The build-system requires "Cython>=3.0" unconditionally, but in the original code, Cython was only added to setup_requires when actually needed (when try_cython was True and pre_build_check passed). This means Cython will now always be installed during the build process, even if the user doesn't want to build Cython extensions. This could increase build time and dependencies unnecessarily. Consider making Cython an optional build dependency or documenting why it's now always required.

Copilot uses AI. Check for mistakes.

[project]
name = "cassandra-driver"
description = "Apache Cassandra Python Driver"
dependencies = ['geomet>=1.1']
readme = "README.rst"
authors = [{name = "DataStax"}]
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = ["cassandra","cql","orm","dse","graph"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules"
]
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The pyproject.toml is missing a requires-python field to specify the minimum Python version required. While the classifiers list Python 3.9-3.13, the requires-python field should be explicitly set (e.g., requires-python = ">=3.9") to ensure pip enforces this requirement during installation.

Suggested change
]
]
requires-python = ">=3.9"

Copilot uses AI. Check for mistakes.
dynamic = ["version"]

[project.optional-dependencies]
graph = ["gremlinpython==3.4.6"]
cle = ["cryptography>=42.0"]
test = ["pytest", "PyYAML", "pytz"]

[project.urls]
homepage = "https://github.com/apache/cassandra-python-driver/"
documentation = "https://docs.datastax.com/en/developer/python-driver/latest/"
source = "https://github.com/apache/cassandra-python-driver/"
issues = "https://issues.apache.org/jira/issues/?jql=project%20%3D%20CASSPYTHON%20ORDER%20BY%20key%20DESC"
changelog = "https://github.com/apache/cassandra-python-driver/blob/trunk/CHANGELOG.rst"

[tool.setuptools.packages.find]
include = ['cassandra', 'cassandra.io', 'cassandra.cqlengine', 'cassandra.graph',
'cassandra.datastax', 'cassandra.datastax.insights', 'cassandra.datastax.graph',
'cassandra.datastax.graph.fluent', 'cassandra.datastax.cloud',
"cassandra.column_encryption"]
Comment on lines +44 to +48
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The [tool.setuptools.packages.find] configuration uses include with an explicit list of packages. However, this approach means that any new subpackages added in the future would need to be manually added to this list, which is error-prone. The original setup.py also used an explicit list, but consider using where and exclude patterns instead for better maintainability, or document why the explicit list approach is preferred.

Copilot uses AI. Check for mistakes.

[tool.cassandra-driver]
build-extensions = true
build-murmur3-extension = true
build-libev-extension = true
build-cython-extensions = true
libev-includes = []
libev-libs = []
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The pyproject.toml configuration uses "libev-libs" (line 56) but this should more accurately be named "libev-libdirs" to match the semantics of library directories, consistent with the library_dirs parameter used in the Extension definition. While not technically incorrect, this naming could be confusing as "libs" might suggest library names rather than library directories.

Suggested change
libev-libs = []
libev-libdirs = []

Copilot uses AI. Check for mistakes.
build-concurrency = 0
Loading
Loading