pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-gcalcli: Backport #769
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Fri Oct 25 15:29:31 2024 +0200
Changeset: 19d34db6bf478bc4f561ba65575b057df8b4518b
Modified Files:
py-gcalcli/distinfo
Added Files:
py-gcalcli/patches/patch-gcalcli_cli.py
Removed Files:
py-gcalcli/TODO
Log Message:
py-gcalcli: Backport #769
Now `gcalcli init` seems to work!
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=19d34db6bf478bc4f561ba65575b057df8b4518b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
py-gcalcli/TODO | 9 -----
py-gcalcli/distinfo | 1 +
py-gcalcli/patches/patch-gcalcli_cli.py | 61 +++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 9 deletions(-)
diffs:
diff --git a/py-gcalcli/TODO b/py-gcalcli/TODO
deleted file mode 100644
index 989104fa7f..0000000000
--- a/py-gcalcli/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
-gcalcli init seems to fails with:
-
- RecursionError: maximum recursion depth exceeded while calling a Python object
- [...]
- OSError: Failed to fetch credentials. If this is a nonstandard gcalcli install, please try again with a system-installed gcalcli as a workaround.
- Details: https://github.com/insanum/gcalcli/issues/735.
-
-No idea if this is an upstream issue or not.
-This will be likely be fixed in 4.5.1.
diff --git a/py-gcalcli/distinfo b/py-gcalcli/distinfo
index e795285673..72d89f359e 100644
--- a/py-gcalcli/distinfo
+++ b/py-gcalcli/distinfo
@@ -3,3 +3,4 @@ $NetBSD$
BLAKE2s (gcalcli-4.5.0.tar.gz) = 6594d11b45234603fc1217795503542bbbe89cbeb1befbbad0411248b4b147ba
SHA512 (gcalcli-4.5.0.tar.gz) = da69839b7f5ececf708f27d57cd5b37a148686151599125326c2af69bf7f2467c87af99866abd256f24bca126e39bfdca8cbc881db18d3e0967a59b010c042f9
Size (gcalcli-4.5.0.tar.gz) = 1903651 bytes
+SHA1 (patch-gcalcli_cli.py) = 3dc68125d655778c90010932783e6ac6a63e213d
diff --git a/py-gcalcli/patches/patch-gcalcli_cli.py b/py-gcalcli/patches/patch-gcalcli_cli.py
new file mode 100644
index 0000000000..d0403b7694
--- /dev/null
+++ b/py-gcalcli/patches/patch-gcalcli_cli.py
@@ -0,0 +1,61 @@
+$NetBSD$
+
+Backport <https://github.com/insanum/gcalcli/pull/796> to fix `gcalcli init`.
+
+It will be no longer needed in gcalcli-4.5.1.
+
+--- gcalcli/cli.py.orig 2024-09-28 19:29:00.000000000 +0000
++++ gcalcli/cli.py
+@@ -21,17 +21,25 @@
+ # Everything you need to know (Google API Calendar v3): http://goo.gl/HfTGQ #
+ # #
+ # ######################################################################### #
+-from argparse import ArgumentTypeError
++
++
++# Import trusted certificate store to enable SSL, e.g., behind firewalls.
++# Must be called as early as possible to avoid bugs.
++# fmt: off
++import truststore; truststore.inject_into_ssl() # noqa: I001,E702
++# fmt: on
++# ruff: noqa: E402
++
++
+ import json
+ import os
+ import pathlib
+ import re
+ import signal
+ import sys
++from argparse import ArgumentTypeError
+ from collections import namedtuple
+
+-import truststore
+-
+ from . import config, env, utils
+ from .argparsers import get_argument_parser, handle_unparsed
+ from .exceptions import GcalcliError
+@@ -39,12 +47,12 @@ from .gcal import GoogleCalendarInterfac
+ from .printer import Printer, valid_color_name
+ from .validators import (
+ get_date_input_description,
+- get_input,
+ PARSABLE_DATE,
+ PARSABLE_DURATION,
+ REMINDER,
+ STR_ALLOW_EMPTY,
+ STR_NOT_EMPTY,
++ get_input,
+ )
+
+ CalName = namedtuple('CalName', ['name', 'color'])
+@@ -146,9 +154,6 @@ def run_add_prompt(parsed_args, printer)
+
+
+ def main():
+- # import trusted certificate store to enable SSL, e.g., behind firewalls
+- truststore.inject_into_ssl()
+-
+ parser = get_argument_parser()
+ argv = sys.argv[1:]
+
Home |
Main Index |
Thread Index |
Old Index