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

Watchfiles with editable packages #247

Open
CharlesFr opened this issue Oct 3, 2023 · 1 comment
Open

Watchfiles with editable packages #247

CharlesFr opened this issue Oct 3, 2023 · 1 comment

Comments

@CharlesFr
Copy link

CharlesFr commented Oct 3, 2023

I have a docker-compose.yaml application using watchfiles to reload project files.

However, changes made to packages referenced locally and installed via pip install -e . aren't reflected. Changes only appear after rebuilding the whole clusters docker-compose up -d build." which is time-consuming.

My question is; how should I handle reloading packages installed via editable mode such that I don't need to rebuild every time?

I can confirm that adding sys.exit(0) inside the editable module launches a reload, but without the newly added line.

@samuelcolvin
Copy link
Owner

Yup, we've had the same problem at Pydantic, it's because by default we ignore changes in the site-packages directory.

'site-packages',

PR welcome to remove that directory from the list.

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

No branches or pull requests

2 participants