Skip to content

build: update requirements for java-api-stubs - #109

Merged
cesarcoatl merged 2 commits into
8.3from
build/stubs/install-requires-java-get-17.26.5-lt-21
Nov 27, 2026
Merged

cesarcoatl merged 2 commits into
8.3from
build/stubs/install-requires-java-get-17.26.5-lt-21

Conversation

@cesarcoatl

@cesarcoatl cesarcoatl commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Summary by Sourcery

Update the stub package dependency constraints and lock generated requirements with integrity hashes.

Enhancements:

  • Raise the minimum supported java-api-stubs version to 17.26.5.

Build:

  • Regenerate pinned dependency requirements with package hashes for reproducible installation.

@sourcery-ai

sourcery-ai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Configuration

Raise the allowed java-api-stubs minimum and enable hash generation for the compiled requirements.

  • stubs/pyproject.toml L39
  • stubs/uv.toml L2

Lock files and vendored code

Refresh the generated requirements lock entries with hashes for the resolved packages.

  • stubs/requirements.txt L3-9

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot 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.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="stubs/requirements.txt" line_range="4-5" />
<code_context>
 #    uv pip compile --config-file=uv.toml pyproject.toml
-java-api-stubs==17.26.6
+java-api-stubs==17.26.6 \
+    --hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \
+    --hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6
     # via ignition-api-stubs (pyproject.toml)
-types-enum34==1.1.8
</code_context>
<issue_to_address>
**Stub type-check environment cannot install dependencies**

When the stubs typecheck tox environment installs its dependencies, `pip` enables hash-checking mode for the requirements file and rejects the unhashed Git-based `mypy` dependency installed in the same dependency set, so the environment cannot be created.

Install the Git-based `mypy` dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.
</issue_to_address>

### Comment 2
<location path="stubs/requirements.txt" line_range="3" />
<code_context>
 # This file was autogenerated by uv via the following command:
 #    uv pip compile --config-file=uv.toml pyproject.toml
-java-api-stubs==17.26.6
+java-api-stubs==17.26.6 \
+    --hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \
+    --hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6
</code_context>
<issue_to_address>
**Dependency hashes are not enforced**

When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through `stubs/tox.ini` without `--require-hashes`, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.

Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: stubs/requirements.txt:5, stubs/requirements.txt:3


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread stubs/requirements.txt Outdated
Comment on lines +4 to +5
--hash=sha256:dfd7accfd13b3abaa3457c35af234abc425bc82f2824b755df36b6fad86cb9d4 \
--hash=sha256:e1fc2028aaadd4862e796f5c963de27e09a4462e0ed69f78f8ebe8164b4626b6

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.

🔴 Critical · Stub type-check environment cannot install dependencies

When the stubs typecheck tox environment installs its dependencies, pip enables hash-checking mode for the requirements file and rejects the unhashed Git-based mypy dependency installed in the same dependency set, so the environment cannot be created.

Install the Git-based mypy dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.

Prompt for AI agents
In `stubs/requirements.txt` at lines 4-5:

**Stub type-check environment cannot install dependencies**

When the stubs typecheck tox environment installs its dependencies, `pip` enables hash-checking mode for the requirements file and rejects the unhashed Git-based `mypy` dependency installed in the same dependency set, so the environment cannot be created.

Install the Git-based `mypy` dependency separately from the hashed requirements, or otherwise ensure every dependency in that pip invocation is hash-pinned.

Comment thread stubs/requirements.txt Outdated
# This file was autogenerated by uv via the following command:
# uv pip compile --config-file=uv.toml pyproject.toml
java-api-stubs==17.26.6
java-api-stubs==17.26.6 \

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.

🟡 Medium · Dependency hashes are not enforced

When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through stubs/tox.ini without --require-hashes, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.

Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.

Prompt for AI agents
In `stubs/requirements.txt` at line 3:

**Dependency hashes are not enforced**

When an artifact for a pinned dependency is replaced or corrupted, pip installs this file through `stubs/tox.ini` without `--require-hashes`, so it ignores the emitted hashes and accepts a substituted artifact for the pinned version; the intended integrity check is absent.

Use an installation path that enforces these hashes, accounting for the unhashed VCS dependency in the same tox environment.

@cesarcoatl
cesarcoatl merged commit 678d522 into 8.3 Nov 27, 2026
5 checks passed
@cesarcoatl
cesarcoatl deleted the build/stubs/install-requires-java-get-17.26.5-lt-21 branch November 27, 2026 05:59
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.

1 participant