From nobody Sat Apr 16 04:20:49 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3C4A35D549C; Sat, 16 Apr 2022 04:20:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KgKkT476Bz3LNq; Sat, 16 Apr 2022 04:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650082849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIsOvv/SfoD3RAnSjItT/0xv1r7em7NjE/Shvz9DyyI=; b=ClH71nxwl9HzEqUPJAeEHl0fFhyZrVxJ56BgyV3wBtILQtv38zgJROi1cX55h8/HkNKe/z jOBA2nI/FNsagMc8p7wtzDmeOmLAlxHjd3UGYcxYZcEjXKFR3aQFP5hd3x9kMutoXlHoNV U8NG66d/oPQeSp3MLajVj4FCXYC0xK165buTdiBBg9xJvzYr1fESAG84pNu/piBlu8a2Zr hI/1Ppws6Q0byDtPX6etZuwT8SB5/kvEtGzsi0aKdZgOtvYKhHab6wxCP8bKJab1UaTZS7 njnURMVeJjtOUVs+s/vKVfjplXDfsh0s8yTjZ6hD3UoFMKK1UpgENeRwebZA1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5229A22CBA; Sat, 16 Apr 2022 04:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23G4Knke098472; Sat, 16 Apr 2022 04:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23G4Kn7K098471; Sat, 16 Apr 2022 04:20:49 GMT (envelope-from git) Date: Sat, 16 Apr 2022 04:20:49 GMT Message-Id: <202204160420.23G4Kn7K098471@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 4a78f889506a - main - devel/py-pytz-deprecation-shim: Add py-pytz-deprecation-shim 0.1.0.post0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a78f889506a9b7b4d57db0aac50f180dc3d5be7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650082849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIsOvv/SfoD3RAnSjItT/0xv1r7em7NjE/Shvz9DyyI=; b=iVKIIgYqb6svEJoq+iz72rHfuITIDxDfWgGK07cdDaFvSz7lXaYpweNFG6UAlKAPeaKgI0 0HpLPcxtNQVpaBswFr69PIppwKLaVsCpONN/THD/N5nrh2Elr7u7eNaXi2GqMUd7ygh3fI bnTmYmrtRRK6QklcHG717lau11+E8acq61LeLaFqWZRe9v0v/6DCttQygYJxA0j08V2VTU 4P903V2oeLhO9eZeXVXOmRF2LlzE64QdKcYVZ8ovnCe651bMunFJc2fHokU8gSUyXgCcU4 1iIoPSE4KipaPnuIIqWPKhDkkIJlZFjHNTh/pPlNmXmCUtEmhQNj6YueIY0Pfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650082849; a=rsa-sha256; cv=none; b=MnB8Bw12Tgmc+lneFoUICoXXp3R4GtzZDwb5n2hl/ps9p6HTV/EtGtBLq8lhSzPw5AWEqW lzUJDLBi5PyHdO7E0u7nEtXnQnojIWpo64q3XTQY/UVKIwRJiZcrUySKr+PlezSQXEcWwP 6eU3uXAPtMcpQJS4XvscR9Pb88lntDMwIF8dKcT5CCIlxckkq9TIDczClshOk9VcE0HDqV cyehuZvjHJu9/sgykWosbuyzDACCk3qa0v9uEwLZkYeu8JAvT7vwzzNuQ3v0oS+vIyqODC FVEjtdIEsACarnTSPahPu/4hm+NE22JBxTRAQZlMDFpitbqf55Q8VEgJmRL5wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=4a78f889506a9b7b4d57db0aac50f180dc3d5be7 commit 4a78f889506a9b7b4d57db0aac50f180dc3d5be7 Author: Po-Chuan Hsieh AuthorDate: 2022-04-16 03:39:02 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-04-16 04:19:03 +0000 devel/py-pytz-deprecation-shim: Add py-pytz-deprecation-shim 0.1.0.post0 pytz has served the Python community well for many years, but it is no longer the best option for providing time zones. pytz has a non-standard interface that is very easy to misuse; this interface was necessary when pytz was created, because datetime had no way to represent ambiguous datetimes, but this was solved in Python 3.6, which added a fold attribute to datetimes in PEP 495. With the addition of the zoneinfo module in Python 3.9 (PEP 615), there has never been a better time to migrate away from pytz. However, since pytz time zones are used very differently from a standard tzinfo, and many libraries have built pytz zones into their standard time zone interface (and thus may have users relying on the existence of the localize and normalize methods); this library provides shim classes that are compatible with both PEP 495 and pytz's interface, to make it easier for libraries to deprecate pytz. WWW: https://github.com/pganssle/pytz-deprecation-shim --- devel/Makefile | 1 + devel/py-pytz-deprecation-shim/Makefile | 29 +++++++++++++++++++++++++++ devel/py-pytz-deprecation-shim/distinfo | 3 +++ devel/py-pytz-deprecation-shim/files/setup.py | 3 +++ devel/py-pytz-deprecation-shim/pkg-descr | 15 ++++++++++++++ 5 files changed, 51 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index f9d172eafab1..3c4128bf05f0 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5148,6 +5148,7 @@ SUBDIR += py-pytrie SUBDIR += py-pytvmaze SUBDIR += py-pytz + SUBDIR += py-pytz-deprecation-shim SUBDIR += py-pytzdata SUBDIR += py-pyudev SUBDIR += py-pyupgrade diff --git a/devel/py-pytz-deprecation-shim/Makefile b/devel/py-pytz-deprecation-shim/Makefile new file mode 100644 index 000000000000..d0188f522570 --- /dev/null +++ b/devel/py-pytz-deprecation-shim/Makefile @@ -0,0 +1,29 @@ +# Created by: Po-Chuan Hsieh + +PORTNAME= pytz-deprecation-shim +PORTVERSION= 0.1.0.post0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= pytz_deprecation_shim-${PORTVERSION} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Shims to make deprecation of pytz easier + +LICENSE= APACHE20 + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include + +.if ${PYTHON_REL} < 30900 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.zoneinfo>=0:devel/py-backports.zoneinfo@${PY_FLAVOR} +.endif + +post-patch: + @${CP} ${FILESDIR}/setup.py ${WRKSRC}/ + +.include diff --git a/devel/py-pytz-deprecation-shim/distinfo b/devel/py-pytz-deprecation-shim/distinfo new file mode 100644 index 000000000000..14572b597682 --- /dev/null +++ b/devel/py-pytz-deprecation-shim/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1649423644 +SHA256 (pytz_deprecation_shim-0.1.0.post0.tar.gz) = af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d +SIZE (pytz_deprecation_shim-0.1.0.post0.tar.gz) = 60190 diff --git a/devel/py-pytz-deprecation-shim/files/setup.py b/devel/py-pytz-deprecation-shim/files/setup.py new file mode 100644 index 000000000000..606849326a40 --- /dev/null +++ b/devel/py-pytz-deprecation-shim/files/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup() diff --git a/devel/py-pytz-deprecation-shim/pkg-descr b/devel/py-pytz-deprecation-shim/pkg-descr new file mode 100644 index 000000000000..b6b16f4a6083 --- /dev/null +++ b/devel/py-pytz-deprecation-shim/pkg-descr @@ -0,0 +1,15 @@ +pytz has served the Python community well for many years, but it is no longer +the best option for providing time zones. pytz has a non-standard interface that +is very easy to misuse; this interface was necessary when pytz was created, +because datetime had no way to represent ambiguous datetimes, but this was +solved in Python 3.6, which added a fold attribute to datetimes in PEP 495. With +the addition of the zoneinfo module in Python 3.9 (PEP 615), there has never +been a better time to migrate away from pytz. + +However, since pytz time zones are used very differently from a standard tzinfo, +and many libraries have built pytz zones into their standard time zone interface +(and thus may have users relying on the existence of the localize and normalize +methods); this library provides shim classes that are compatible with both PEP +495 and pytz's interface, to make it easier for libraries to deprecate pytz. + +WWW: https://github.com/pganssle/pytz-deprecation-shim