Code Monkey home page Code Monkey logo

Comments (6)

m3talstorm avatar m3talstorm commented on August 27, 2024

Also seeing this
Watching /usr/local/lib/python3.12/site-packages/<project namespace>

Python 3.12
Watchfiles 0.21.0

from watchfiles.

samuelcolvin avatar samuelcolvin commented on August 27, 2024

@m3talstorm what will be because site-packages is specifically ignored.

from watchfiles.

minusf avatar minusf commented on August 27, 2024

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.

minusf avatar minusf commented on August 27, 2024

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.

samuelcolvin avatar samuelcolvin commented on August 27, 2024

I agree we should probably:

  1. Remove this from the list
  2. Document it better
  3. 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.

minusf avatar minusf commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.