Github messages for voidlinux
 help / color / mirror / Atom feed
From: kartikynwa <kartikynwa@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: backblaze-b2: update to 3.6.0
Date: Wed, 07 Dec 2022 09:45:50 +0100	[thread overview]
Message-ID: <20221207084550.2OMwPAU9okbUBWW5i9YgaklO9U34-jFRGBwspB9C37M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40928@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 3064 bytes --]

New comment by kartikynwa on void-packages repository

https://github.com/void-linux/void-packages/pull/40928#issuecomment-1340395214

Comment:
@ahesford Needs two more changes:
- backblaze-b2 should have python3-tqdm in depends
- backblaze-b2 needs this patch: https://github.com/Backblaze/B2_Command_Line_Tool/pull/836/files (only the change to console_tool.py is required)

<details>

<summary>This is the patch I used</summary>

```diff
diff --git a/b2/console_tool.py b/b2/console_tool.py
index 1115cc79..760be547 100644
--- a/b2/console_tool.py
+++ b/b2/console_tool.py
@@ -500,11 +500,8 @@ def name_and_alias(cls):
     @classmethod
     def register_subcommand(cls, command_class):
         assert cls.subcommands_registry is not None, 'Initialize the registry class'
-        name, alias = command_class.name_and_alias()
+        name, _ = command_class.name_and_alias()
         decorator = cls.subcommands_registry.register(key=name)(command_class)
-        # Register alias if present
-        if alias is not None:
-            cls.subcommands_registry[alias] = command_class
         return decorator
 
     @classmethod
@@ -531,6 +528,8 @@ def get_parser(cls, subparsers=None, parents=None, for_docs=False):
                 aliases=[alias] if alias is not None and not for_docs else (),
                 for_docs=for_docs,
             )
+            # Register class that will handle this particular command, for both name and alias.
+            parser.set_defaults(command_class=cls)
 
         cls._setup_parser(parser)
 
@@ -655,7 +654,9 @@ def name_and_alias(cls):
         return NAME, None
 
     def run(self, args):
-        return self.subcommands_registry.get_class(args.command)
+        # Commands could be named via name or alias, so we fetch
+        # the command from args assigned during parser preparation.
+        return args.command_class
 
 
 @B2.register_subcommand
diff --git a/noxfile.py b/noxfile.py
index aaa2bac3..25cf8de1 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -24,7 +24,13 @@
 NO_STATICX = os.environ.get('NO_STATICX') is not None
 NOX_PYTHONS = os.environ.get('NOX_PYTHONS')
 
-PYTHON_VERSIONS = ['3.7', '3.8', '3.9', '3.10'] if NOX_PYTHONS is None else NOX_PYTHONS.split(',')
+PYTHON_VERSIONS = [
+    '3.7',
+    '3.8',
+    '3.9',
+    '3.10',
+    '3.11',
+] if NOX_PYTHONS is None else NOX_PYTHONS.split(',')
 PYTHON_DEFAULT_VERSION = PYTHON_VERSIONS[-1]
 
 PY_PATHS = ['b2', 'test', 'noxfile.py', 'setup.py']
```

</details>

After these the package works fine. I have tried login, ls, download and upload. All working great. Thanks for your work.

BTW do you know why I faced this problem with python3-tqdm?

> complains that it needs to .git folder to get the version number

In your PR I see that you changed the hostmakedepends to setuptools_scm which I already tried. Apart from that is changing the source from github to pypi enough? I thought of trying that too but the pypi tarball also did not have a .git folder in it.

  parent reply	other threads:[~2022-12-07  8:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 14:47 [PR PATCH] " ahesford
2022-12-06 16:24 ` [PR PATCH] [Updated] " ahesford
2022-12-06 16:35 ` kartikynwa
2022-12-06 17:21 ` [PR PATCH] [Updated] " ahesford
2022-12-06 17:21 ` ahesford
2022-12-06 17:22 ` ahesford
2022-12-07  5:31 ` kartikynwa
2022-12-07  5:32 ` kartikynwa
2022-12-07  8:41 ` kartikynwa
2022-12-07  8:43 ` kartikynwa
2022-12-07  8:45 ` kartikynwa [this message]
2022-12-07 13:37 ` [PR PATCH] [Updated] " ahesford
2022-12-07 13:42 ` ahesford
2022-12-07 14:21 ` kartikynwa
2022-12-07 14:31 ` kartikynwa
2022-12-07 14:34 ` [PR PATCH] [Updated] " ahesford
2022-12-07 14:35 ` ahesford
2022-12-07 14:44 ` kartikynwa
2022-12-07 14:52 ` [PR PATCH] [Merged]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221207084550.2OMwPAU9okbUBWW5i9YgaklO9U34-jFRGBwspB9C37M@z \
    --to=kartikynwa@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).