Skip to content

set up python 3.12 and changed workflow#77

Open
ramirobarraco wants to merge 13 commits intomainfrom
feature/python_3.12
Open

set up python 3.12 and changed workflow#77
ramirobarraco wants to merge 13 commits intomainfrom
feature/python_3.12

Conversation

@ramirobarraco
Copy link
Copy Markdown
Collaborator

@ramirobarraco ramirobarraco commented Feb 25, 2026

Greptile Summary

Updates project to Python 3.10+ by dropping support for Python 3.7-3.9 and upgrading Poetry to 2.3.2. The changes update CI/CD workflows, regenerate the lockfile, and add flake8 ignore rules for parsing issues.

Key changes:

  • Updated minimum Python version from ^3.7 to ^3.10 in pyproject.toml
  • Updated CI workflows to test Python 3.10, 3.11, and 3.12 (dropped 3.7, 3.8, 3.9)
  • Upgraded Poetry from 1.2.2 to 2.3.2 across all workflows
  • Updated flake8 from 4.0.1 to 5.0.0 with new ignore rules for W604 and E231
  • Removed obsolete types-all dependency from pre-commit config
  • Regenerated poetry.lock with Poetry 2.3.2, removing Python 3.7-3.9 conditional dependencies
  • Added .pr.agent.toml config for Qodo Merge automated reviews

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are primarily configuration and dependency updates for Python version modernization. All changes are consistent (Python 3.10+ throughout), Poetry 2.3.2 is confirmed as the latest stable version per the senior developer's feedback, and the lockfile was properly regenerated. The only minor concern is the addition of flake8 ignore rules, but this appears intentional based on the commit message.
  • No files require special attention. The flake8 ignore rules in .pre-commit-config.yaml warrant consideration but appear intentional.

Important Files Changed

Filename Overview
.github/workflows/publish.yml Updated Poetry to 2.3.2 and Python to 3.10, step name still says "Python 3" instead of specific version
.github/workflows/tests.yml Updated test matrix to Python 3.10-3.12 and Poetry to 2.3.2, aligns with new minimum version
.pre-commit-config.yaml Updated flake8 to 5.0.0, added ignore rules for W604 and E231, removed obsolete types-all dependency
pyproject.toml Updated minimum Python version from ^3.7 to ^3.10

Last reviewed commit: 39c58bf

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add Python 3.12 support and update minimum version

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add Python 3.12 to CI/CD test matrix
• Update minimum Python version requirement to 3.12
Diagram
flowchart LR
  A["CI/CD Workflow"] -- "Add Python 3.12 to matrix" --> B["Test Matrix Updated"]
  C["Project Dependencies"] -- "Bump minimum to 3.12" --> D["Python Version Constraint"]
Loading

Grey Divider

File Changes

1. .github/workflows/tests.yml ⚙️ Configuration changes +1/-1

Add Python 3.12 to test matrix

• Added Python 3.12 to the test matrix alongside existing versions 3.7-3.11
• CI/CD pipeline now tests against six Python versions

.github/workflows/tests.yml


2. pyproject.toml Dependencies +1/-1

Update minimum Python version to 3.12

• Updated minimum Python version requirement from 3.7 to 3.12
• Restricts project to Python 3.12 and above

pyproject.toml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Feb 25, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. CI matrix incompatible🐞 Bug ⛯ Reliability
Description
pyproject.toml now requires Python ^3.12, but the tests workflow still runs jobs on 3.7–3.11 and
executes poetry install. Those jobs will fail before running any checks/tests due to the
interpreter/version constraint mismatch.
Code

.github/workflows/tests.yml[9]

+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
Evidence
The workflow runs poetry install for each matrix Python version, while the project explicitly
declares it only supports Python >=3.12. Any job running under 3.7–3.11 will be unable to install
the project dependencies via Poetry.

.github/workflows/tests.yml[4-20]
pyproject.toml[15-22]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
CI runs `poetry install` across Python 3.7–3.12, but `pyproject.toml` declares `python = "^3.12"`. This will break CI for all jobs <3.12.
### Issue Context
Poetry enforces the project’s declared Python range during `poetry install`.
### Fix Focus Areas
- .github/workflows/tests.yml[8-20]
- pyproject.toml[15-17]
### What to change
Pick one:
1) **Keep multi-version support**: change `python` constraint to a range that includes the tested versions (e.g. `>=3.7,<4.0` or `^3.7`), and keep the CI matrix.
2) **Drop old versions**: keep `python = "^3.12"` and update the CI matrix to only run supported versions (e.g. `["3.12"]` and optionally newer 3.x).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Docs claim old support🐞 Bug ✓ Correctness
Description
README/CONTRIBUTING/CI-CD docs still claim Python 3.7+/3.8+ usage, which contradicts `python =
"^3.12"` and will mislead users about installation and CI examples.
Code

pyproject.toml[16]

+python = "^3.12"
Evidence
Project documentation explicitly states Python 3.7+ / 3.8+ and shows examples pinned to Python 3.8,
but the package metadata now requires Python ^3.12.

pyproject.toml[15-17]
README.md[28-37]
CONTRIBUTING.md[44-49]
docs/usage/cicd.md[22-35]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Docs currently advertise Python 3.7+/3.8+ and show CI examples using Python 3.8, but packaging metadata requires Python ^3.12.
### Issue Context
This causes user confusion and broken copy/paste CI examples if the package truly requires 3.12+.
### Fix Focus Areas
- pyproject.toml[15-17]
- README.md[28-37]
- CONTRIBUTING.md[44-49]
- docs/usage/cicd.md[22-35]
### What to change
- If support is now 3.12+: update these docs to say Python 3.12+ and adjust examples accordingly.
- If support should remain broader: relax `pyproject.toml` `python` constraint to match the docs.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread .github/workflows/tests.yml Outdated
@ramirobarraco ramirobarraco linked an issue Feb 25, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator Author

@ramirobarraco ramirobarraco left a comment

Choose a reason for hiding this comment

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

changed version in the poetry configuration for ^3.7

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Updated Poetry from 1.2.2 to 2.3.2 and narrowed Python test matrix to versions 3.10-3.12 (removing 3.7, 3.8, 3.9). The poetry.lock was regenerated with the new Poetry version.

Key issues:

  • Test matrix no longer covers Python 3.7-3.9, but pyproject.toml still declares python = "^3.7" support, creating a mismatch between advertised and tested versions
  • Step name in publish.yml still says "Set up Python 3.8" but configures Python 3.10

Confidence Score: 2/5

  • This PR has configuration mismatches that should be resolved before merging
  • The PR creates a critical mismatch where the package advertises Python 3.7+ support in pyproject.toml but only tests Python 3.10-3.12, leaving 3 major versions untested. Additionally, there's a minor labeling error in the publish workflow.
  • .github/workflows/tests.yml and pyproject.toml need alignment on supported Python versions

Important Files Changed

Filename Overview
.github/workflows/publish.yml Updated Poetry to 2.3.2 and Python to 3.10, but step name still references Python 3.8
.github/workflows/tests.yml Updated to test Python 3.10-3.12 and Poetry 2.3.2, but creates mismatch with pyproject.toml which still declares Python 3.7+ support
poetry.lock Regenerated lockfile with Poetry 2.3.2, added dependency groups metadata

Last reviewed commit: 40710ef

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment thread .github/workflows/publish.yml Outdated
Comment on lines +31 to +34
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.10
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Step name says "Set up Python 3.8" but actually sets up Python 3.10

Suggested change
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.10
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10

Comment thread .github/workflows/tests.yml
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Feb 25, 2026

Greptile Summary

This PR drops support for Python 3.7-3.9 and sets the minimum required version to Python 3.10, updating CI workflows to test against Python 3.10, 3.11, and 3.12.

Key Changes:

  • Bumped minimum Python version from ^3.7 to ^3.10 in pyproject.toml
  • Updated test matrix to run on Python 3.10, 3.11, and 3.12 only
  • Upgraded flake8 from 4.0.1 to 5.0.0 and removed deprecated types-all dependency
  • Updated Poetry version across workflows

Critical Issue:

  • Poetry version 2.3.2 does not exist - this will cause CI failures. The latest stable Poetry version is in the 1.8.x range.

Confidence Score: 1/5

  • This PR will cause immediate CI failures due to invalid Poetry version
  • The invalid Poetry version (2.3.2) will cause all CI workflows to fail when attempting to install dependencies, blocking both testing and publishing
  • All workflow files need Poetry version corrected: .github/workflows/publish.yml and .github/workflows/tests.yml

Important Files Changed

Filename Overview
pyproject.toml Updated minimum Python version from 3.7 to 3.10, aligning with workflow changes
.github/workflows/tests.yml Updated test matrix to Python 3.10-3.12 and Poetry to 2.3.2
.github/workflows/publish.yml Updated Python to 3.10 and Poetry to 2.3.2, but step name still says "Set up Python 3.8"
.pre-commit-config.yaml Upgraded flake8 to 5.0.0 and removed deprecated types-all dependency

Last reviewed commit: cc79294

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

needs: get-new-tag
env:
POETRY_VERSION: 1.2.2
POETRY_VERSION: 2.3.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
POETRY_VERSION: 2.3.2
POETRY_VERSION: 1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This is a “version fact-checking” failure (the model/bot asserted an incorrect “latest stable” and suggested a downgrade). You can reduce these mistakes by adding a hard rule to the improve tool instructions: don’t claim “latest version” (or suggest downgrades/upgrades) unless the version is explicitly present in the PR diff or the PR explicitly links an authoritative source; otherwise ask the author to confirm.

Add this to your repo’s .pr_agent.toml:

[pr_code_suggestions]
extra_instructions="""\
- When commenting on dependency/tool versions (e.g., Poetry), do NOT assert "latest stable" or "doesn't exist" unless the exact version is present in the PR diff or the PR links an authoritative source.
- If uncertain, phrase it as a question and ask to confirm with the linked release notes/history page.
- Avoid suggesting version downgrades/upgrades solely based on memory; only propose a change if the PR explicitly targets that version or a source is provided in the PR context.
"""

Note: this type of error can’t be fully eliminated via configuration because it’s an inherent limitation of LLMs/bots (they can be confidently wrong on evolving external facts). The config above mainly nudges the output to be cautious and to defer to the PR-provided link (like the Poetry history page) instead of guessing.

Relevant Sources:

needs: [get-new-tag, publish]
env:
POETRY_VERSION: 1.2.2
POETRY_VERSION: 2.3.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
POETRY_VERSION: 2.3.2
POETRY_VERSION: 1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This kind of mismatch (the bot confidently asserting a “latest stable” version) is best mitigated by constraining how Qodo Merge phrases version-related suggestions, but it can’t be fully “fixed” by configuration—LLMs can still be wrong about fast-changing external facts unless they’re explicitly told to avoid/qualify such claims.

Recommended configuration (add to your repo’s .pr_agent.toml) to reduce incorrect package-version assertions in improve suggestions:

[pr_code_suggestions]
extra_instructions = """\
- When suggesting dependency/tool version changes (e.g., Poetry, Node, Python, actions), do NOT claim “latest stable/latest version” unless it is explicitly shown in the PR diff or repository files.
- Prefer suggesting: “Set POETRY_VERSION to the version documented/used by this repo” and point to the exact file/line (e.g., pyproject.toml, lockfile, CI workflow) as evidence.
- If you can’t verify the correct version from the PR context, ask a clarifying question or suggest leaving the version unchanged.
- Avoid contradicting user-provided links; if a conflict is possible, phrase it as uncertainty and request confirmation.
"""

If you want the bot to be especially conservative, add an additional rule like “never propose changing tool versions in CI unless the PR explicitly intends to update tooling.”

To validate the effective settings used in a run, you can trigger:
/improve --config.output_relevant_configurations=true

Relevant Sources:

- name: Install dependencies
run: |
pip install poetry==1.2.2
pip install poetry==2.3.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
pip install poetry==2.3.2
pip install poetry==1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This is a factual/version-claim mistake (Poetry releases change over time). You can reduce these by instructing Qodo Merge’s improve suggestions to avoid asserting external tool versions unless they’re verified from an authoritative source in the PR itself (lockfile, constraints, existing CI, etc.), and otherwise to phrase the suggestion generically (e.g., “pin to the latest stable Poetry 2.x per official docs” or “use the repo’s currently supported Poetry version”).

Add something like this to your repo’s .pr_agent.toml:

[pr_code_suggestions]
extra_instructions = """\
- When suggesting dependency/tool versions (e.g., Poetry), do NOT claim a version “doesn't exist” or “latest stable is X” unless the PR/repo contains a definitive source (e.g., pyproject.toml, lockfiles, constraints, CI config).
- If the version cannot be verified from the repo context, suggest the change without hardcoding a specific version, or ask the author to confirm the correct version per the official release notes.
- Prefer wording like: “Use the project’s supported Poetry version” / “Pin Poetry to a verified stable version (per official Poetry history/release notes)”.
"""

Note: configuration can reduce overconfident version statements, but it can’t guarantee the model will always be up-to-date with external release timelines—so the safest behavior is “don’t hardcode unless repo context confirms.”

