Skip to content

Commit 86b983a

Browse files
committed
Finish the Python 2.7 and 3.4 drops and prepare for the upcoming v1.0.0
1 parent a5cc00d commit 86b983a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+293
-685
lines changed

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ __MACOSX__
1919
*.egg-info/
2020
*.egg
2121
.installed.cfg
22-
bin/
23-
bin25/
24-
bin26/
25-
bin27/
2622
build/
2723
develop-eggs/
2824
dist/

.travis.yml

+28-15
Original file line numberDiff line numberDiff line change
@@ -50,66 +50,78 @@ jobs:
5050
install:
5151
- unset PYENV_ROOT
5252
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
53-
- export PATH="$HOME/.pyenv/bin:$PATH"
5453
- eval "$(pyenv init -)"
5554
- pyenv install --skip-existing 3.5.10
5655
- pyenv global 3.5.10
57-
env: TOXENV=py35
56+
env:
57+
- TOXENV=py35
58+
- PYENV_ROOT="$HOME/.pyenv/versions/3.5.10"
59+
- PATH="$PYENV_ROOT/bin:$PATH"
5860
- name: Python 3.6 on macOS
5961
os: osx
6062
language: shell
6163
install:
6264
- unset PYENV_ROOT
6365
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
64-
- export PATH="$HOME/.pyenv/bin:$PATH"
6566
- eval "$(pyenv init -)"
6667
- pyenv install --skip-existing 3.6.12
67-
- pyenv global system 3.6.12
68-
env: TOXENV=py36
68+
- pyenv global 3.6.12
69+
env:
70+
- TOXENV=py36
71+
- PYENV_ROOT="$HOME/.pyenv/versions/3.6.12"
72+
- PATH="$PYENV_ROOT/bin:$PATH"
6973
- name: Python 3.7 on macOS
7074
os: osx
7175
language: shell
7276
install:
7377
- unset PYENV_ROOT
7478
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
75-
- export PATH="$HOME/.pyenv/bin:$PATH"
7679
- eval "$(pyenv init -)"
7780
- pyenv install --skip-existing 3.7.9
7881
- pyenv global system 3.7.9
79-
env: TOXENV=py37
82+
env:
83+
- TOXENV=py37
84+
- PYENV_ROOT="$HOME/.pyenv/versions/3.7.9"
85+
- PATH="$PYENV_ROOT/bin:$PATH"
8086
- name: Python 3.8 on macOS
8187
os: osx
8288
language: shell
8389
install:
8490
- unset PYENV_ROOT
8591
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
86-
- export PATH="$HOME/.pyenv/bin:$PATH"
8792
- eval "$(pyenv init -)"
8893
- pyenv install --skip-existing 3.8.6
8994
- pyenv global system 3.8.6
90-
env: TOXENV=py38
95+
env:
96+
- TOXENV=py38
97+
- PYENV_ROOT="$HOME/.pyenv/versions/3.8.6"
98+
- PATH="$PYENV_ROOT/bin:$PATH"
9199
- name: Python 3.9 on macOS
92100
os: osx
93101
language: shell
94102
install:
95103
- unset PYENV_ROOT
96104
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
97-
- export PATH="$HOME/.pyenv/bin:$PATH"
98105
- eval "$(pyenv init -)"
99-
- pyenv install --skip-existing 3.9-dev
100-
- pyenv global system 3.9-dev
101-
env: TOXENV=py39
106+
- pyenv install --skip-existing 3.9.0
107+
- pyenv global system 3.9.0
108+
env:
109+
- TOXENV=py39
110+
- PYENV_ROOT="$HOME/.pyenv/versions/3.9.0"
111+
- PATH="$PYENV_ROOT/bin:$PATH"
102112
- name: Python 3.10 on macOS
103113
os: osx
104114
language: shell
105115
install:
106116
- unset PYENV_ROOT
107117
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
108-
- export PATH="$HOME/.pyenv/bin:$PATH"
109118
- eval "$(pyenv init -)"
110119
- pyenv install --skip-existing 3.10-dev
111120
- pyenv global system 3.10-dev
112-
env: TOXENV=py310
121+
env:
122+
- TOXENV=py310
123+
- PYENV_ROOT="$HOME/.pyenv/versions/3.10-dev"
124+
- PATH="$PYENV_ROOT/bin:$PATH"
113125
- name: Python 3.5 on Windows
114126
os: windows
115127
language: shell
@@ -160,6 +172,7 @@ jobs:
160172
- export PATH="/c/Python310:/c/Python310/Scripts:$PATH"
161173

162174
before_script:
175+
- python -V
163176
- python -m pip install -U pip tox
164177
- python -m tox --notest # Note: keep it!
165178

COPYING

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Copyright 2011 Yesudeep Mangalapilly <[email protected]>
2-
Copyright 2012 Google, Inc.
2+
Copyright 2012 Google, Inc & contributors.
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

