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

make yaml a extra dependency #297

Closed
RonnyPfannschmidt opened this Issue Feb 15, 2015 · 5 comments

Comments

Projects
None yet
5 participants
@RonnyPfannschmidt

RonnyPfannschmidt commented Feb 15, 2015

i'd love to use the core package, but i don't want the yaml dependency and i don't use the script

@ralsina

This comment has been minimized.

ralsina commented Jun 11, 2015

Same here. We are thinking about moving to watchdog from pure inotify in Nikola and Doit but the YAML dependency is hard to take.

@Kwpolska

This comment has been minimized.

Kwpolska commented Jun 12, 2015

I’d love to send a pull request, but I can’t get buildout to work. Here’s my patch for this feature instead:

diff --git a/setup.py b/setup.py
index ba7283c..8c27538 100644
--- a/setup.py
+++ b/setup.py
@@ -81,7 +81,7 @@ tests_require=['pytest', 'pytest-cov', 'pytest-timeout >=0.3']
 if sys.version_info < (2, 7, 0):
     tests_require.append('unittest2')

-install_requires = ['PyYAML >=3.10', 'argh >=0.24.1', 'pathtools >=0.1.1']
+install_requires = ['argh >=0.24.1', 'pathtools >=0.1.1']
 if sys.version_info < (2, 7, 0):
     # argparse is merged into Python 2.7 in the Python 2x series
     # and Python 3.2 in the Python 3x series.
@@ -92,6 +92,8 @@ if sys.version_info < (2, 7, 0):
         # which works.
         install_requires.append('select_backport >=0.2')

+cmd_requires = ['PyYAML >=3.10']
+
 with open('README.rst') as f:
     readme = f.read()

@@ -142,6 +144,7 @@ setup(name="watchdog",
       packages=find_packages(SRC_DIR),
       include_package_data=True,
       install_requires=install_requires,
+      extras_require={'cmd': cmd_requires},
       tests_require=tests_require,
       cmdclass={
           'build_ext': build_ext,

core-only usage:

$ pip install watchdog

cmd usage:

$ pip install "watchdog[cmd]"

Maintainers: please review and apply if possible, we’d all appreciate it 😃

@RonnyPfannschmidt

This comment has been minimized.

RonnyPfannschmidt commented Jun 13, 2015

The extra also needs to be added to script entrypoints

@fluffy-critter

This comment has been minimized.

fluffy-critter commented Jan 4, 2019

Nearly four years later, and a dependency on watchdog is causing all of my projects to get GitHub security audit alerts for a dependency on a library that's not even used by consumers of the library. Any chance this could get looked at again?

Thanks!

@BoboTiG

This comment has been minimized.

Collaborator

BoboTiG commented Jan 4, 2019

Of course, will open a PR for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment