Skip to content

Refactor to put core modules in subpackage#184

Merged
almarklein merged 2 commits intomainfrom
refactor
Mar 3, 2026
Merged

Refactor to put core modules in subpackage#184
almarklein merged 2 commits intomainfrom
refactor

Conversation

@almarklein
Copy link
Member

This just moves files around. No changes to the logic.

All our backends are in the library root, so they are easy to import from rendercanvas.xx import RenderCanvas, loop. But our core modules were also in the root, and I thought things were getting messy.

I considered moving all backend modules into a backends subpackage, and then doing some lazy loading mechanic with def __getattr__ in the __init__.py, but that made me feel itchy, so let's keep it simple:

  • Core modules go in core/
  • Public utilities go in utils/
  • Context logic goes in contexts/
  • Only backend modules go in the root, with __init__.py and _version.py being the sole exceptions.

@almarklein almarklein merged commit 2530d72 into main Mar 3, 2026
38 of 39 checks passed
@almarklein almarklein deleted the refactor branch March 3, 2026 11:27
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