Copilot commented on code in PR #1282:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1282#discussion_r2967168034


##########
docs/installation.rst:
##########
@@ -24,9 +24,9 @@ Verifying your Installation
 ---------------------------
 To check if the installation was successful, you can run::
 
-    python -c 'import cassandra; print(cassandra.__version__)'
+    python -c 'import cassandra; 
print(cassandra.ProtocolVersion.SUPPORTED_VERSIONS)'
 
-It should print something like "3.29.3".
+This command should print something like "(66, 65, 6, 5, 4, 3, 2, 1)".

Review Comment:
   The new verification command prints `ProtocolVersion.SUPPORTED_VERSIONS`, 
which doesn’t indicate which driver version was installed and the tuple 
contents can vary as protocol support changes. Since `cassandra.__version__` 
still exists (it’s set from `importlib.metadata` in `cassandra/__init__.py`), 
consider keeping the original `print(cassandra.__version__)` (or documenting 
`importlib.metadata.version('cassandra-driver')`) so users can confirm the 
installed package version.



##########
docs/installation.rst:
##########
@@ -184,36 +179,12 @@ See :ref:`windows_build` for notes on configuring the 
build environment on Windo
 Cython-based Extensions
 ~~~~~~~~~~~~~~~~~~~~~~~
 By default, this package uses `Cython <http://cython.org/>`_ to optimize core 
modules and build custom extensions.
-This is not a hard requirement, but is engaged by default to build extensions 
offering better performance than the
+This is not a hard requirement, but is enabled by default to build extensions 
offering better performance than the
 pure Python implementation.
 
-This is a costly build phase, especially in clean environments where the 
Cython compiler must be built
-This build phase can be avoided using the build switch, or an environment 
variable::
-
-    python setup.py install --no-cython
-
-Alternatively, an environment variable can be used to switch this option 
regardless of
-context::
-
-    CASS_DRIVER_NO_CYTHON=1 <your script here>
-    - or, to disable all extensions:
-    CASS_DRIVER_NO_EXTENSIONS=1 <your script here>
-
-This method is required when using pip, which provides no other way of 
injecting user options in a single command::
-
-    CASS_DRIVER_NO_CYTHON=1 pip install cassandra-driver
-    CASS_DRIVER_NO_CYTHON=1 sudo -E pip install ~/python-driver
-
-The environment variable is the preferred option because it spans all 
invocations of setup.py, and will
-prevent Cython from being materialized as a setup requirement.
-
-If your sudo configuration does not allow SETENV, you must push the option 
flag down via pip. However, pip
-applies these options to all dependencies (which break on the custom flag). 
Therefore, you must first install
-dependencies, then use install-option::
-
-    sudo pip install futures
-    sudo pip install --install-option="--no-cython"
-
+This process does take some time, however, so if you wish to build without 
generating these extensions using
+Cython you can do so by changing the ``build-cython-extensions`` key in the 
``tool.cassandra-driver`` table of pyproject.toml.
+By default this key is set to "true"; simply changing it to "false" will 
disable all Cython functionality.

Review Comment:
   Same TOML typing issue here: the docs say the `build-cython-extensions` key 
is set to "true" and should be changed to "false", but in TOML this should be 
the boolean literals `true`/`false` (without quotes), matching the values in 
`[tool.cassandra-driver]` in `pyproject.toml`.
   ```suggestion
   By default this key is set to ``true``; simply changing it to ``false`` will 
disable all Cython functionality.
   ```



##########
docs/installation.rst:
##########
@@ -161,9 +155,10 @@ for token-aware routing with the ``Murmur3Partitioner``,
 `libev <http://software.schmorp.de/pkg/libev.html>`_ event loop integration,
 and Cython optimized extensions.
 
-When installing manually through setup.py, you can disable both with
-the ``--no-extensions`` option, or selectively disable them with
-with ``--no-murmur3``, ``--no-libev``, or ``--no-cython``.
+When installing manually these options can be disabled by changing the 
corresponding
+key in the ``tool.cassandra-driver`` table of pyproject.toml to "false".  
Please consult

Review Comment:
   `pyproject.toml` boolean values should be `true`/`false` (unquoted). The 
docs currently say to set these keys to "false", which would be a TOML string 
and won’t match the actual config types in `[tool.cassandra-driver]`.
   ```suggestion
   key in the ``tool.cassandra-driver`` table of pyproject.toml to ``false``.  
Please consult
   ```



##########
docs/installation.rst:
##########
@@ -99,15 +99,9 @@ process can take a long time -- as long as 10 minutes in 
some environments.
 
 In environments where performance is less important, it may be worth it to
 :ref:`disable Cython as documented below <cython-extensions>`.
-You can also use ``CASS_DRIVER_BUILD_CONCURRENCY`` to increase the number of
-threads used to build the driver and any C extensions:
+You can also use ``build-concurrency`` key in the ``tool.cassandra-driver`` 
table of pyproject.toml to 
+increase the number of threads used to build the driver and any C extensions.

Review Comment:
   Line 102 has trailing whitespace, and the sentence is missing an article 
(“use **the** `build-concurrency` key…”). Also, `build-concurrency` is an 
integer in `pyproject.toml` (default `0`); it would help to note that users 
should set it to a positive integer to override the default behavior.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to