git: 321e31e72fd2 - main - www/py-binarycookies: update the port to version 2.2.3

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Wed, 08 Oct 2025 02:02:47 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=321e31e72fd2906a79458e82870866d419035dc6

commit 321e31e72fd2906a79458e82870866d419035dc6
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2025-10-08 02:01:50 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2025-10-08 02:01:50 +0000

    www/py-binarycookies: update the port to version 2.2.3
    
    Garbage-collect patches which had been merged upstream.
    
    Reported by:    portscout
---
 www/py-binarycookies/Makefile                      |  5 ++-
 www/py-binarycookies/distinfo                      |  6 +--
 .../files/patch-src_binarycookies_____main____.py  | 49 ----------------------
 .../files/patch-src_binarycookies___deserialize.py | 21 ----------
 4 files changed, 6 insertions(+), 75 deletions(-)

diff --git a/www/py-binarycookies/Makefile b/www/py-binarycookies/Makefile
index 4a76b5bfd247..b6fd8802684b 100644
--- a/www/py-binarycookies/Makefile
+++ b/www/py-binarycookies/Makefile
@@ -1,12 +1,13 @@
 PORTNAME=	binarycookies
-PORTVERSION=	2.1.5
+PORTVERSION=	2.2.3
 CATEGORIES=	www python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	danfe@FreeBSD.org
 COMMENT=	Binary cookies (de)serializer written in Python
-WWW=		https://pypi.org/project/binarycookies/
+WWW=		https://pypi.org/project/binarycookies/ \
+		https://github.com/dan1elt0m/binarycookies
 
 LICENSE=	MIT
 
diff --git a/www/py-binarycookies/distinfo b/www/py-binarycookies/distinfo
index 90ad5f5508ac..338c8e0765b1 100644
--- a/www/py-binarycookies/distinfo
+++ b/www/py-binarycookies/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1744141848
-SHA256 (binarycookies-2.1.5.tar.gz) = ff28a8e90e6ba02bc82fb2ff0d1d9a4a3be1ee9289a58f74a653d264928a31f3
-SIZE (binarycookies-2.1.5.tar.gz) = 8448
+TIMESTAMP = 1759738951
+SHA256 (binarycookies-2.2.3.tar.gz) = d9c0cfd7c61c1de6fd9855d7b9e7e89ede980033198721bb9dc8a5654039080d
+SIZE (binarycookies-2.2.3.tar.gz) = 10142
diff --git a/www/py-binarycookies/files/patch-src_binarycookies_____main____.py b/www/py-binarycookies/files/patch-src_binarycookies_____main____.py
deleted file mode 100644
index da43dac8dabd..000000000000
--- a/www/py-binarycookies/files/patch-src_binarycookies_____main____.py
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/binarycookies/__main__.py.orig	2025-04-08 19:50:17 UTC
-+++ src/binarycookies/__main__.py
-@@ -5,6 +5,8 @@ from sys import stdout
- from typing import Type
- 
- import typer
-+# https://github.com/Textualize/rich/issues/271
-+println = print
- from rich import print
- 
- from binarycookies import load
-@@ -20,6 +22,7 @@ class DateTimeEncoder(json.JSONEncoder):
- class OutputType(str, Enum):
-     json = "json"
-     ascii = "ascii"
-+    netscape = "netscape"
- 
- 
- def cli(file_path: str, output: str = "json"):
-@@ -27,7 +30,7 @@ def cli(file_path: str, output: str = "json"):
-     with open(file_path, "rb") as f:
-         cookies = load(f)
-     if output == OutputType.json:
--        json.dump([cookie.model_dump() for cookie in cookies], indent=2, cls=DateTimeEncoder, fp=stdout)
-+        json.dump([cookie.dict() for cookie in cookies], indent=2, cls=DateTimeEncoder, fp=stdout)
-     elif output == OutputType.ascii:
-         for cookie in cookies:
-             print(f"Name: {cookie.name}")
-@@ -38,6 +41,20 @@ def cli(file_path: str, output: str = "json"):
-             print(f"Expires: {cookie.expiry_datetime.isoformat()}")
-             print(f"Flag: {cookie.flag.value}")
-             print("-" * 40)
-+    elif output == OutputType.netscape:
-+        # http://www.cookiecentral.com/faq/#3.5
-+        println("# Netscape HTTP Cookie File")
-+        for cookie in cookies:
-+            println("%(domain)s\t%(flag)s\t%(path)s\t%(secure)s\t%(expiry)d\t%(name)s\t%(value)s" % dict(
-+              domain = cookie.url,
-+              flag = str(cookie.url.startswith('.')).upper(),
-+              path = cookie.path,
-+              secure = str('Secure' in cookie.flag.value).upper(),
-+              expiry = cookie.expiry_datetime.timestamp(),
-+              name = cookie.name,
-+              value = cookie.value))
-+    else:
-+            print(f"Unsupported output format, can only do {', '.join('[green]%s[/green]' % ot.name for ot in OutputType)}.")
- 
- 
- def main():
diff --git a/www/py-binarycookies/files/patch-src_binarycookies___deserialize.py b/www/py-binarycookies/files/patch-src_binarycookies___deserialize.py
deleted file mode 100644
index 3aec2539907c..000000000000
--- a/www/py-binarycookies/files/patch-src_binarycookies___deserialize.py
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/binarycookies/_deserialize.py.orig	2025-04-08 19:50:17 UTC
-+++ src/binarycookies/_deserialize.py
-@@ -1,6 +1,7 @@
- from datetime import datetime, timezone
- from io import BytesIO
- from struct import unpack
-+from sys import maxsize
- from typing import BinaryIO, List, Union
- 
- from binarycookies.models import (
-@@ -28,7 +29,9 @@ def interpret_flag(flags: int) -> Flag:
- 
- def mac_epoch_to_date(epoch: int) -> datetime:
-     """Converts a mac epoch time to a datetime object."""
--    return datetime.fromtimestamp(epoch + 978307200, tz=timezone.utc)
-+    unix_epoch = epoch + 978307200
-+    if unix_epoch > maxsize: unix_epoch = maxsize
-+    return datetime.fromtimestamp(unix_epoch, tz=timezone.utc)
- 
- 
- def read_string(data: BytesIO, size: int) -> str: