Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all development dependencies #2224

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Nov 12, 2023

Changes

  • Dependabot is seemingly unable to update dependencies if a directory contains both a setup.cfg and setup.py
  • Currently the dependencies are about 9 months out of date....this brings them all to their latest version

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16
Copy link
Member Author

well....this is much more interesting now. pre-commit is failing on running this version of black in CI....

@freakboy3742
Copy link
Member

/me grumbles... Github will send me three emails to notify me that someone has commented on a PR, and will email me when I comment on a ticket, but won't email me when an automated process fails....

@rmartin16
Copy link
Member Author

rmartin16 commented Nov 12, 2023

Was finally able to replicate locally....might have something to do with Python 3.12.

Nonetheless, I looked at the file it was complaining about:

❯ cat /home/russell/.cache/pre-commit/repol2sy9qbl/.pre-commit-hooks.yaml
# Note that we recommend using https://github.com/psf/black-pre-commit-mirror instead
# This will work about 2x as fast as using the hooks in this repository
- id: black
  name: black
  description: "Black: The uncompromising Python code formatter"
  entry: black
  stages: [pre-commit, pre-merge-commit, pre-push, manual]
  language: python
  minimum_pre_commit_version: 2.9.2
  require_serial: true
  types_or: [python, pyi]
- id: black-jupyter
  name: black-jupyter
  description:
    "Black: The uncompromising Python code formatter (with Jupyter Notebook support)"
  entry: black
  stages: [pre-commit, pre-merge-commit, pre-push, manual]
  language: python
  minimum_pre_commit_version: 2.9.2
  require_serial: true
  types_or: [python, pyi, jupyter]
  additional_dependencies: [".[jupyter]"]

Given the top two lines, I switched the config to use the mirror and things seem to be working now....

@rmartin16
Copy link
Member Author

FWIW, the "we" that is making this recommendation is apparently the maintainers of black....since this file comes from its repo: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml

@rmartin16
Copy link
Member Author

rmartin16 commented Nov 12, 2023

ohhh....the version of pre-commit that Toga uses is 9 months old....I'm guessing Dependabot doesn't recursively look for setup.cfg files...???? or is something intentional going on here?

@freakboy3742
Copy link
Member

ohhh....the version of pre-commit that Toga uses is 9 months old....I'm guessing Dependabot doesn't recursively look for setup.cfg files...???? or is something intentional going on here?

Definitely nothing intentional; I can't explain why pre-commit isn't being updated.

@rmartin16
Copy link
Member Author

Dependabot isn't updating anything in core/setup.cfg....all of the dependencies are out of date:

https://github.com/beeware/toga/network/updates/748619508

I wonder if it's only checking setup.py and moving on or something....

@freakboy3742
Copy link
Member

Hrm - I wonder if this is a case of having setup.py confusing the setup - if we moved to a setup.cfg-only configuration, it wouldn't think that the configuration is in setup.py, and therefore miss that all the dependencies are in setup.cfg.

@rmartin16
Copy link
Member Author

Yep; I just duplicated the toga repo, deleted core/setup.py, re-ran Dependabot and it created several PRs until it logged "Dependabot cannot open any more pull requests".

I'll just manually update everything in this PR for now to reset us.

@rmartin16 rmartin16 changed the title Bump black from 23.10.1 to 23.11.0 Update all development dependencies Nov 13, 2023
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Can't argue with CI success.

@freakboy3742 freakboy3742 merged commit 6fd5580 into beeware:main Nov 13, 2023
35 checks passed
@rmartin16 rmartin16 deleted the bump-black branch November 14, 2023 14:45
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.

2 participants