Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gorakhargosh/watchdog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.1
Choose a base ref
...
head repository: gorakhargosh/watchdog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.0
Choose a head ref

Commits on Feb 7, 2014

  1. change sphinx theme. closes #45

    better late than never..
    tamland committed Feb 7, 2014
    Copy the full SHA
    b70fe06 View commit details

Commits on Feb 8, 2014

  1. Copy the full SHA
    e37e490 View commit details
  2. Copy the full SHA
    54bbc15 View commit details
  3. be quiet travis

    tamland committed Feb 8, 2014
    Copy the full SHA
    2f2f53a View commit details

Commits on Feb 10, 2014

  1. fix some tests and add delay for everything that tests modification (…

    …mtime have too low precision)
    tamland committed Feb 10, 2014
    Copy the full SHA
    9a45398 View commit details
  2. refactor DirectorySnapshot and DirectorySnapshotDiff

    includes removal of parameter _copying and method copy,
    deprecation of methods for DirectorySnapshot
    tamland committed Feb 10, 2014
    Copy the full SHA
    2d1b877 View commit details

Commits on Feb 13, 2014

  1. remove unused code

    tamland committed Feb 13, 2014
    Copy the full SHA
    d071c12 View commit details
  2. remove unused code

    tamland committed Feb 13, 2014
    Copy the full SHA
    1e71946 View commit details
  3. Copy the full SHA
    273cc8b View commit details
  4. cosmetics

    tamland committed Feb 13, 2014
    Copy the full SHA
    801765f View commit details
  5. Copy the full SHA
    8d5342c View commit details

Commits on Feb 14, 2014

  1. fix path in windows tests

    tamland committed Feb 14, 2014
    Copy the full SHA
    1fcb7c2 View commit details
  2. fix path in windows tests

    tamland committed Feb 14, 2014
    Copy the full SHA
    d88ae9e View commit details

Commits on Feb 15, 2014

  1. 4
    Copy the full SHA
    2c2723d View commit details
  2. Copy the full SHA
    54c2730 View commit details
  3. Copy the full SHA
    f8b6640 View commit details
  4. Copy the full SHA
    bf89c14 View commit details
  5. Copy the full SHA
    12d60a9 View commit details

Commits on Feb 16, 2014

  1. Copy the full SHA
    7252ad5 View commit details
  2. Copy the full SHA
    08a0a3d View commit details
  3. Copy the full SHA
    af5f241 View commit details

Commits on Feb 22, 2014

  1. Copy the full SHA
    7ef8dce View commit details
  2. Copy the full SHA
    2af8469 View commit details
  3. Copy the full SHA
    0090690 View commit details
  4. Copy the full SHA
    5200577 View commit details
  5. Copy the full SHA
    a59f58d View commit details
  6. undeprecate stat_info

    tamland committed Feb 22, 2014
    Copy the full SHA
    2af868a View commit details

Commits on Feb 23, 2014

  1. Copy the full SHA
    13c6286 View commit details
  2. Copy the full SHA
    f4282d6 View commit details
  3. avoid calling stat twice for each path by using listdir instead of os…

    ….walk
    
    benchmarked to around twice as fast as old snapshot
    tamland committed Feb 23, 2014
    Copy the full SHA
    2b9ecf2 View commit details
  4. add listdir parameter

    tamland committed Feb 23, 2014
    Copy the full SHA
    dfaa083 View commit details
  5. remove outdated information

    tamland committed Feb 23, 2014
    Copy the full SHA
    ce27391 View commit details
  6. forgot to check for recursive

    tamland committed Feb 23, 2014
    Copy the full SHA
    1a2be46 View commit details
  7. remove unused imports

    tamland committed Feb 23, 2014
    Copy the full SHA
    10ee902 View commit details

Commits on Mar 16, 2014

  1. Copy the full SHA
    133ecf3 View commit details
  2. Merge pull request #223 from Ormod/syntax

    win32stat: Change python2 syntax octal integers to also work with py3k
    tamland committed Mar 16, 2014
    Copy the full SHA
    1807b38 View commit details

Commits on Mar 18, 2014

  1. Copy the full SHA
    d3214cc View commit details

