dev-python/colorlog: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2024-11-16 09:14:05 +01:00
parent 28580cb880
commit de0f2cfb24
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
3 changed files with 0 additions and 78 deletions

View File

@ -1,2 +1 @@
DIST colorlog-6.8.2.tar.gz 16529 BLAKE2B c745e9deae4f0a96e5b3481268b7ae402f0c7f05a3997753cbc6e117c1f0630338748ca557f5f3ae261694f0ce6c65f486d06d35778b3ee331160d2c0596465f SHA512 cffd4541837e15ed7cfa0e48d8424d6bb10d0de6e227fe16145cfba51ebc2f90e2a4c750db57d37ee2708ec0272de97ad74e946283b7b3cd3628e1bd24a60b6f
DIST colorlog-6.9.0.tar.gz 16624 BLAKE2B 6c4e6db3592bafa0c4ee799681076f9c775200d495e19532b63c11e3cd165eeb1c1dfd1b3b0763be6b033d098afec2a467103f2d73e73a6d0592a4d04e1cc2af SHA512 a1f0fa3858314a770050172c287fca3bbd060ea00ce8d042429edf38f363ac21b689204c2f97140bc58c27f708bb15836de699a4692873118471e4e966a8320f

View File

@ -1,26 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Log formatting with colors"
HOMEPAGE="
https://pypi.org/project/colorlog/
https://github.com/borntyping/python-colorlog/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm64 ~loong ~riscv x86"
distutils_enable_tests pytest
PATCHES=(
# https://github.com/borntyping/python-colorlog/commit/607485def2d60b60c40c0d682574324b47fc30ba
"${FILESDIR}/${P}-py313.patch"
)

View File

@ -1,51 +0,0 @@
From 607485def2d60b60c40c0d682574324b47fc30ba Mon Sep 17 00:00:00 2001
From: Sam Clements <sam@borntyping.co.uk>
Date: Fri, 26 Jan 2024 14:06:47 +0000
Subject: [PATCH] Support Python 3.13
---
colorlog/wrappers.py | 17 +++++++++++++----
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/colorlog/wrappers.py b/colorlog/wrappers.py
index 20e3042..63b201a 100644
--- a/colorlog/wrappers.py
+++ b/colorlog/wrappers.py
@@ -2,6 +2,7 @@
import functools
import logging
+import sys
import typing
from logging import (
CRITICAL,
@@ -53,8 +54,8 @@ def basicConfig(
) -> None:
"""Call ``logging.basicConfig`` and override the formatter it creates."""
logging.basicConfig(**kwargs)
- logging._acquireLock() # type: ignore
- try:
+
+ def _basicConfig():
handler = logging.root.handlers[0]
handler.setFormatter(
colorlog.formatter.ColoredFormatter(
@@ -67,8 +68,16 @@ def basicConfig(
stream=kwargs.get("stream", None),
)
)
- finally:
- logging._releaseLock() # type: ignore
+
+ if sys.version_info >= (3, 13):
+ with logging._lock:
+ _basicConfig()
+ else:
+ logging._acquireLock() # type: ignore
+ try:
+ _basicConfig()
+ finally:
+ logging._releaseLock() # type: ignore
def ensure_configured(func):