Relevant Sources:

@ramirobarraco
Copy link
Copy Markdown
Collaborator Author

Qodo could you review the pr again

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Feb 25, 2026

Greptile Summary

This PR modernizes the Python version support by dropping Python 3.7-3.9 and setting the minimum to Python 3.10, while adding support for Python 3.12. The workflow configurations and pre-commit hooks have been updated accordingly.

Key changes:

  • Updated pyproject.toml to require Python ^3.10 (previously ^3.7)
  • Updated test matrix to run on Python 3.10, 3.11, and 3.12 (previously 3.7-3.11)
  • Upgraded Poetry version to 2.3.2 across all workflows (previously 1.2.2)
  • Updated flake8 to 5.0.0 in pre-commit config (previously 4.0.1)
  • Removed deprecated types-all==1.0.0 dependency from mypy config
  • Added .pr.agent.toml for automatic PR reviews

The changes are consistent across all configuration files and align with the goal of modernizing the Python version support.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk after fixing the outdated step name
  • The changes consistently update Python version requirements across all relevant files (pyproject.toml, workflows, pre-commit config). The only issue is a cosmetic step name that doesn't match the actual Python version being used. All changes align with the goal of modernizing to Python 3.10+, and the lockfile was properly regenerated.
  • .github/workflows/publish.yml has an outdated step name (line 31) that should be updated to match the actual Python version

Important Files Changed

Filename Overview
.github/workflows/publish.yml Updated Poetry to 2.3.2 and Python to 3.10; step name still says "Set up Python 3.8"
.github/workflows/tests.yml Updated test matrix to Python 3.10-3.12 and Poetry to 2.3.2, aligns with pyproject.toml
.pre-commit-config.yaml Updated flake8 to 5.0.0 and removed deprecated types-all dependency
pyproject.toml Updated minimum Python version from 3.7 to 3.10

Last reviewed commit: e7d6970

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread .github/workflows/publish.yml Outdated
POETRY_VERSION: 2.3.2
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Step name says "Set up Python 3.8" but uses Python 3.10

Suggested change
- name: Set up Python 3.8
- name: Set up Python 3.10

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread .pre-commit-config.yaml
rev: 5.0.0
hooks:
- id: flake8
args: ["--extend-ignore=W604,E231"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding --extend-ignore=W604,E231 suppresses flake8 warnings. W604 warns about backticks (deprecated in Python 3), E231 is missing whitespace after delimiter. Consider fixing the underlying code instead of ignoring these rules.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

there is no issue with the code they are false positives because of lines of code like :
f"Unsupported operand types for `-`: `{type(self).name}` and"
databooks/data_models/base.py:131:49: W604 backticks are deprecated, use 'repr()'
here the line the backticks will be mistakenly assume to be repr() function but is actually only how we decided to format the string

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

there is no issue with the code they are false positives because of lines of code like : fUnsupported operand types for `-`: `{type(self).name}` and databooks/data_models/base.py:131:49: W604 backticks are deprecated, use 'repr()' here the line the backticks will be mistakenly assume to be repr() function but is actually only how we decided to format the string

Answer:

You can reduce this kind of “fix flake8 by ignoring W604 / switch to repr()” guidance by adding explicit tool instructions that backticks inside string literals are intentional formatting in your repo, and that the bot should not recommend changing them or suppressing the rule unless it’s actually using the deprecated Python-2 backtick operator.

Add to your repo’s .pr_agent.toml (or wiki .pr_agent.toml) something like:

[pr_code_suggestions]
extra_instructions = """\
- Our codebase intentionally uses backticks (`) inside *string literals* (including f-strings) for formatting.
- Do NOT suggest replacing these with repr(), and do NOT suggest ignoring flake8 W604 when the flagged backticks are inside strings.
- Only flag W604 / repr-related issues if you see the actual deprecated backtick operator usage (not backticks in strings).
- Prefer explaining that it may be a linter false-positive and suggest validating the specific flake8 warning location/context.
"""

[pr_reviewer]
extra_instructions = """\
- Treat backticks (`) inside string literals (including f-strings) as intentional formatting.
- Avoid recommending repr() conversions or flake8 extend-ignore (W604) unless the deprecated backtick operator is actually used.
"""

If you want to confirm which settings Qodo Merge actually applies for /improve, run:
/improve --config.output_relevant_configurations=true

Relevant Sources:

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.

Add/test Python 3.12

1 participant