Commits on Mar 22, 2014

  1. Send the signal to the process group of the spawned process

    thus handling all its children in the same group
    (setsid is needed to get the process into a different group than watchdog)
    berdario committed Mar 22, 2014
    Copy the full SHA
    7095e95 View commit details

Commits on Mar 23, 2014

  1. Merge pull request #225 from berdario/terminate_subprocesses

    Terminate all subprocesses
    tamland committed Mar 23, 2014
    Copy the full SHA
    3a0f0ec View commit details

Commits on Mar 28, 2014

  1. Copy the full SHA
    060e59a View commit details

Commits on Mar 31, 2014

  1. Merge pull request #228 from cro/no-parallel-option

    Convert patch for --no-parallel to a PR
    tamland committed Mar 31, 2014
    Copy the full SHA
    a5d0f5d View commit details

Commits on Apr 1, 2014

  1. Copy the full SHA
    3bcd354 View commit details

Commits on Apr 2, 2014

  1. Copy the full SHA
    ff42831 View commit details

Commits on Apr 4, 2014

  1. add vfs observer

    tamland committed Apr 4, 2014
    Copy the full SHA
    68a32e3 View commit details
  2. Copy the full SHA
    b8e5db0 View commit details
  3. improve documentation

    tamland committed Apr 4, 2014
    Copy the full SHA
    2f095a2 View commit details
  4. Copy the full SHA
    c45a6dc View commit details
  5. fix heading

    tamland committed Apr 4, 2014
    Copy the full SHA
    87ecfdc View commit details
  6. fix references

    tamland committed Apr 4, 2014
    Copy the full SHA
    66e58e2 View commit details
  7. remove unused import

    tamland committed Apr 4, 2014
    Copy the full SHA
    cd649a0 View commit details
Showing with 1,523 additions and 1,136 deletions.
  1. +1 −0 .gitignore
  2. +0 −3 .gitmodules
  3. +4 −0 .travis.yml
  4. +2 −1 MANIFEST.in
  5. +12 −2 README.rst
  6. +10 −0 changelog.rst
  7. +0 −1 docs/source/_themes
  8. +6 −0 docs/source/api.rst
  9. +2 −5 docs/source/conf.py
  10. +1 −1 docs/source/global.rst.inc
  11. +1 −1 docs/source/hacking.rst
  12. +17 −24 docs/source/installation.rst
  13. +8 −3 setup.py
  14. +36 −43 src/watchdog/events.py
  15. +1 −6 src/watchdog/observers/api.py
  16. +238 −0 src/watchdog/observers/fsevents2.py
  17. +53 −54 src/watchdog/observers/inotify.py
  18. +117 −0 src/watchdog/observers/inotify_buffer.py
  19. +43 −90 src/watchdog/observers/inotify_c.py
  20. +41 −20 src/watchdog/observers/polling.py
  21. +47 −78 src/watchdog/observers/read_directory_changes.py
  22. +0 −60 src/watchdog/observers/read_directory_changes_async.py
  23. +102 −15 src/watchdog/observers/winapi.py
  24. +0 −147 src/watchdog/observers/winapi_common.py
  25. +14 −7 src/watchdog/tricks/__init__.py
  26. +11 −32 src/watchdog/utils/__init__.py
  27. +1 −6 src/watchdog/utils/bricks.py
  28. +20 −0 src/watchdog/utils/compat.py
  29. +132 −198 src/watchdog/utils/dirsnapshot.py
  30. +123 −0 src/watchdog/utils/win32stat.py
  31. +2 −2 src/watchdog/version.py
  32. +25 −20 src/watchdog/watchmedo.py
  33. +28 −5 tests/__init__.py
  34. 0 tests/{ → legacy}/test_watch_observers_winapi.py
  35. +1 −158 tests/{ → legacy}/test_watchdog_events.py
  36. 0 tests/{ → legacy}/test_watchdog_observers_api.py
  37. +2 −9 tests/{ → legacy}/test_watchdog_observers_polling.py
  38. 0 tests/{ → legacy}/utils.py
  39. +7 −1 tests/shell.py
  40. +200 −0 tests/test_emitter.py
  41. +102 −0 tests/test_inotify_buffer.py
  42. +108 −0 tests/test_snapshot_diff.py
  43. +0 −144 tests/test_watchdog_directory_snapshot.py
  44. +5 −0 tox.ini
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ __MACOSX__

# Ignore generated files and directories.
*.egg-info/
*.egg
.installed.cfg
bin/
bin25/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "docs/source/_themes"]
path = docs/source/_themes
url = git://github.com/mitsuhiko/flask-sphinx-themes.git
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -5,10 +5,14 @@ python:
- 2.7
- 3.2
- 3.3
- 3.4
- pypy

install:
- python setup.py install

script:
- python setup.py test

notifications:
email: false
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include changelog.rst
include LICENSE
include COPYING
include AUTHORS
@@ -8,7 +9,7 @@ include docs/*.xml
include docs/Makefile
include docs/make.bat
recursive-include docs/source *
prune docs/source/_themes/.git*
recursive-include tests *
#global-exclude .DS_Store
#global-exclude Thumbs.db
#global-exclude Desktop.ini
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -156,6 +156,12 @@ Documentation
-------------
You can browse the latest release documentation_ online.

Contribute
----------
Fork the `repository`_ on GitHub and send a pull request, or file an issue
ticket at the `issue tracker`_. For general help and questions use the official
`mailing list`_ or ask on `stackoverflow`_ with tag `python-watchdog`.

Supported Platforms
-------------------
* Linux 2.6 (inotify)
@@ -197,9 +203,9 @@ this feature.

Dependencies
------------
1. Python 2.5 or above.
1. Python 2.6 or above.
2. pathtools_
3. select_backport_ (select.kqueue replacement for Python2.5/2.6 on BSD/Mac OS X)
3. select_backport_ (select.kqueue replacement for 2.6 on BSD/Mac OS X)
4. XCode_ (only on Mac OS X)
5. PyYAML_ (only for ``watchmedo`` script)
6. argh_ (only for ``watchmedo`` script)
@@ -238,6 +244,10 @@ to do:
.. _issue tracker: http://github.com/gorakhargosh/watchdog/issues
.. _Apache License, version 2.0: http://www.apache.org/licenses/LICENSE-2.0
.. _documentation: http://packages.python.org/watchdog/
.. _stackoverflow: http://stackoverflow.com/questions/tagged/python-watchdog
.. _mailing list: http://groups.google.com/group/watchdog-python
.. _repository: http://github.com/gorakhargosh/watchdog
.. _issue tracker: http://github.com/gorakhargosh/watchdog/issues

.. _homebrew: http://mxcl.github.com/homebrew/
.. _select_backport: http://pypi.python.org/pypi/select_backport
10 changes: 10 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

API changes
-----------

0.8.0
++++++

- ``DirectorySnapshot``: methods returning internal stat info replaced by
``mtime``, ``inode`` and ``path`` methods.
- ``DirectorySnapshot``:``walker_callback`` parameter deprecated.
1 change: 0 additions & 1 deletion docs/source/_themes
Submodule _themes deleted from 3d964b
6 changes: 6 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -24,6 +24,12 @@ API Reference
.. automodule:: watchdog.observers


`watchdog.observers.polling`
============================

.. automodule:: watchdog.observers.polling


`watchdog.utils`
================

7 changes: 2 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -19,8 +19,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
TOP_DIR_PATH = os.path.abspath('../../')
SRC_DIR_PATH = os.path.join(TOP_DIR_PATH, 'src')
#sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath('_themes'))
sys.path.insert(0, SRC_DIR_PATH)

import watchdog.version
@@ -104,7 +102,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'default'
html_theme = 'flask'
html_theme = 'pyramid'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -113,7 +111,6 @@

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['_themes']

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@@ -134,7 +131,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
2 changes: 1 addition & 1 deletion docs/source/global.rst.inc
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
.. |author_email| replace:: yesudeep@gmail.com
.. |copyright| replace:: Copyright 2012 Google, Inc.
.. |project_name| replace:: ``watchdog``
.. |project_version| replace:: 0.7.1
.. |project_version| replace:: 0.8.0

.. _issue tracker: http://github.com/gorakhargosh/watchdog/issues
.. _code repository: http://github.com/gorakhargosh/watchdog
2 changes: 1 addition & 1 deletion docs/source/hacking.rst
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ beginning to hack:
2. git_
3. ssh
4. XCode_ (on Mac OS X)
5. select_backport_ (on BSD/Mac OS X if you're using Python 2.5/2.6)
5. select_backport_ (on BSD/Mac OS X if you're using Python 2.6)

Setting up the Work Environment
-------------------------------
41 changes: 17 additions & 24 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

Installation
============
|project_name| requires Python 2.5 or above to work. If you are using a
|project_name| requires Python 2.6 or above to work. If you are using a
Linux/FreeBSD/Mac OS X system, you already have Python installed. However,
you may wish to upgrade your system to Python 2.7 at least, because this
version comes with updates that can reduce compatibility
@@ -57,12 +57,10 @@ using.
| argparse_ | Yes | Yes | Yes | Yes |
+---------------------+-------------+-------------+-------------+-------------+
| select_backport_ | | | Yes | Yes |
| (Python 2.5/2.6) | | | | |
| (Python 2.6) | | | | |
+---------------------+-------------+-------------+-------------+-------------+
| pathtools_ | Yes | Yes | Yes | Yes |
+---------------------+-------------+-------------+-------------+-------------+
| a lot of luck | Yes | | | |
+---------------------+-------------+-------------+-------------+-------------+


Installing Dependencies
@@ -94,9 +92,14 @@ supported:

Linux 2.6+
Linux kernel version 2.6 and later come with an API called inotify_
that programs can use to monitor file system events. |project_name| can
use this feature by relying on a third party library for python
called PyInotify_. (Future releases may remove this dependency.)
that programs can use to monitor file system events.

.. NOTE:: On most systems the maximum number of watches that can be
created per user is limited to ``8192``. |project_name| needs one
per directory to monitor. To change this limit, edit
``/etc/sysctl.conf`` and add::

fs.inotify.max_user_watches=16384


Mac OS X
@@ -140,11 +143,9 @@ _`BSD Unix variants`


Windows Vista and later
The Windows API on Windows XP provides the ReadDirectoryChangesW_
function, which operates in either synchronous or asynchronous mode.
|project_name| currently contains implementation for the synchronous
approach and use additional API functionality only available in Windows
Vista and later.
The Windows API provides the ReadDirectoryChangesW_. |project_name|
currently contains implementation for a synchronous approach requiring
additional API functionality only available in Windows Vista and later.

.. NOTE:: Since renaming is not the same operation as movement
on Windows, |project_name| tries hard to convert renames to
@@ -155,19 +156,11 @@ Windows Vista and later
in order to successfully queue movement events for
files and directories within it.

.. NOTE:: Since the Windows API does not provide information about whether
an object is a file or a directory, delete events for directories
may be reported as a file deleted event.

OS Independent Polling
|project_name| also includes a fallback-implementation that polls
watched directories for changes by periodically comparing snapshots
of the directory tree.

.. NOTE:: Windows caveats again.

Because Windows has no concept of ``inodes`` as Unix-y
platforms do, there is no current reliable way of determining
file/directory movement on Windows without help from the
Windows API.

You can use hashing for only those files in which you are
interested in your event handlers to determine
this, although it is rather slow. |project_name| does not
attempt to handle this on Windows. It is left to your discretion.
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -71,11 +71,11 @@ def run_tests(self):
errno = pytest.main(self.test_args)
sys.exit(errno)

tests_require=['pytest', 'pytest-cov']
tests_require=['pytest', 'pytest-cov', 'pytest-timeout >=0.3']
if sys.version_info < (2, 7, 0):
tests_require.append('unittest2')

install_requires = ['PyYAML >=3.09', 'argh >=0.8.1', 'pathtools >=0.1.1']
install_requires = ['PyYAML >=3.10', '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.
@@ -86,11 +86,16 @@ def run_tests(self):
# which works.
install_requires.append('select_backport >=0.2')

with open('README.rst') as f:
readme = f.read()

with open('changelog.rst') as f:
changelog = f.read()

setup(name="watchdog",
version=version.VERSION_STRING,
description="Filesystem events monitoring",
long_description=open('README.rst').read(),
long_description=readme + '\n\n' + changelog,
author="Yesudeep Mangalapilly",
author_email="yesudeep@gmail.com",
license="Apache License 2.0",
Loading