Skip to content

Commit e73f41e

Browse files
Fix f-string usage breaking Python 2.7 support.
However, this (0.9.22) will be the LAST version to support Python 2!
1 parent 19f31f1 commit e73f41e

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
- 0.9.22:
4+
- Fix Python 2.7 compatibility (yet again)
5+
- Important note: this is the FINAL release which will support Python 2.7.
6+
Future versions will support Python 3.6+ only.
7+
38
- 0.9.21:
49
- Added new optional parameter "lock_file_directory"
510
- Creates given directory, if it does not exist.

setup.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
# version 223 introduced ability to install from pip
6262
install_requires.append("pywin32>=223")
6363

64+
dev_extras = ["pytest", "tox"]
65+
if sys.version_info.major > 2:
66+
dev_extras.extend(["black", "ruff"])
67+
6468
setup(
6569
name=about["__title__"],
6670
version=about["__version__"],
@@ -78,7 +82,7 @@
7882
# platforms=["nt", "posix"],
7983
install_requires=install_requires,
8084
extras_require={
81-
"dev": ["pytest", "tox", "black", "ruff"],
85+
"dev": dev_extras,
8286
},
8387
tests_require=["pytest"],
8488
keywords=package_keywords,

src/concurrent_log_handler/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
from contextlib import contextmanager
6767
from logging.handlers import BaseRotatingHandler
6868

69+
# noinspection PyPackageRequirements
6970
from portalocker import LOCK_EX, lock, unlock
7071
from concurrent_log_handler.__version__ import __author__, __version__
7172

@@ -107,12 +108,10 @@ def randbits(nb):
107108

108109

109110
class ConcurrentRotatingFileHandler(BaseRotatingHandler):
110-
f"""Handler for logging to a set of files, which switches from one file to the
111+
"""Handler for logging to a set of files, which switches from one file to the
111112
next when the current file reaches a certain size. Multiple processes can
112113
write to the log file concurrently, but this may mean that the file will
113114
exceed the given size.
114-
115-
Version {__version__} by {__author__}.
116115
"""
117116

118117
def __init__(

src/concurrent_log_handler/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"RotatingFileHandler replacement with concurrency, gzip and Windows support"
44
)
55
__url__ = "https://github.com/Preston-Landers/concurrent-log-handler"
6-
__version__ = "0.9.21"
6+
__version__ = "0.9.22"
77
__author__ = "Preston Landers"
88
__author_email__ = "[email protected]"
99
__license__ = "http://www.apache.org/licenses/LICENSE-2.0"

0 commit comments

Comments
 (0)