Comments (6)
Also seeing this
Watching /usr/local/lib/python3.12/site-packages/<project namespace>
Python 3.12
Watchfiles 0.21.0
from watchfiles.
@m3talstorm what will be because site-packages
is specifically ignored.
from watchfiles.
sorry i am confused. i didn't ask the program to ignore site-packages
. is this something built-in? i am interested in changes under site-packages
as sometimes i make changes directly to packages in there to test stuff.
from watchfiles.
is this documented somewhere? i found it now in watchfiles/filters.py
. i understand the idea behind sensible defaults, but is there a way for me to turn this off without editing the code?
from watchfiles.
I agree we should probably:
- Remove this from the list
- Document it better
- Document how to change it - I think just pass None or you're own method to filter - I'm afk right now so can't check
from watchfiles.
thank you for looking into this. a bit more context:
nowadays the list of files related to source code management (linting, formatting, etc), non python components not needing watching from python (nodejs, etc) has exploded multiple times over so instead of trying to keep track of that for now it's simpler to me to use watchfiles in whitelist mode (instead of a blacklist mode): i explicitly give it a list of python code folders to watch (including venv
, because it's useful sometimes to quickly make changes to installed packages) and making the django dev webserver reload if any of those files change.
in this mode the only default useful filter i can think of is __pycache__
, but those changes are related to actual source files are changed anyway. besides in dev mode i disable the python bytecode cache (python -B
).
i think listing in the documentation the default filters is just the correct thing to do, as people like me will scratch their heads not understanding why changes are being ignored..
another place where it could make sense to show a default filter was used is the debug messages. i remember disabling debug after a while because it was very chatty, but i dont remember if it called out default filter items or not.
from watchfiles.
Related Issues (20)
- Newly created subdirectories themselves arent getting watched recursively HOT 4
- 0.20.0: pytest is failing in 11 units HOT 4
- Watchfiles with editable packages HOT 2
- install trouble on SUSE11SP4: ERROR: Failed building wheel for maturin HOT 1
- Please keep a changelog HOT 1
- tests/test_watch.py::test_awatch_interrupt_raise is failing with anyio>=4 HOT 8
- .pyd ignored pattern is added back by PythonFilter.extensions HOT 1
- Problem installing on raspberry pi HOT 6
- Signal timeout does not propagate HOT 2
- awatch on a file on Linux trigger delete event HOT 4
- Please make a new release using pyo3 0.20.3 HOT 9
- Testsuite hangs on test_ignore_permission_denied on Debian i386 HOT 1
- Ignore error_handler errors under ignore_permission_denied = True? HOT 1
- Appends to an existing file get reported as `Change.added` HOT 1
- Release wheels for Python 3.13 HOT 3
- [Question] Possible to run multiple watch processes at once? HOT 1
- _rust_notify.WatchfilesRustInternalError: error in underlying watcher: IO error for operation on <python path>: No such file or directory (os error 2) HOT 19
- Unreasonable return HOT 1
- Ability to exclude certain directories from being watched HOT 1
- Doc link is broken HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watchfiles.