Skip to content

Commit

Permalink
Allow using fsnotify to watch for filesystem changes. Fixes #238
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Mar 3, 2021
1 parent ef1bbc9 commit 22d7fcc
Show file tree
Hide file tree
Showing 20 changed files with 1,487 additions and 89 deletions.
55 changes: 54 additions & 1 deletion ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,58 @@ LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.


17) fsnotify (MIT)
From https://github.com/fabioz/fsnotify

17) All third party packages in node_modules folders are licensed under the licenses specified in those packages.
Copyright (c) 2021, Fabio Zadrozny

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

18) scandir is released under the new BSD 3-clause license.
From: https://github.com/benhoyt/scandir

Copyright (c) 2012, Ben Hoyt
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of Ben Hoyt nor the names of its contributors may be used
to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

19) All third party packages in node_modules folders are licensed under the licenses specified in those packages.
24 changes: 15 additions & 9 deletions robocorp-python-ls-core/.pydevproject
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/src</path>
<path>/${PROJECT_DIR_NAME}/tests</path>
<path>/${PROJECT_DIR_NAME}/src/robocorp_ls_core/libs/watchdog_lib</path>
<path>/${PROJECT_DIR_NAME}/src/robocorp_ls_core/libs/yaml_lib</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_ADDITIONAL_GRAMMAR_VALIDATION">3.6</pydev_property>

<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>

<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>

<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/src</path>
<path>/${PROJECT_DIR_NAME}/tests</path>
<path>/${PROJECT_DIR_NAME}/src/robocorp_ls_core/libs/watchdog_lib</path>
<path>/${PROJECT_DIR_NAME}/src/robocorp_ls_core/libs/yaml_lib</path>
<path>/${PROJECT_DIR_NAME}/src/robocorp_ls_core/libs/fsnotify_lib</path>
</pydev_pathproperty>

<pydev_property name="org.python.pydev.PYTHON_ADDITIONAL_GRAMMAR_VALIDATION">3.6</pydev_property>

</pydev_project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The files in this directory contain fsnotify.

To update, erase it and run:

pip install fsnotify --target .

This folder should be automatically added to the PYTHONPATH when needed.

IMPORTANT: Keep __init__.py in directory
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2021, Fabio Zadrozny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Metadata-Version: 2.1
Name: fsnotify
Version: 0.2.1
Summary: Simple file watching
Home-page: https://github.com/fabioz/fsnotify
Author: Fabio Zadrozny
Author-email: fabiofz@gmail.com
License: MIT license
Keywords: fsnotify filesystem notifications watchdog watchgod
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

<!-- Uncomment these lines after releasing the package to PyPI for version and downloads badges -->
<!--[![PyPI Shield](https://img.shields.io/pypi/v/fsnotify.svg)](https://pypi.python.org/pypi/fsnotify)-->
<!--[![Downloads](https://pepy.tech/badge/fsnotify)](https://pepy.tech/project/fsnotify)-->
[![Github Actions Shield](https://img.shields.io/github/workflow/status/fabioz/fsnotify/Run%20Tests)](https://github.com/fabioz/fsnotify/actions)



# fsnotify

Simple python file watching with throttling when polling.

- Homepage: https://github.com/fabioz/fsnotify

# Overview

The idea for this project is making the fastest possible polling-based file watching
with throttling to avoid high CPU usage when polling.

# Install

## Requirements

**fsnotify** has been developed and tested on [Python 2.7, 3.5, 3.6, 3.7 and 3.8](https://www.python.org/downloads/)


## Install from PyPI

```bash
pip install fsnotify
```

This will pull and install the latest stable release from [PyPI](https://pypi.org/).


# History

FSNotify 0.2.0
---------------

Paths to track may now be a List[TrackedPath], indicating whether each path
should be tracked recursively or not.


FSNotify 0.1.6
---------------

First stable version. Should be able to properly do recursive file watching
of all passed paths using throttling to avoid high CPU usage when polling

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fsnotify-0.2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
fsnotify-0.2.1.dist-info/LICENSE,sha256=X47D6i39KocE8tJLUBJoKnELkQVDapxTUn3neBOOheA,1073
fsnotify-0.2.1.dist-info/METADATA,sha256=7lZBnk7vBbxc9-YVTmjkI_2MGFGe-U0Cj8vI2OMUknM,2456
fsnotify-0.2.1.dist-info/RECORD,,
fsnotify-0.2.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
fsnotify-0.2.1.dist-info/WHEEL,sha256=Z-nyYpwrcSqxfdux5Mbn_DQ525iP7J2DG3JgGvOYyTQ,110
fsnotify-0.2.1.dist-info/top_level.txt,sha256=Uik-6AdG4ijxEWJNdpPiqvXd6SpTT_vcbob_kjDrolU,9
fsnotify/__init__.py,sha256=6V5wW_d1PUQUsm5xIr78sVQVNTASkOsj4LJV88qcjt4,13442
fsnotify/__pycache__/__init__.cpython-37.pyc,,
fsnotify/__pycache__/scandir_vendored.cpython-37.pyc,,
fsnotify/scandir_vendored.py,sha256=KCOwdkBO2IA_hye_IV41JLNzpbYP45rJB0RiqXTAI8s,26249
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.36.2)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fsnotify
Loading

0 comments on commit 22d7fcc

Please sign in to comment.