Skip to content

Switch to uv for development - #1315

Merged
stevepiercy merged 60 commits into
mainfrom
1102-uv-dev
Apr 16, 2026
Merged

stevepiercy merged 60 commits into
mainfrom
1102-uv-dev

Conversation

@stevepiercy

@stevepiercy stevepiercy commented Apr 11, 2026 •

Copy link
Copy Markdown
Member

Closes issue

Description

Switch to uv for development.

Update documentation with new commands.

Checklist

  • I've added a change log entry to CHANGES.rst.
  • I've added or updated tests if applicable.
  • I've run and ensured all tests pass locally by following Run tests.
  • I've added or edited documentation, both as docstrings to be rendered in the API documentation and narrative documentation, as necessary.

📚 Documentation preview 📚: https://icalendar--1315.org.readthedocs.build/

- Configure tox to work with uv
…vale, doctest, html, and linkcheckbroken

- Remove unused all target
- Draft test target to run tox
…vale, doctest, html, and linkcheckbroken

- Remove unused `all` target
- Add `test` target to run tox
- Add `format` target to run ruff
- Update `tox.ini` to work with uv and uv-tox
…onfigure git, and start development or documenting.
@read-the-docs-community

read-the-docs-community Bot commented Apr 11, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 icalendar | 🛠️ Build #32284923 | 📁 Comparing e85f7e2 against latest (f0ba179)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@stevepiercy
stevepiercy marked this pull request as draft April 11, 2026 09:54
@stevepiercy

Copy link
Copy Markdown
Member Author

@niccokunzmann I can't remember what we did to fix this error https://github.com/collective/icalendar/actions/runs/24280322355/job/70901092097?pr=1315#step:6:74. Do you remember?

@niccokunzmann

niccokunzmann commented Apr 11, 2026 •

Copy link
Copy Markdown
Member

warning: icalendar defines settings for uv_build in tool.uv.build-backend, but uses hatchling.build as build backend instead

This is one indicator.

Because only sphinx-icalendar<=0.1.0 is available and
      sphinx-icalendar==0.1.0 depends on your project, we can conclude that
      sphinx-icalendar>=0.1.0 depends on your project.
      And because icalendar:dev depends on sphinx-icalendar>=0.1.0 and your
      project requires icalendar:dev, we can conclude that your project's
      requirements are unsatisfiable.

      hint: The package `sphinx-icalendar` depends on the package `icalendar`
      but the name is shadowed by your project. Consider changing the name of
      the project.

These are our edits for the problem:

I think, it somehow instructs UV to use icalendar from that source.
Fetching tags was one idea but that should not be it, really.

Also the clash between uv and hatchling is something I don't know much about. We could also change from hatchling to uv as a build backend. I am not attached. The only thing that I like having is the ability to release a new version based on tags. But that could be possible anyway with this: https://stackoverflow.com/a/32965521/1320237, so we can keep the same interface we have having at the moment, with icalendar.version.

Comment thread .github/workflows/tests.yml Outdated
Comment thread docs/_include/prerequisites.inc
Comment thread docs/_include/prerequisites.inc Outdated
Comment thread docs/contribute/development.rst
Comment thread docs/contribute/development.rst Outdated
Comment thread pyproject.toml Outdated
Comment thread tox.ini
@niccokunzmann

Copy link
Copy Markdown
Member

Thanks for doing the big load. Whenever you feel like it, I can start tinkering with this branch :)

@niccokunzmann

Copy link
Copy Markdown
Member

The test environment should not need the sphinx-icalendar package.

@niccokunzmann

Copy link
Copy Markdown
Member

The tests are running. We need to open an issue that the pytz tests are not working.
Or, we can just remove the nopytz tests fully and remove the tox dependency.

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Please see my suggestions and questions.

Comment thread .github/workflows/tests.yml Outdated
Comment thread pyproject.toml Outdated
Comment thread .github/workflows/test_generate_matrix.py Outdated
Comment thread .github/workflows/generate_matrix.py Outdated
@stevepiercy

Copy link
Copy Markdown
Member Author

The tests are running. We need to open an issue that the pytz tests are not working. Or, we can just remove the nopytz tests fully and remove the tox dependency.

Sorry, I don't understand which would be better.

Do we need nopytz tests? Removing tests would not remove the feature, but would remove testing the absence of the feature. Additionally, the feature has been deprecated since 6.0.0, although we said it "may still be used" per https://icalendar.readthedocs.io/en/stable/how-to/upgrade.html#pytz-support.

I think we should announce that pytz support will be removed in 8.0.0, since that would be a change in the promise. I think that we should make an announcement in the 7.0.4 release that pytz support, deprecated since 6.0.0, shall be removed in 8.0.0. That would give fair warning.

Does that help?

niccokunzmann and others added 4 commits April 15, 2026 22:42
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
niccokunzmann
niccokunzmann previously approved these changes Apr 15, 2026

@niccokunzmann niccokunzmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is good to go.
@stevepiercy have a final look if you like and merge it if you are satisfied!

Comment thread docs/contribute/development.rst
@niccokunzmann

Copy link
Copy Markdown
Member

Does that help?

Yes, that helps. There is the pytz issue and it is good if we drop pytz. It is outdated now. #1101 - can you update that on how you would like this to go or put in a PR?

@stevepiercy

Copy link
Copy Markdown
Member Author

Does that help?

Yes, that helps. There is the pytz issue and it is good if we drop pytz. It is outdated now. #1101 - can you update that on how you would like this to go or put in a PR?

Updated!

#1101

Please feel free to edit the description.

s/uv run pip list/uv tree
@stevepiercy
stevepiercy marked this pull request as ready for review April 15, 2026 23:15
@stevepiercy

Copy link
Copy Markdown
Member Author

@SashankBhamidi would you please do a review, per your request? I think this is ready to merge.

We decided to defer the replacement of tox with uv for another PR. This PR moves us forward, and makes it a lot easier to get started for contributors.

@SashankBhamidi SashankBhamidi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Few comments:

Comment thread .github/workflows/tests.yml Outdated
Comment thread Makefile
Comment thread docs/contribute/development.rst Outdated
Comment thread CHANGES.rst
Comment thread tox.ini
stevepiercy and others added 4 commits April 15, 2026 23:19
Should have been removed with f5bbd96

Co-authored-by: Sashank <hello@sashank.wiki>
Co-authored-by: Sashank <hello@sashank.wiki>
@stevepiercy

Copy link
Copy Markdown
Member Author

@SashankBhamidi thanks for the review! I double-checked make test TOX_ENV=py310 as well as for py314 and no TOX_ENV, and it works as I expect, but if it doesn't work for you, then please open an issue.

I'm going ahead and merge this monster. Thanks everyone!

@stevepiercy
stevepiercy merged commit 2adaf12 into main Apr 16, 2026
33 checks passed
@stevepiercy
stevepiercy deleted the 1102-uv-dev branch April 16, 2026 07:06
@SashankBhamidi

Copy link
Copy Markdown
Member

@stevepiercy You're right, apologies.

I didn't actually test the command locally. Thanks for the patience.

@SashankBhamidi SashankBhamidi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect.

stevepiercy added a commit that referenced this pull request Apr 16, 2026
This is a follow up to the just merged #1315, per a discussion with @SashankBhamidi in Signal.

tox actually handles this black magic, not Make.

https://github.com/tox-dev/tox/blob/4dcde44c0746138421bef38f1c0dac42ee505223/src/tox/config/cli/env_var.py#L24

No change log is needed, since it's removing dead code.
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.

Switch to uv for development

4 participants