Skip to content

Commit c0c6764

Browse files
Documentation cleanup.
Update Python version classifiers to drop mention of specific Python 3.x minor versions.
1 parent 30510ef commit c0c6764

File tree

4 files changed

+72
-75
lines changed

4 files changed

+72
-75
lines changed

CHANGELOG.md

+43-42
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,72 @@
11
## Change Log ##
22

33
- 0.9.20: Threaded logging queue now uses asyncio and can be used after fork (PR#32).
4-
The classifiers have been updated to indicate support for Python 3.8 and 3.9.
5-
Better performance with large values for backupCount (number of rotated files to keep).
4+
* The classifiers have been updated to indicate generic Python 3 support without needing to
5+
specify all sub-versions. (However, Python 3.0 to 3.4 support is not claimed.)
6+
* Better performance with large values for backupCount (number of rotated files to keep).
7+
* You can set the file owner / group to 'root' (uid 0)
8+
* Test script has been made more reliable.
69

7-
- 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27
8-
Fix accidental detection of 'darwin' (Mac OS) as Windows in setup.py
10+
- 0.9.19: Fix Python 2 compatibility (again), thanks @buddly27 Fix accidental detection of '
11+
darwin' (Mac OS) as Windows in setup.py
912

1013
- 0.9.18: Remove ez_setup from the setup.py
1114

1215
- 0.9.17: Contains the following fixes:
13-
* Catch exceptions when unlocking the lock.
14-
* Clarify documentation, esp. with use of multiprocessing
15-
* In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<=1.7.1)
16-
16+
* Catch exceptions when unlocking the lock.
17+
* Clarify documentation, esp. with use of multiprocessing
18+
* In Python 2, don't request/allow portalocker 2.0 which won't work. (Require portalocker<
19+
=1.7.1)
20+
1721
NOTE: the next release will likely be a 1.0 release candidate.
18-
19-
- 0.9.16: Fix publishing issue with incorrect code included in the wheel
20-
Affects Python 2 mainly - see Issue #21
2122

22-
- 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor
23-
Also, on Python 2 and 3, apply unicode_error_policy (default: ignore) to convert
24-
a log message to the output stream's encoding. I.e., by default it will filter
25-
out (remove) any characters in a log message which cannot be converted to the
26-
output logfile's encoding.
23+
- 0.9.16: Fix publishing issue with incorrect code included in the wheel Affects Python 2 mainly -
24+
see Issue #21
25+
26+
- 0.9.15: Fix bug from last version on Python 2. (Issue #21) Thanks @condontrevor Also, on Python 2
27+
and 3, apply unicode_error_policy (default: ignore) to convert a log message to the output
28+
stream's encoding. I.e., by default it will filter out (remove) any characters in a log message
29+
which cannot be converted to the output logfile's encoding.
2730

28-
- 0.9.14: Fix writing LF line endings on Windows when encoding is specified.
29-
Added newline and terminator kwargs to allow customizing line ending behavior.
30-
Thanks to @vashek
31+
- 0.9.14: Fix writing LF line endings on Windows when encoding is specified. Added newline and
32+
terminator kwargs to allow customizing line ending behavior. Thanks to @vashek
3133

3234
- 0.9.13: Fixes Crashes with ValueError: I/O operation on closed file (issue #16)
33-
Also should fix issue #13 with crashes related to Windows file locking.
34-
Big thanks to @terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts
35+
Also should fix issue #13 with crashes related to Windows file locking. Big thanks to
36+
@terencehonles, @nsmcan, @wkoot, @dismine for doing the hard parts
3537

36-
- 0.9.12: Add umask option (thanks to @blakehilliard)
37-
This adds the ability to control the permission flags when creating log files.
38+
- 0.9.12: Add umask option (thanks to @blakehilliard)
39+
This adds the ability to control the permission flags when creating log files.
3840

3941
- 0.9.11: Fix issues with gzip compression option (use buffering)
4042

41-
- 0.9.10: Fix inadvertent lock sharing when forking
42-
Thanks to @eriktews for this fix
43+
- 0.9.10: Fix inadvertent lock sharing when forking Thanks to @eriktews for this fix
4344

44-
- 0.9.9: Fix Python 2 compatibility broken in last release
45+
- 0.9.9: Fix Python 2 compatibility broken in last release
4546

4647
- 0.9.8: Bug fixes and permission features
47-
* Fix for issue #4 - AttributeError: 'NoneType' object has no attribute 'write'
48-
This error could be caused if a rollover occurred inside a logging statement
49-
that was generated from within another logging statement's format() call.
50-
* Fix for PyWin32 dependency specification (explicitly require PyWin32)
51-
* Ability to specify owner and permissions (mode) of rollover files [Unix only]
48+
* Fix for issue #4 - AttributeError: 'NoneType' object has no attribute 'write' This error could
49+
be caused if a rollover occurred inside a logging statement that was generated from within
50+
another logging statement's format() call.
51+
* Fix for PyWin32 dependency specification (explicitly require PyWin32)
52+
* Ability to specify owner and permissions (mode) of rollover files [Unix only]
5253

5354
- 0.9.7/0.9.6: Fix platform specifier for PyPi
5455

55-
- 0.9.5: Add `use_gzip` option to compress rotated logs. Add an optional threaded
56-
logging queue handler based on the standard library's `logging.QueueHandler`.
56+
- 0.9.5: Add `use_gzip` option to compress rotated logs. Add an optional threaded logging queue
57+
handler based on the standard library's `logging.QueueHandler`.
5758

5859
- 0.9.4: Fix setup.py to not include tests in distribution.
5960

6061
- 0.9.3: Refactoring release
61-
* For publishing fork on pypi as `concurrent-log-handler` under new package name.
62-
* NOTE: PyWin32 is required on Windows but is not an explicit dependency because
63-
the PyWin32 package is not currently installable through pip.
64-
* Fix lock behavior / race condition
62+
* For publishing fork on pypi as `concurrent-log-handler` under new package name.
63+
* NOTE: PyWin32 is required on Windows but is not an explicit dependency because the PyWin32
64+
package is not currently installable through pip.
65+
* Fix lock behavior / race condition
6566

66-
- 0.9.2: Initial release of fork by Preston Landers based on a fork of Lowell Alleman's
67+
- 0.9.2: Initial release of fork by Preston Landers based on a fork of Lowell Alleman's
6768
ConcurrentLogHandler 0.9.1
68-
* Fixes deadlocking issue with recent versions of Python
69-
* Puts `.__` prefix in front of lock file name
70-
* Use `secrets` or `SystemRandom` if available.
71-
* Add/fix Windows support
69+
* Fixes deadlocking issue with recent versions of Python
70+
* Puts `.__` prefix in front of lock file name
71+
* Use `secrets` or `SystemRandom` if available.
72+
* Add/fix Windows support

CONTRIBUTORS.md

-2
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ https://github.com/fr-ez
2525
https://github.com/mariusvniekerk
2626

2727
https://github.com/buddly27
28-
29-
https://github.com/ZhuYuJin

README.md

+29-25
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,35 @@ Concurrent Log Handler (CLH) is designed to allow multiple processes to write to
5656
logfile in a concurrent manner. It is important that each process involved MUST follow
5757
these requirements:
5858

59-
* Each process must create its OWN instance of the handler (`ConcurrentRotatingFileHandler`)
60-
61-
* This requirement does not apply to threads within a given process. Different threads
62-
within a process can use the same CLH instance. Thread locking is handled automatically.
63-
64-
* As a result of the above, you CANNOT serialize a handler instance and reuse it in another
65-
process. This means you cannot, for example, pass a CLH handler instance from parent process
66-
to child process using the `multiprocessing` package (or similar techniques). Each child
67-
process must initialize its own CLH instance. In the case of a multiprocessing target
68-
function, the child target function can call code to initialize a CLH instance.
69-
If your app uses fork() then this may not apply; child processes of a fork() should
70-
be able to inherit the object instance.
71-
72-
* It is important that every process or thread writing to a given logfile must all use the
73-
same settings, especially related to file rotation. Also do not attempt to mix different
74-
handler classes writing to the same file, e.g. do not also use a `RotatingFileHandler` on
75-
the same file.
76-
77-
* Special attention may need to be paid when the log file being written to resides on a network
78-
shared drive. Whether the multi-process advisory lock technique (via portalocker) works
79-
on a network share may depend on the details of your configuration.
80-
81-
* A separate handler instance is needed for each individual log file. For instance, if your
82-
app writes to two different logs you will need to set up two CLH instances per process.
83-
59+
* You can't serialize a handler instance and reuse it in another process. This means you cannot, for
60+
example, pass a CLH handler instance from parent process to child process using
61+
the `multiprocessing` package in spawn mode (or similar techniques that use serialized objects).
62+
Each child process must initialize its own CLH instance.
63+
64+
* When using the `multiprocessing` module in "spawn" (non-fork) mode, each child process must create
65+
its OWN instance of the handler (`ConcurrentRotatingFileHandler`). The child target function
66+
should call code that initializes a new CLH instance.
67+
68+
* This requirement does not apply to threads within a given process. Different threads within a
69+
process can use the same CLH instance. Thread locking is handled automatically.
70+
71+
* This also does not apply to `fork()` based child processes. Child processes of a fork() call
72+
should be able to inherit the CLH object instance.
73+
74+
* This limitation exists because the CLH object can't be serialized, passed over a network or
75+
pipe, and reconstituted at the other end.
76+
77+
* It is important that every process or thread writing to a given logfile must all use the same
78+
settings, especially related to file rotation. Also do not attempt to mix different handler
79+
classes writing to the same file, e.g. do not also use a `RotatingFileHandler` on the same file.
80+
81+
* Special attention may need to be paid when the log file being written to resides on a network
82+
shared drive. Whether the multiprocess advisory lock technique (via portalocker) works on a
83+
network share may depend on the details of your configuration.
84+
85+
* A separate handler instance is needed for each individual log file. For instance, if your app
86+
writes to two different logs you will need to set up two CLH instances per process.
87+
8488
### Simple Example
8589

8690
Here is a simple direct usage example:

setup.py

-6
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
Operating System :: POSIX
3535
Operating System :: Microsoft :: Windows
3636
Programming Language :: Python
37-
Programming Language :: Python :: 2.6
3837
Programming Language :: Python :: 2.7
3938
Programming Language :: Python :: 3
40-
Programming Language :: Python :: 3.5
41-
Programming Language :: Python :: 3.6
42-
Programming Language :: Python :: 3.7
43-
Programming Language :: Python :: 3.8
44-
Programming Language :: Python :: 3.9
4539
Topic :: Software Development :: Libraries :: Python Modules
4640
License :: OSI Approved :: Apache Software License
4741
"""

0 commit comments

Comments
 (0)