You can try with the Python 3.10 beta that allows to install any package you like.
I need a recent bug fix to fpdf2, so I am experimenting with this right now:
In this question there are considerations that may be helpful.
EDIT
I don’t know what happens (because I don’t own that repository and I haven’t tested with a repository I own) when the master has a new commit, but has no new version.
I know Anvil caches the environments, so it doesn’t need to rebuild them every time you use them, but I don’t know any details about the caching.
I assume the key for the caching is requirements.txt, so any changes to requirements.txt will trigger the creation (or retrieval from cache) of the new environment. If this is the case, then using the master branch may cause the environment to be built with whatever master is at the time the environment is built and never be updated. And if this is the case, I wouldn’t know how to trigger a new update when master changes.
So, if you want to work with your own repository, you may need to create a new package version, then update requirements.txt in Anvil every time you change your repository. Maybe.