README.rst

+22-11
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ Watchdog
66

77
Python API and shell utilities to monitor file system events.
88

9-
Works on Python 2.7 and 3.4+. If you want to use an old version of Python, you should stick with watchdog < 0.10.0.
9+
Works on 3.5+.
10+
11+
If you want to use Python 2.6, you should stick with watchdog < 0.10.0.
12+
If you want to use Python 2.7 or 3.4, you should stick with watchdog < 1.0.0.
1013

1114
Example API Usage
1215
-----------------
16+
1317
A simple program that uses watchdog to monitor directories specified
1418
as command-line arguments and logs events generated:
1519

@@ -40,6 +44,7 @@ as command-line arguments and logs events generated:
4044
4145
Shell Utilities
4246
---------------
47+
4348
Watchdog comes with an *optional* utility script called ``watchmedo``.
4449
Please type ``watchmedo --help`` at the shell prompt to
4550
know more about this tool.
@@ -76,6 +81,7 @@ Please see the help information for these commands by typing:
7681
7782
About ``watchmedo`` Tricks
7883
~~~~~~~~~~~~~~~~~~~~~~~~~~
84+
7985
``watchmedo`` can read ``tricks.yaml`` files and execute tricks within them in
8086
response to file system events. Tricks are actually event handlers that
8187
subclass ``watchdog.tricks.Trick`` and are written by plugin authors. Trick
@@ -112,20 +118,16 @@ The directory containing the ``tricks.yaml`` file will be monitored. Each trick
112118
class is initialized with its corresponding keys in the ``tricks.yaml`` file as
113119
arguments and events are fed to an instance of this class as they arrive.
114120

115-
Tricks will be included in the 0.5.0 release. I need community input about them.
116-
Please file enhancement requests at the `issue tracker`_.
117-
118-
119121
Installation
120122
------------
121123
Install from PyPI using ``pip``:
122124

123125
.. code-block:: bash
124126
125-
$ python -m pip install watchdog
127+
$ python -m pip install -U watchdog
126128
127129
# or to install the watchmedo utility:
128-
$ python -m pip install watchdog[watchmedo]
130+
$ python -m pip install -U watchdog[watchmedo]
129131
130132
Install from source:
131133

@@ -139,6 +141,7 @@ Install from source:
139141
140142
Installation Caveats
141143
~~~~~~~~~~~~~~~~~~~~
144+
142145
The ``watchmedo`` script depends on PyYAML_ which links with LibYAML_,
143146
which brings a performance boost to the PyYAML parser. However, installing
144147
LibYAML_ is optional but recommended. On Mac OS X, you can use homebrew_
@@ -153,31 +156,34 @@ do it on Ubuntu:
153156

154157
.. code-block:: bash
155158
156-
$ sudo aptitude install libyaml-dev
159+
$ sudo apt install libyaml-dev
157160
158161
On Windows, please install PyYAML_ using the binaries they provide.
159162

160163
Documentation
161164
-------------
165+
162166
You can browse the latest release documentation_ online.
163167

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

170175
Create and activate your virtual environment, then::
171176

172177
python -m pip install pytest pytest-cov
173-
python -m pip install -e .[watchmedo]
178+
python -m pip install -e ".[watchmedo]"
174179
python -m pytest tests
175180

176181
If you are making a substantial change, add an entry to the "Unreleased" section
177182
of the `changelog`_.
178183

179184
Supported Platforms
180185
-------------------
186+
181187
* Linux 2.6 (inotify)
182188
* Mac OS X (FSEvents, kqueue)
183189
* FreeBSD/BSD (kqueue)
@@ -206,6 +212,7 @@ files.
206212

207213
About using watchdog with editors like Vim
208214
------------------------------------------
215+
209216
Vim does not modify files unless directed to do so.
210217
It creates backup files and then swaps them in to replace
211218
the files you are editing on the disk. This means that
@@ -217,6 +224,7 @@ this feature.
217224

218225
About using watchdog with CIFS
219226
------------------------------
227+
220228
When you want to watch changes in CIFS, you need to explicitly tell watchdog to
221229
use ``PollingObserver``, that is, instead of letting watchdog decide an
222230
appropriate observer like in the example above, do::
@@ -226,25 +234,28 @@ appropriate observer like in the example above, do::
226234

227235
Dependencies
228236
------------
229-
1. Python 3.4 or above.
237+
238+
1. Python 3.5 or above.
230239
3. XCode_ (only on Mac OS X)
231240
4. PyYAML_ (only for ``watchmedo`` script)
232241
5. argh_ (only for ``watchmedo`` script)
233242

234243

235244
Licensing
236245
---------
246+
237247
Watchdog is licensed under the terms of the `Apache License, version 2.0`_.
238248

239249
Copyright 2011 `Yesudeep Mangalapilly`_.
240250

241-
Copyright 2012 Google, Inc.
251+
Copyright 2012 Google, Inc & contributors.
242252

