diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-12 12:25:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-12 12:25:39 +0100 |
commit | 37bccfe5e76c5740c4ef5ba1179e9488d8404075 (patch) | |
tree | c0c962a2e83c1f38816a021ecd34c2e8c80db528 /dev-python/jupyter-events | |
parent | 496ef6155c315ac3628b472dc9b4146fa2684286 (diff) |
gentoo auto-resync : 12:07:2024 - 12:25:38
Diffstat (limited to 'dev-python/jupyter-events')
-rw-r--r-- | dev-python/jupyter-events/Manifest | 3 | ||||
-rw-r--r-- | dev-python/jupyter-events/files/jupyter-events-0.10.0-test.patch | 93 | ||||
-rw-r--r-- | dev-python/jupyter-events/jupyter-events-0.10.0.ebuild | 8 |
3 files changed, 102 insertions, 2 deletions
diff --git a/dev-python/jupyter-events/Manifest b/dev-python/jupyter-events/Manifest index 04d9d3322800..a5795a10e5f4 100644 --- a/dev-python/jupyter-events/Manifest +++ b/dev-python/jupyter-events/Manifest @@ -1,3 +1,4 @@ +AUX jupyter-events-0.10.0-test.patch 2918 BLAKE2B dae8b0720cc9beaf31d73c22b58adbae710aa88fa985373425fbab0996163f7afcba6ce5d301fb31fd328557f899db95241dcc42a50bb80bf21aac9f8b5b80bf SHA512 6b7b9e6165fd053a1fb29b1540a0da563c56047de9039019df1d778419ac355345c95975293289b115a9c3a3d298ff9db983bb972afa31b9ca43c741d8363604 DIST jupyter_events-0.10.0.tar.gz 61516 BLAKE2B 12cf323f65cd52a6c0aa29e7b75e7899ec245752a7c4e17d32650ae3e9b27f47a7e593b491747667dfc58bde5e0745077c72317dbfa6db1f266d7ada14bc8f6a SHA512 6e56b48a238353fbd5e6a1a8cb3fcc5a506063aa555c96172ec2e03a14fb527b39d03a9897de49353927e8993a770d028d6d0d2c9a92785c4b727e3da66676df -EBUILD jupyter-events-0.10.0.ebuild 1080 BLAKE2B 91c294c36cd978e3ee42d071519331d32f0286a54dddd11be4e32cd5a62d50aaae3abc9b6b7096981dbe6649cc02874b645124039c37a497962b57f82d4853c9 SHA512 04454a3ee2011d6f6126f4db4fd273fc014a2ba63ff724c2998ae26ddc9fbbb2628e01032c2f9613e0b4e5855b691a451f956dd7e522c0a95ba0d931d01a5fb3 +EBUILD jupyter-events-0.10.0.ebuild 1231 BLAKE2B ffdcb7fea6b14e14ef06c450d7fe160f03228c64c1713036ee70d39b86ab9ba212814880695648bc6160c7389dab33937f6add2bfe8ae335635fc372962539b3 SHA512 f94d1c3b42f03472638c0f1ed2480d7b2f4e4219f9eda513850224720f5124023d3a836721becf85ec6bdc4c41ddd43362ba3952a0a04335713abdf3cfb423ec MISC metadata.xml 537 BLAKE2B dfe33b67ac51a46c9ad33d4b0e02ff39d5aa1780d70f92f12b7ee8ac336c43caa79201bebd42c461373bfdc7608580487ec000613cf92765fec352b70a8aec13 SHA512 689e8a1125b4da96db6d6c4495933ee29d24666ad9e7e3af891170f8da512ac388c005836402c74418476cb9838f278c19f5267840533cef0e02091d47fa43ea diff --git a/dev-python/jupyter-events/files/jupyter-events-0.10.0-test.patch b/dev-python/jupyter-events/files/jupyter-events-0.10.0-test.patch new file mode 100644 index 000000000000..44695c174cdd --- /dev/null +++ b/dev-python/jupyter-events/files/jupyter-events-0.10.0-test.patch @@ -0,0 +1,93 @@ +From 6c6219710e08784b3b8beed25d17240ea7f9ef93 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 12 Jul 2024 11:05:40 +0200 +Subject: [PATCH 1/2] Improve compatibility with patched python-json-logger on + py3.12+ + +Discard the `taskName` field from event capsule, to preserve +compatibility both with current python-json-logger versions, and with +versions containing the Python 3.12 fix +from madzak/python-json-logger#188 that removes the reserved `taskName` +field. +--- + tests/test_logger.py | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +diff --git a/tests/test_logger.py b/tests/test_logger.py +index 8a0a499..986aade 100644 +--- a/tests/test_logger.py ++++ b/tests/test_logger.py +@@ -166,8 +166,7 @@ def test_emit(): + "__metadata_version__": 1, + "something": "blah", + } +- if sys.version_info >= (3, 12): +- expected["taskName"] = None ++ event_capsule.pop("taskName", None) + assert event_capsule == expected + + +@@ -214,8 +213,7 @@ def test_message_field(): + "something": "blah", + "message": "a message was seen", + } +- if sys.version_info >= (3, 12): +- expected["taskName"] = None ++ event_capsule.pop("taskName", None) + assert event_capsule == expected + + +@@ -263,8 +261,7 @@ def test_nested_message_field(): + "__metadata_version__": 1, + "thing": {"message": "a nested message was seen"}, + } +- if sys.version_info >= (3, 12): +- expected["taskName"] = None ++ event_capsule.pop("taskName", None) + assert event_capsule == expected + + +@@ -428,8 +425,7 @@ def test_unique_logger_instances(): + "__metadata_version__": 1, + "something": "blah", + } +- if sys.version_info >= (3, 12): +- expected["taskName"] = None ++ event_capsule0.pop("taskName", None) + assert event_capsule0 == expected + + event_capsule1 = json.loads(output1.getvalue()) +@@ -443,8 +439,7 @@ def test_unique_logger_instances(): + "__metadata_version__": 1, + "something": "blah", + } +- if sys.version_info >= (3, 12): +- expected["taskName"] = None ++ event_capsule1.pop("taskName", None) + assert event_capsule1 == expected + + + +From 5ad1b27eb8424f1c33067eb68859f9ed0d7ede74 Mon Sep 17 00:00:00 2001 +From: "pre-commit-ci[bot]" + <66853113+pre-commit-ci[bot]@users.noreply.github.com> +Date: Fri, 12 Jul 2024 09:08:44 +0000 +Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks + +for more information, see https://pre-commit.ci +--- + tests/test_logger.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/test_logger.py b/tests/test_logger.py +index 986aade..ecd56ab 100644 +--- a/tests/test_logger.py ++++ b/tests/test_logger.py +@@ -3,7 +3,6 @@ + import io + import json + import logging +-import sys + from datetime import datetime, timedelta, timezone + from unittest.mock import MagicMock + diff --git a/dev-python/jupyter-events/jupyter-events-0.10.0.ebuild b/dev-python/jupyter-events/jupyter-events-0.10.0.ebuild index bf33bb189671..241a36a33ff2 100644 --- a/dev-python/jupyter-events/jupyter-events-0.10.0.ebuild +++ b/dev-python/jupyter-events/jupyter-events-0.10.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=hatchling -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 pypi @@ -39,3 +39,9 @@ BDEPEND=" # TODO: package jupyterlite-sphinx # distutils_enable_sphinx docs distutils_enable_tests pytest + +PATCHES=( + # fix compatibility with patched python-json-logger + # https://github.com/jupyter/jupyter_events/pull/100 + "${FILESDIR}/${P}-test.patch" +) |