././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0425754 jaraco_logging-3.4.0/0000755000175100001660000000000015024011611014055 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/.coveragerc0000644000175100001660000000054515024011572016210 0ustar00runnerdocker[run] omit = # leading `*/` for pytest-dev/pytest-cov#456 */.tox/* disable_warnings = couldnt-parse [report] show_missing = True exclude_also = # Exclude common false positives per # https://coverage.readthedocs.io/en/latest/excluding.html#advanced-exclusion # Ref jaraco/skeleton#97 and jaraco/skeleton#135 class .*\bProtocol\): if TYPE_CHECKING: ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/.editorconfig0000644000175100001660000000036615024011572016545 0ustar00runnerdockerroot = true [*] charset = utf-8 indent_style = tab indent_size = 4 insert_final_newline = true end_of_line = lf [*.py] indent_style = space max_line_length = 88 [*.{yml,yaml}] indent_style = space indent_size = 2 [*.rst] indent_style = space ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0355752 jaraco_logging-3.4.0/.github/0000755000175100001660000000000015024011611015415 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0385752 jaraco_logging-3.4.0/.github/workflows/0000755000175100001660000000000015024011611017452 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/.github/workflows/main.yml0000644000175100001660000000631315024011572021132 0ustar00runnerdockername: tests on: merge_group: push: branches-ignore: # temporary GH branches relating to merge queues (jaraco/skeleton#93) - gh-readonly-queue/** tags: # required if branches-ignore is supplied (jaraco/skeleton#103) - '**' pull_request: workflow_dispatch: permissions: contents: read env: # Environment variable to support color support (jaraco/skeleton#66) FORCE_COLOR: 1 # Suppress noisy pip warnings PIP_DISABLE_PIP_VERSION_CHECK: 'true' PIP_NO_WARN_SCRIPT_LOCATION: 'true' # Ensure tests can sense settings about the environment TOX_OVERRIDE: >- testenv.pass_env+=GITHUB_*,FORCE_COLOR jobs: test: strategy: # https://blog.jaraco.com/efficient-use-of-ci-resources/ matrix: python: - "3.9" - "3.13" platform: - ubuntu-latest - macos-latest - windows-latest include: - python: "3.10" platform: ubuntu-latest - python: "3.11" platform: ubuntu-latest - python: "3.12" platform: ubuntu-latest - python: "3.14" platform: ubuntu-latest - python: pypy3.10 platform: ubuntu-latest runs-on: ${{ matrix.platform }} continue-on-error: ${{ matrix.python == '3.14' }} steps: - uses: actions/checkout@v4 - name: Install build dependencies # Install dependencies for building packages on pre-release Pythons # jaraco/skeleton#161 if: matrix.python == '3.14' && matrix.platform == 'ubuntu-latest' run: | sudo apt update sudo apt install -y libxml2-dev libxslt-dev - name: Setup Python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} allow-prereleases: true - name: Install tox run: python -m pip install tox - name: Run run: tox collateral: strategy: fail-fast: false matrix: job: - diffcov - docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.x - name: Install tox run: python -m pip install tox - name: Eval ${{ matrix.job }} run: tox -e ${{ matrix.job }} check: # This job does nothing and is only used for the branch protection if: always() needs: - test - collateral runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} release: permissions: contents: write needs: - check if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: 3.x - name: Install tox run: python -m pip install tox - name: Run run: tox -e release env: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/.pre-commit-config.yaml0000644000175100001660000000022615024011572020344 0ustar00runnerdockerrepos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.9.9 hooks: - id: ruff args: [--fix, --unsafe-fixes] - id: ruff-format ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/.readthedocs.yaml0000644000175100001660000000056515024011572017320 0ustar00runnerdockerversion: 2 python: install: - path: . extra_requirements: - doc sphinx: configuration: docs/conf.py # required boilerplate readthedocs/readthedocs.org#10401 build: os: ubuntu-lts-latest tools: python: latest # post-checkout job to ensure the clone isn't shallow jaraco/skeleton#114 jobs: post_checkout: - git fetch --unshallow || true ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078344.0 jaraco_logging-3.4.0/LICENSE0000644000175100001660000000206415024011610015063 0ustar00runnerdockerMIT License Copyright (c) 2025 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. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/NEWS.rst0000644000175100001660000000230115024011572015365 0ustar00runnerdockerv3.4.0 ====== Features -------- - Add support for log_level accepting an integer input. v3.3.0 ====== Features -------- - Replaced deprecated datetime.utcfromtimestamp. (#3) v3.2.1 ====== No significant changes. v3.2.0 ====== Features -------- - Require Python 3.8 or later. v3.1.2 ====== Refresh packaging. Require Python 3.7 or later. v3.1.1 ====== Rely on PEP 420 for namespace package. v3.1.0 ====== Refresh packaging. Remove unneeded dependency on six. v3.0.0 ====== Require Python 3.6 or later. 2.0 === Switch to `pkgutil namespace technique `_ for the ``jaraco`` namespace. 1.5.2 ===== Repair incorrect form of namespace package. 1.5.1 ===== Refresh distribution package. 1.5 === Allow log level to be passed on the command-line as a numeric value as well. 1.4.1 ===== Refresh distribution package. 1.4 === Added some nominal documentation. Implemented automatic deploys using Travis-CI. 1.3 === Move hosting to github. Fix test failure due to version detection. 1.2 === Allow passing default_level to add_arguments. 1.0 === Initial release based on jaraco.util 10.8. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0425754 jaraco_logging-3.4.0/PKG-INFO0000644000175100001660000000442515024011611015157 0ustar00runnerdockerMetadata-Version: 2.4 Name: jaraco.logging Version: 3.4.0 Summary: Support for Python logging facility Author-email: "Jason R. Coombs" License-Expression: MIT Project-URL: Source, https://github.com/jaraco/jaraco.logging Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE Requires-Dist: tempora Provides-Extra: test Requires-Dist: pytest!=8.1.*,>=6; extra == "test" Provides-Extra: doc Requires-Dist: sphinx>=3.5; extra == "doc" Requires-Dist: jaraco.packaging>=9.3; extra == "doc" Requires-Dist: rst.linker>=1.9; extra == "doc" Requires-Dist: furo; extra == "doc" Requires-Dist: sphinx-lint; extra == "doc" Provides-Extra: check Requires-Dist: pytest-checkdocs>=2.4; extra == "check" Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check" Provides-Extra: cover Requires-Dist: pytest-cov; extra == "cover" Provides-Extra: enabler Requires-Dist: pytest-enabler>=2.2; extra == "enabler" Provides-Extra: type Requires-Dist: pytest-mypy; extra == "type" Dynamic: license-file .. image:: https://img.shields.io/pypi/v/jaraco.logging.svg :target: https://pypi.org/project/jaraco.logging .. image:: https://img.shields.io/pypi/pyversions/jaraco.logging.svg .. image:: https://github.com/jaraco/jaraco.logging/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/jaraco.logging/actions?query=workflow%3A%22tests%22 :alt: tests .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff .. image:: https://readthedocs.org/projects/jaracologging/badge/?version=latest :target: https://jaracologging.readthedocs.io/en/latest/?badge=latest .. image:: https://img.shields.io/badge/skeleton-2025-informational :target: https://blog.jaraco.com/skeleton Argument Parsing ================ Quickly solicit log level info from command-line parameters:: parser = argparse.ArgumentParser() jaraco.logging.add_arguments(parser) args = parser.parse_args() jaraco.logging.setup(args) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/README.rst0000644000175100001660000000205715024011572015556 0ustar00runnerdocker.. image:: https://img.shields.io/pypi/v/jaraco.logging.svg :target: https://pypi.org/project/jaraco.logging .. image:: https://img.shields.io/pypi/pyversions/jaraco.logging.svg .. image:: https://github.com/jaraco/jaraco.logging/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/jaraco.logging/actions?query=workflow%3A%22tests%22 :alt: tests .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff .. image:: https://readthedocs.org/projects/jaracologging/badge/?version=latest :target: https://jaracologging.readthedocs.io/en/latest/?badge=latest .. image:: https://img.shields.io/badge/skeleton-2025-informational :target: https://blog.jaraco.com/skeleton Argument Parsing ================ Quickly solicit log level info from command-line parameters:: parser = argparse.ArgumentParser() jaraco.logging.add_arguments(parser) args = parser.parse_args() jaraco.logging.setup(args) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0395753 jaraco_logging-3.4.0/docs/0000755000175100001660000000000015024011611015005 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/docs/conf.py0000644000175100001660000000274715024011572016324 0ustar00runnerdockerfrom __future__ import annotations extensions = [ 'sphinx.ext.autodoc', 'jaraco.packaging.sphinx', ] master_doc = "index" html_theme = "furo" # Link dates and other references in the changelog extensions += ['rst.linker'] link_files = { '../NEWS.rst': dict( using=dict(GH='https://github.com'), replace=[ dict( pattern=r'(Issue #|\B#)(?P\d+)', url='{package_url}/issues/{issue}', ), dict( pattern=r'(?m:^((?Pv?\d+(\.\d+){1,2}))\n[-=]+\n)', with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n', ), dict( pattern=r'PEP[- ](?P\d+)', url='https://peps.python.org/pep-{pep_number:0>4}/', ), ], ) } # Be strict about any broken references nitpicky = True nitpick_ignore: list[tuple[str, str]] = [] # Include Python intersphinx mapping to prevent failures # jaraco/skeleton#51 extensions += ['sphinx.ext.intersphinx'] intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), } # Preserve authored syntax for defaults autodoc_preserve_defaults = True # Add support for linking usernames, PyPI projects, Wikipedia pages github_url = 'https://github.com/' extlinks = { 'user': (f'{github_url}%s', '@%s'), 'pypi': ('https://pypi.org/project/%s', '%s'), 'wiki': ('https://wikipedia.org/wiki/%s', '%s'), } extensions += ['sphinx.ext.extlinks'] # local ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/docs/history.rst0000644000175100001660000000011615024011572017244 0ustar00runnerdocker:tocdepth: 2 .. _changes: History ******* .. include:: ../NEWS (links).rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/docs/index.rst0000644000175100001660000000052215024011572016653 0ustar00runnerdockerWelcome to |project| documentation! =================================== .. sidebar-links:: :home: :pypi: .. toctree:: :maxdepth: 1 history .. automodule:: jaraco.logging :members: :undoc-members: :show-inheritance: Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0395753 jaraco_logging-3.4.0/jaraco/0000755000175100001660000000000015024011611015314 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/jaraco/logging.py0000644000175100001660000001426415024011572017331 0ustar00runnerdockerfrom __future__ import annotations import functools import http.client import logging import os import string import time import tempora @functools.singledispatch def log_level(level_input: str | int): """ Return a log level for a string. >>> log_level('DEBUG') == logging.DEBUG True >>> log_level('30') == logging.WARNING True Let int pass through (useful for typer use). >>> log_level(30) 30 """ assert isinstance(level_input, str) # assert an invariant to workaround typing bug if level_input.isdigit(): return int(level_input) return getattr(logging, level_input.upper()) @log_level.register def _(level_input: int): return level_input def add_arguments(parser, default_level=logging.INFO): """ Add arguments to an ArgumentParser or OptionParser for purposes of grabbing a logging level. >>> import argparse >>> add_arguments(argparse.ArgumentParser()) """ adder = getattr(parser, 'add_argument', None) or getattr(parser, 'add_option') adder( '-l', '--log-level', default=default_level, type=log_level, help="Set log level (DEBUG, INFO, WARNING, ERROR)", ) def setup(options, **kwargs): """ Setup logging with options or arguments from an OptionParser or ArgumentParser. Also pass any keyword arguments to the basicConfig call. >>> import argparse >>> parser = argparse.ArgumentParser() >>> add_arguments(parser) >>> monkeypatch = getfixture('monkeypatch') >>> monkeypatch.setattr(logging, 'basicConfig', lambda **kwargs: print(kwargs)) >>> setup(parser.parse_args([])) {'level': 20} """ params = dict(kwargs) params.update(level=options.log_level) logging.basicConfig(**params) def setup_requests_logging(level): """ Setup logging for 'requests' such that it logs details about the connection, headers, etc. >>> monkeypatch = getfixture('monkeypatch') >>> monkeypatch.setattr(http.client.HTTPConnection, 'debuglevel', None) >>> setup_requests_logging(logging.DEBUG) >>> http.client.HTTPConnection.debuglevel True """ requests_log = logging.getLogger("requests.packages.urllib3") requests_log.setLevel(level) requests_log.propagate = True # enable debugging at httplib level http.client.HTTPConnection.debuglevel = level <= logging.DEBUG class TimestampFileHandler(logging.StreamHandler): """ A logging handler which will log to a file, similar to logging.handlers.RotatingFileHandler, but instead of appending a number, uses a timestamp to periodically select new file names to log to. Since this was developed, a TimedRotatingFileHandler was added to the Python stdlib. This class is still useful because it allows the period to be specified using simple english words. """ def __init__(self, base_filename, mode='a', period='day'): self.base_filename = base_filename self.mode = mode self._set_period(period) logging.StreamHandler.__init__(self, None) def _set_period(self, period): """ Set the period for the timestamp. If period is 0 or None, no period will be used. """ self._period = period if period: self._period_seconds = tempora.get_period_seconds(self._period) self._date_format = tempora.get_date_format_string(self._period_seconds) else: self._period_seconds = 0 self._date_format = '' def _get_period(self): return self._period period = property(_get_period, _set_period) def _use_file(self, filename): self._ensure_directory_exists(filename) self.stream = open(filename, self.mode) def _ensure_directory_exists(self, filename): dirname = os.path.dirname(filename) if dirname and not os.path.exists(dirname): os.makedirs(dirname) def get_filename(self, t): """ Return the appropriate filename for the given time based on the defined period. """ root, ext = os.path.splitext(self.base_filename) # remove seconds not significant to the period if self._period_seconds: t -= t % self._period_seconds # convert it to a datetime object for formatting dt = tempora.utc.fromtimestamp(t) # append the datestring to the filename # workaround for datetime.strftime not handling '' properly appended_date = ( dt.strftime(self._date_format) if self._date_format != '' else '' ) if appended_date: # in the future, it would be nice for this format # to be supplied as a parameter. result = root + ' ' + appended_date + ext else: result = self.base_filename return result def emit(self, record): """ Emit a record. Output the record to the file, ensuring that the currently- opened file has the correct date. """ now = time.time() current_name = self.get_filename(now) try: if not self.stream.name == current_name: self._use_file(current_name) except AttributeError: # a stream has not been created, so create one. self._use_file(current_name) logging.StreamHandler.emit(self, record) def close(self): """ Closes the stream. """ try: self.stream.close() except AttributeError: pass class LogFileWrapper: """ Emulates a file to replace stdout or stderr or anothe file object and redirects its output to a logger. Since data will often be send in partial lines or multiple lines, data is queued up until a new line is received. Each line of text is send to the logger separately. """ def __init__(self, name, lvl=logging.DEBUG): self.logger = logging.getLogger(name) self.lvl = lvl self.queued = '' def write(self, data): data = self.queued + data data = string.split(data, '\n') for line in data[:-1]: self.logger.log(self.lvl, line) self.queued = data[-1] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0405753 jaraco_logging-3.4.0/jaraco.logging.egg-info/0000755000175100001660000000000015024011611020433 5ustar00runnerdocker././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078345.0 jaraco_logging-3.4.0/jaraco.logging.egg-info/PKG-INFO0000644000175100001660000000442515024011611021535 0ustar00runnerdockerMetadata-Version: 2.4 Name: jaraco.logging Version: 3.4.0 Summary: Support for Python logging facility Author-email: "Jason R. Coombs" License-Expression: MIT Project-URL: Source, https://github.com/jaraco/jaraco.logging Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE Requires-Dist: tempora Provides-Extra: test Requires-Dist: pytest!=8.1.*,>=6; extra == "test" Provides-Extra: doc Requires-Dist: sphinx>=3.5; extra == "doc" Requires-Dist: jaraco.packaging>=9.3; extra == "doc" Requires-Dist: rst.linker>=1.9; extra == "doc" Requires-Dist: furo; extra == "doc" Requires-Dist: sphinx-lint; extra == "doc" Provides-Extra: check Requires-Dist: pytest-checkdocs>=2.4; extra == "check" Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check" Provides-Extra: cover Requires-Dist: pytest-cov; extra == "cover" Provides-Extra: enabler Requires-Dist: pytest-enabler>=2.2; extra == "enabler" Provides-Extra: type Requires-Dist: pytest-mypy; extra == "type" Dynamic: license-file .. image:: https://img.shields.io/pypi/v/jaraco.logging.svg :target: https://pypi.org/project/jaraco.logging .. image:: https://img.shields.io/pypi/pyversions/jaraco.logging.svg .. image:: https://github.com/jaraco/jaraco.logging/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/jaraco.logging/actions?query=workflow%3A%22tests%22 :alt: tests .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json :target: https://github.com/astral-sh/ruff :alt: Ruff .. image:: https://readthedocs.org/projects/jaracologging/badge/?version=latest :target: https://jaracologging.readthedocs.io/en/latest/?badge=latest .. image:: https://img.shields.io/badge/skeleton-2025-informational :target: https://blog.jaraco.com/skeleton Argument Parsing ================ Quickly solicit log level info from command-line parameters:: parser = argparse.ArgumentParser() jaraco.logging.add_arguments(parser) args = parser.parse_args() jaraco.logging.setup(args) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078345.0 jaraco_logging-3.4.0/jaraco.logging.egg-info/SOURCES.txt0000644000175100001660000000067215024011611022324 0ustar00runnerdocker.coveragerc .editorconfig .pre-commit-config.yaml .readthedocs.yaml LICENSE NEWS.rst README.rst mypy.ini pyproject.toml pytest.ini ruff.toml towncrier.toml tox.ini .github/workflows/main.yml docs/conf.py docs/history.rst docs/index.rst jaraco/logging.py jaraco.logging.egg-info/PKG-INFO jaraco.logging.egg-info/SOURCES.txt jaraco.logging.egg-info/dependency_links.txt jaraco.logging.egg-info/requires.txt jaraco.logging.egg-info/top_level.txt././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078345.0 jaraco_logging-3.4.0/jaraco.logging.egg-info/dependency_links.txt0000644000175100001660000000000115024011611024501 0ustar00runnerdocker ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078345.0 jaraco_logging-3.4.0/jaraco.logging.egg-info/requires.txt0000644000175100001660000000040715024011611023034 0ustar00runnerdockertempora [check] pytest-checkdocs>=2.4 [check:sys_platform != "cygwin"] pytest-ruff>=0.2.1 [cover] pytest-cov [doc] sphinx>=3.5 jaraco.packaging>=9.3 rst.linker>=1.9 furo sphinx-lint [enabler] pytest-enabler>=2.2 [test] pytest!=8.1.*,>=6 [type] pytest-mypy ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078345.0 jaraco_logging-3.4.0/jaraco.logging.egg-info/top_level.txt0000644000175100001660000000000715024011611023162 0ustar00runnerdockerjaraco ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/mypy.ini0000644000175100001660000000067315024011572015570 0ustar00runnerdocker[mypy] # Is the project well-typed? strict = False # Early opt-in even when strict = False warn_unused_ignores = True warn_redundant_casts = True enable_error_code = ignore-without-code # Support namespace packages per https://github.com/python/mypy/issues/14057 explicit_package_bases = True disable_error_code = # Disable due to many false positives overload-overlap, # jaraco/tempora#35 [mypy-tempora.*] ignore_missing_imports = True ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/pyproject.toml0000644000175100001660000000220315024011572016774 0ustar00runnerdocker[build-system] requires = [ "setuptools>=77", "setuptools_scm[toml]>=3.4.1", # jaraco/skeleton#174 "coherent.licensed", ] build-backend = "setuptools.build_meta" [project] name = "jaraco.logging" authors = [ { name = "Jason R. Coombs", email = "jaraco@jaraco.com" }, ] description = "Support for Python logging facility" readme = "README.rst" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", ] requires-python = ">=3.9" license = "MIT" dependencies = [ "tempora", ] dynamic = ["version"] [project.urls] Source = "https://github.com/jaraco/jaraco.logging" [project.optional-dependencies] test = [ # upstream "pytest >= 6, != 8.1.*", # local ] doc = [ # upstream "sphinx >= 3.5", "jaraco.packaging >= 9.3", "rst.linker >= 1.9", "furo", "sphinx-lint", # local ] check = [ "pytest-checkdocs >= 2.4", "pytest-ruff >= 0.2.1; sys_platform != 'cygwin'", ] cover = [ "pytest-cov", ] enabler = [ "pytest-enabler >= 2.2", ] type = [ # upstream "pytest-mypy", # local ] [tool.setuptools_scm] ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/pytest.ini0000644000175100001660000000111015024011572016105 0ustar00runnerdocker[pytest] norecursedirs=dist build .tox .eggs addopts= --doctest-modules --import-mode importlib consider_namespace_packages=true filterwarnings= ## upstream # Ensure ResourceWarnings are emitted default::ResourceWarning # realpython/pytest-mypy#152 ignore:'encoding' argument not specified::pytest_mypy # python/cpython#100750 ignore:'encoding' argument not specified::platform # pypa/build#615 ignore:'encoding' argument not specified::build.env # dateutil/dateutil#1284 ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz ## end upstream ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/ruff.toml0000644000175100001660000000226315024011572015725 0ustar00runnerdocker[lint] extend-select = [ # upstream "C901", # complex-structure "I", # isort "PERF401", # manual-list-comprehension # Ensure modern type annotation syntax and best practices # Not including those covered by type-checkers or exclusive to Python 3.11+ "FA", # flake8-future-annotations "F404", # late-future-import "PYI", # flake8-pyi "UP006", # non-pep585-annotation "UP007", # non-pep604-annotation "UP010", # unnecessary-future-import "UP035", # deprecated-import "UP037", # quoted-annotation "UP043", # unnecessary-default-type-args # local ] ignore = [ # upstream # Typeshed rejects complex or non-literal defaults for maintenance and testing reasons, # irrelevant to this project. "PYI011", # typed-argument-default-in-stub # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", "E111", "E114", "E117", "D206", "D300", "Q000", "Q001", "Q002", "Q003", "COM812", "COM819", # local ] [format] # Enable preview to get hugged parenthesis unwrapping and other nice surprises # See https://github.com/jaraco/skeleton/pull/133#issuecomment-2239538373 preview = true # https://docs.astral.sh/ruff/settings/#format_quote-style quote-style = "preserve" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1750078345.0425754 jaraco_logging-3.4.0/setup.cfg0000644000175100001660000000004615024011611015676 0ustar00runnerdocker[egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/towncrier.toml0000644000175100001660000000005415024011572016773 0ustar00runnerdocker[tool.towncrier] title_format = "{version}" ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1750078330.0 jaraco_logging-3.4.0/tox.ini0000644000175100001660000000245415024011572015403 0ustar00runnerdocker[testenv] description = perform primary checks (tests, style, types, coverage) deps = setenv = PYTHONWARNDEFAULTENCODING = 1 commands = pytest {posargs} usedevelop = True extras = test check cover enabler type [testenv:diffcov] description = run tests and check that diff from main is covered deps = {[testenv]deps} diff-cover commands = pytest {posargs} --cov-report xml diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html diff-cover coverage.xml --compare-branch=origin/main --fail-under=100 [testenv:docs] description = build the documentation extras = doc test changedir = docs commands = python -m sphinx -W --keep-going . {toxinidir}/build/html python -m sphinxlint [testenv:finalize] description = assemble changelog and tag a release skip_install = True deps = towncrier jaraco.develop >= 7.23 pass_env = * commands = python -m jaraco.develop.finalize [testenv:release] description = publish the package to PyPI and GitHub skip_install = True deps = build twine>=3 jaraco.develop>=7.1 pass_env = TWINE_PASSWORD GITHUB_TOKEN setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)" python -m build python -m twine upload dist/* python -m jaraco.develop.create-github-release