Skip to content

Conversation

@mhucka
Copy link
Collaborator

@mhucka mhucka commented Nov 8, 2025

This is to address a recent security scan warning, about a vulnerability in setuptools versions before 78.1.1.

In response to review comments by Gemini Code Assist, I also:

  • moved what was in the setup_requires field of setup.py into pyproject.toml
  • moved the setuptools requirement from requirements.txt to dev-requirements.txt

I also made a drive-by addition to .editorconfig to add an indentation rule for .toml files.

This is to address a recent security scan warning,
https://github.com/quantumlib/qsim/security/code-scanning/86, about a
vulnerability in [setuptools versions before
78.1.1](GHSA-5rjg-fvgr-3xxf).
@github-actions github-actions bot added the Size: XS <10 lines changed label Nov 8, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the required version of setuptools to 78.1.1 to address a security vulnerability. The changes in requirements.txt and setup.py correctly apply this update. My review includes two high-severity recommendations to improve your project's dependency management and align with modern Python packaging standards. First, I suggest removing build-time dependencies like setuptools from requirements.txt to prevent them from being incorrectly treated as runtime dependencies. Second, I recommend migrating build dependencies from the deprecated setup_requires in setup.py to a [build-system] table in pyproject.toml, which is the standard practice.

This addresses a point made by Gemini Code Assist in review:

> `setuptools` is a build-time dependency, not a runtime dependency. It
> should not be listed in `requirements.txt` because this file's contents
> are passed to `install_requires` in `setup.py` (line 148). This forces users
> of your library to install `setuptools`, which is unnecessary.
This addresses a point made by Gemini Code Assist in review:

> `setup_requires` is a deprecated and problematic way to specify
> build-time dependencies. The modern, PEP 518-compliant way is to
> specify them in `pyproject.toml`.
May as well have a configuration for this, even though we have only one
TOML file (`pyproject.toml`).
@github-actions github-actions bot added size: S 10< lines changed <50 and removed Size: XS <10 lines changed labels Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant