-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backblaze-b2: update to 3.6.0 #40928
Conversation
@ahesford At run, it complains that python3-docutils is outdated. I updated that package to 0.19. After that it complains that python3-tqdm version should be at least 4.50. I tried updating it to 4.64.1 (latest stable version) but setuptools_scm complains that it needs to .git folder to get the version number. Not sure what to do about that. |
a420a0c
to
309a714
Compare
Please try now; I bumped docutils and tqdm. |
@ahesford Needs two more changes:
This is the patch I useddiff --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'] 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?
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. |
I pulled the patch from the corresponding upstream commit. Fetching from PyPI is sufficient to make As for |
@ahesford backblaze-b2 fails without tqdm. I am not sure why this is: Output
On the other hand it works if tqdm is present Output
I am guessing this happens because in b2sdk's requirement.txt tqdm is listed as a dependency. But in the code I can see that the import is optional. |
@ahesford I just tested that if I remove tqdm from b2sdk's requirements.txt, backblaze is able to fall back on simpler text based progress indication: |
This package no longer reverts a later version and can now conform to standard nomenclature.
OK, I just added the dependency to |
@ahesford Working fine now. Thanks a lot. Just tested it. |
Testing the changes
@kartikynwa