Skip to content

chore: modernize packaging - #14

Merged
tseaver merged 13 commits into
masterfrom
chore-modernize-packaging
Apr 30, 2026
Merged

chore: modernize packaging#14
tseaver merged 13 commits into
masterfrom
chore-modernize-packaging

Conversation

@tseaver

@tseaver tseaver commented Apr 25, 2026

Copy link
Copy Markdown
Member

No description provided.

tseaver added 13 commits April 25, 2026 11:05
- Add support for Python 3.14.
- Drop support for Python 3.9.
- Adopt 'src/' / 'tests/unit' layout.
- Remove running tests inside 'docs' build.
- Drop 'pkg_resources' namespace declaration.
- Drop runtime use of 'pkg_resources' for parsing retryables.
- Replace conditional imports w/ 'importlib.util.find_spec'

- Import stdlib modules at testcase module scope.

- Import 'repoze.retry' at testcase module scope:  use it to
  find the exception types, versus the now-removed 'CEBase'
  testcase class, as well as the 'Retry' class itself.

- Rename helpers for clarity.

- Replace 'unittest'-style assertions with 'assert'; 'self.assertRaises'
  with 'pytest.raises'.

- Remove testcase classes; replace class-level factories with fixtures.

- Use 'mock.Mock' for fixtures, versus hand-rolls.

- Lint tests to 'ruff check' standards.
Even though they don't get alled, the 'wsgiref.validator' asserts
if they aren't present.

@mauritsvanrees mauritsvanrees 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.

I am not using this package, but the changes look good to me.

@tseaver

tseaver commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

@mauritsvanrees thanks for the look. I'm holding off merging because of worry that switching away from pkg_resources namespaces creates a flag day for all repoze.* packages. Do you have experience with that in other projects?

@mauritsvanrees

Copy link
Copy Markdown
Member

I have experience with this on the Zope and Plone packages. There is no flag day needed.

I released repoze.xmliter 2.0a1 in December with native namespaces. See repoze/repoze.xmliter#22 and also the comment by @davisagli there. (I would like to release 2.0 final, if you don't mind.)

The best explanation may be what I write in the Plone 6.2 upgrade guide. Or a bit more verbose in the zc.buildout readme under "Native namespaces and breaking changes in 5.x".
Summary for the case where you have something like repoze.native and repoze.pkg_resources:

  • With normal (non-editable) installs, this works fine with pip and with zc.buildout 5. zc.buildout 4 or lower will fail.
  • When you use an editable install of one or both, it either already works, or you can make it work by first doing pip install horse-with-no-namespace.

@tseaver

tseaver commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

@mauritsvanrees Thanks very much for elucidating!

With that understanding now in my mental "context stack," please go ahead an make your release.

@tseaver
tseaver merged commit 3728c8e into master Apr 30, 2026
8 checks passed
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