243253
Project `source code`_ is available at Github. Please report bugs and file
244254
enhancement requests at the `issue tracker`_.
245255

246256
Why Watchdog?
247257
-------------
258+
248259
Too many people tried to do the same thing and none did what I needed Python
249260
to do:
250261

changelog.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
Changelog
44
---------
55

6-
0.10.5
7-
~~~~~~
6+
1.0.0
7+
~~~~~
88

99
2021-xx-xx • `full history <https://github.com/gorakhargosh/watchdog/compare/v0.10.4...master>`__
1010

11-
- Allow file paths on Unix that don't follow the file system encoding (`# <https://github.com/gorakhargosh/watchdog/pull/703>`_)
12-
- Drop support for Python 2.7 (`# <https://github.com/gorakhargosh/watchdog/pull/703>`_)
13-
- Thanks to our beloved contributors: @SamSchott
14-
- Use `pathlib` from the standard library, instead of pathtools: @bstaletic
11+
- Versioning is now following `semver <https://semver.org/>`_
12+
- Drop support for Python 2.7 and 3.4
13+
- Allow file paths on Unix that don't follow the file system encoding (`#703 <https://github.com/gorakhargosh/watchdog/pull/703>`_)
14+
- Use ``pathlib`` from the standard library, instead of pathtools (`#556 <https://github.com/gorakhargosh/watchdog/pull/556>`_)
15+
- Removed the long-time deprecated ``events.LoggingFileSystemEventHandler`` class, use ``LoggingEventHandler`` instead
16+
- Thanks to our beloved contributors: @SamSchott, @bstaletic, @BoboTiG
1517

1618

1719
0.10.4

docs/_fsevents.pyx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env cython
2-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
32

43
cdef extern from "CoreFoundation/CoreFoundation.h":
54
struct dummy:

docs/echo.py.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ full_monty(x='spam', y='eggs', z='more spam', extra='even more spam')
7575

7676
You can echo functions in a class by decorating them.
7777

78-
>>> class Example(object):
78+
>>> class Example:
7979
... @echo.echo
8080
... def __init__(self): pass
8181
... @echo.echo
@@ -110,7 +110,7 @@ sm()
110110
Alternatively, don't decorate the methods you want to echo up front,
111111
retrospectively decorate the whole class.
112112

113-
>>> class YetAnotherExample(object):
113+
>>> class YetAnotherExample:
114114
... def __init__(self): pass
115115
... def m(self, x, y): pass
116116
... @classmethod
@@ -130,7 +130,7 @@ sm(x='echo', y='echo')
130130

131131
Private methods are echoed as well.
132132

133-
>>> class Privates(object):
133+
>>> class Privates:
134134
... def __myob(self): pass
135135
... def do_something(self): self.__myob()
136136
...

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22
#
33
# watchdog documentation build configuration file, created by
44
# sphinx-quickstart on Tue Nov 30 00:43:58 2010.

docs/source/examples/logger.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
32

43
import sys
54
import time

docs/source/examples/patterns.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
32

43
import sys
54
import time

docs/source/examples/simple.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
32

43
import logging
54
import sys

docs/source/global.rst.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.. |author_name| replace:: Yesudeep Mangalapilly
44
.. |author_email| replace:: [email protected]
5-
.. |copyright| replace:: Copyright 2012 Google, Inc.
5+
.. |copyright| replace:: Copyright 2012 Google, Inc & contributors.
66
.. |project_name| replace:: ``watchdog``
7-
.. |project_version| replace:: 0.9.0
7+
.. |project_version| replace:: 1.0.0
88

99
.. _issue tracker: http://github.com/gorakhargosh/watchdog/issues
1010
.. _code repository: http://github.com/gorakhargosh/watchdog

docs/source/index.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Watchdog
1111

1212
Python API library and shell utilities to monitor file system events.
1313

14-
Works on Python 3.4+. If you want to use an old version of Python, you should stick with watchdog < 0.10.0.
14+
Works on 3.5+.
15+
16+
If you want to use Python 2.6, you should stick with watchdog < 0.10.0.
17+
If you want to use Python 2.7 or 3.4, you should stick with watchdog < 1.0.0.
1518

1619
Directory monitoring made easy with
1720
-----------------------------------
@@ -26,7 +29,7 @@ Easy installation
2629
-----------------
2730
You can use pip_ to install |project_name| quickly and easily::
2831

29-
$ pip install watchdog
32+
$ python -m pip install -U watchdog
3033

3134
Need more help with installing? See :ref:`installation`.
3235

@@ -44,6 +47,7 @@ User's Guide
4447

4548
Contribute
4649
==========
50+
4751
Found a bug in or want a feature added to |project_name|?
4852
You can fork the official `code repository`_ or file an issue ticket
4953
at the `issue tracker`_. You can also ask questions at the official

0 commit comments

Comments
 (0)