Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] backblaze-b2: update to 3.6.0
@ 2022-12-06 14:47 ahesford
  2022-12-06 16:24 ` [PR PATCH] [Updated] " ahesford
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 14:47 UTC (permalink / raw)
  To: ml

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

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 11072 bytes --]

From 6433dc31be1a538ed448198bfa31071a01acb1d2 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/3] python-b2sdk: rename to python3-b2sdk

This package no longer reverts a later version, so this package can
match the expected nomenclature.
---
 srcpkgs/python-b2sdk                              |  1 +
 .../patches/lazy-fixture.patch                    |  0
 .../patches/setuptools_scm.patch                  |  0
 srcpkgs/{python-b2sdk => python3-b2sdk}/template  | 15 +++++++++++----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update    |  0
 5 files changed, 12 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 71%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..f0da74a3ea97 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,8 +1,7 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From f14e7e7f5ea1a8a9567b5ee4ed9f91464cc44382 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/3] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 6f9f360260c56d398dcff943053e7c6ddf748f2d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 3/3] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../patches/setuptools_scm_version.patch      | 13 +++++++++
 .../patches/src_last_modified_millis.patch    | 12 ---------
 srcpkgs/backblaze-b2/template                 | 27 ++++++-------------
 3 files changed, 21 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..6bb39f263972 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+checkdepends=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
@ 2022-12-06 16:24 ` ahesford
  2022-12-06 16:35 ` kartikynwa
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 16:24 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 11070 bytes --]

From 6433dc31be1a538ed448198bfa31071a01acb1d2 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/3] python-b2sdk: rename to python3-b2sdk

This package no longer reverts a later version, so this package can
match the expected nomenclature.
---
 srcpkgs/python-b2sdk                              |  1 +
 .../patches/lazy-fixture.patch                    |  0
 .../patches/setuptools_scm.patch                  |  0
 srcpkgs/{python-b2sdk => python3-b2sdk}/template  | 15 +++++++++++----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update    |  0
 5 files changed, 12 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 71%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..f0da74a3ea97 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,8 +1,7 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From f14e7e7f5ea1a8a9567b5ee4ed9f91464cc44382 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/3] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 6e4f8ad97b1c1a81a6215b16b3a31fd04f3bf900 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 3/3] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../patches/setuptools_scm_version.patch      | 13 +++++++++
 .../patches/src_last_modified_millis.patch    | 12 ---------
 srcpkgs/backblaze-b2/template                 | 27 ++++++-------------
 3 files changed, 21 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..47801daa5a18 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+make_check=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 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
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-06 16:35 UTC (permalink / raw)
  To: ml

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

New comment by kartikynwa on void-packages repository

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

Comment:
@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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
  2022-12-06 16:24 ` [PR PATCH] [Updated] " ahesford
  2022-12-06 16:35 ` kartikynwa
@ 2022-12-06 17:21 ` ahesford
  2022-12-06 17:21 ` ahesford
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 17:21 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 13669 bytes --]

From 6433dc31be1a538ed448198bfa31071a01acb1d2 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/5] python-b2sdk: rename to python3-b2sdk

This package no longer reverts a later version, so this package can
match the expected nomenclature.
---
 srcpkgs/python-b2sdk                              |  1 +
 .../patches/lazy-fixture.patch                    |  0
 .../patches/setuptools_scm.patch                  |  0
 srcpkgs/{python-b2sdk => python3-b2sdk}/template  | 15 +++++++++++----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update    |  0
 5 files changed, 12 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 71%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..f0da74a3ea97 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,8 +1,7 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From aa9c55a75e485d8cbda53a503568eb269e25c485 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/5] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 7cb7960b3b2bb3acd869d63661b21a2695c37ff5 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 11:51:56 -0500
Subject: [PATCH 3/5] python3-docutils: update to 0.19.

---
 srcpkgs/python3-docutils/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-docutils/template b/srcpkgs/python3-docutils/template
index 9d322219faf7..d36b578c1000 100644
--- a/srcpkgs/python3-docutils/template
+++ b/srcpkgs/python3-docutils/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-docutils'
 pkgname=python3-docutils
-version=0.18.1
-revision=2
+version=0.19
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 # docutils/writers/odf_odt/pygmentsformatter.py
@@ -12,7 +12,7 @@ maintainer="Alessio Sergi <al3hex@gmail.com>"
 license="Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
 homepage="http://docutils.sourceforge.net"
 distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
-checksum=679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06
+checksum=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6
 
 alternatives="
  docutils:rst2html:/usr/bin/rst2html.py

From 91394a55a4002c44b46171a76b411b4b847a5e6c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 12:20:32 -0500
Subject: [PATCH 4/5] python3-tqdm: update to 4.64.1.

---
 srcpkgs/python3-tqdm/template | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/python3-tqdm/template b/srcpkgs/python3-tqdm/template
index 66d7346427ec..91cb10685a46 100644
--- a/srcpkgs/python3-tqdm/template
+++ b/srcpkgs/python3-tqdm/template
@@ -1,16 +1,18 @@
 # Template file for 'python3-tqdm'
 pkgname=python3-tqdm
-version=4.48.2
-revision=5
+version=4.64.1
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-pytest-asyncio
+ python3-pytest-timeout $depends"
 short_desc="Fast, extensible progress bar for Python and CLI (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, MIT"
 homepage="https://tqdm.github.io/"
-distfiles="https://github.com/tqdm/tqdm/archive/v${version}.tar.gz"
-checksum=91a61673103ae2d5a1b93672ff60455d689b58372c08b1a27e1a7def71dc05a3
+distfiles="${PYPI_SITE}/t/tqdm/tqdm-${version}.tar.gz"
+checksum=5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4
 conflicts="python-tqdm>=0"
 
 post_install() {

From a420a0c7d48f188a93fa576b7455acac3e14eb87 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 5/5] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../patches/setuptools_scm_version.patch      | 13 +++++++++
 .../patches/src_last_modified_millis.patch    | 12 ---------
 srcpkgs/backblaze-b2/template                 | 27 ++++++-------------
 3 files changed, 21 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..47801daa5a18 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+make_check=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (2 preceding siblings ...)
  2022-12-06 17:21 ` [PR PATCH] [Updated] " ahesford
@ 2022-12-06 17:21 ` ahesford
  2022-12-06 17:22 ` ahesford
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 17:21 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 13669 bytes --]

From 36392ed2cdb322977ec523778022bd0d11d65eea Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/5] python-b2sdk: rename to python3-b2sdk

This package no longer reverts a later version, so this package can
match the expected nomenclature.
---
 srcpkgs/python-b2sdk                              |  1 +
 .../patches/lazy-fixture.patch                    |  0
 .../patches/setuptools_scm.patch                  |  0
 srcpkgs/{python-b2sdk => python3-b2sdk}/template  | 15 +++++++++++----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update    |  0
 5 files changed, 12 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 71%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..f0da74a3ea97 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,8 +1,7 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From 9d787e3855a1e979e246a403f0d3e5d1250034d0 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/5] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 0e7bf441f118c3eed501b5cf07816e6e5be8aae3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 11:51:56 -0500
Subject: [PATCH 3/5] python3-docutils: update to 0.19.

---
 srcpkgs/python3-docutils/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-docutils/template b/srcpkgs/python3-docutils/template
index 9d322219faf7..d36b578c1000 100644
--- a/srcpkgs/python3-docutils/template
+++ b/srcpkgs/python3-docutils/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-docutils'
 pkgname=python3-docutils
-version=0.18.1
-revision=2
+version=0.19
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 # docutils/writers/odf_odt/pygmentsformatter.py
@@ -12,7 +12,7 @@ maintainer="Alessio Sergi <al3hex@gmail.com>"
 license="Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
 homepage="http://docutils.sourceforge.net"
 distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
-checksum=679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06
+checksum=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6
 
 alternatives="
  docutils:rst2html:/usr/bin/rst2html.py

From d6efa325ce3945c1ef295422f38b88069c94e659 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 12:20:32 -0500
Subject: [PATCH 4/5] python3-tqdm: update to 4.64.1.

---
 srcpkgs/python3-tqdm/template | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/python3-tqdm/template b/srcpkgs/python3-tqdm/template
index 66d7346427ec..91cb10685a46 100644
--- a/srcpkgs/python3-tqdm/template
+++ b/srcpkgs/python3-tqdm/template
@@ -1,16 +1,18 @@
 # Template file for 'python3-tqdm'
 pkgname=python3-tqdm
-version=4.48.2
-revision=5
+version=4.64.1
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-pytest-asyncio
+ python3-pytest-timeout $depends"
 short_desc="Fast, extensible progress bar for Python and CLI (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, MIT"
 homepage="https://tqdm.github.io/"
-distfiles="https://github.com/tqdm/tqdm/archive/v${version}.tar.gz"
-checksum=91a61673103ae2d5a1b93672ff60455d689b58372c08b1a27e1a7def71dc05a3
+distfiles="${PYPI_SITE}/t/tqdm/tqdm-${version}.tar.gz"
+checksum=5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4
 conflicts="python-tqdm>=0"
 
 post_install() {

From 309a7142c8223cbd34c3bc129ee5338a77dcfff9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 5/5] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../patches/setuptools_scm_version.patch      | 13 +++++++++
 .../patches/src_last_modified_millis.patch    | 12 ---------
 srcpkgs/backblaze-b2/template                 | 27 ++++++-------------
 3 files changed, 21 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..47801daa5a18 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+make_check=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (3 preceding siblings ...)
  2022-12-06 17:21 ` ahesford
@ 2022-12-06 17:22 ` ahesford
  2022-12-07  5:31 ` kartikynwa
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 17:22 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

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

Comment:
Please try now; I bumped docutils and tqdm.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (4 preceding siblings ...)
  2022-12-06 17:22 ` ahesford
@ 2022-12-07  5:31 ` kartikynwa
  2022-12-07  5:32 ` kartikynwa
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07  5:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 378 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)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (5 preceding siblings ...)
  2022-12-07  5:31 ` kartikynwa
@ 2022-12-07  5:32 ` kartikynwa
  2022-12-07  8:41 ` kartikynwa
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07  5:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 503 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)

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (6 preceding siblings ...)
  2022-12-07  5:32 ` kartikynwa
@ 2022-12-07  8:41 ` kartikynwa
  2022-12-07  8:43 ` kartikynwa
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07  8:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 872 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)

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?

> 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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (7 preceding siblings ...)
  2022-12-07  8:41 ` kartikynwa
@ 2022-12-07  8:43 ` kartikynwa
  2022-12-07  8:45 ` kartikynwa
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07  8:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3046 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?

> 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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (8 preceding siblings ...)
  2022-12-07  8:43 ` kartikynwa
@ 2022-12-07  8:45 ` kartikynwa
  2022-12-07 13:37 ` [PR PATCH] [Updated] " ahesford
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07  8:45 UTC (permalink / raw)
  To: ml

[-- 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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (9 preceding siblings ...)
  2022-12-07  8:45 ` kartikynwa
@ 2022-12-07 13:37 ` ahesford
  2022-12-07 13:42 ` ahesford
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-07 13:37 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 17340 bytes --]

From 36392ed2cdb322977ec523778022bd0d11d65eea Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/5] python-b2sdk: rename to python3-b2sdk

This package no longer reverts a later version, so this package can
match the expected nomenclature.
---
 srcpkgs/python-b2sdk                              |  1 +
 .../patches/lazy-fixture.patch                    |  0
 .../patches/setuptools_scm.patch                  |  0
 srcpkgs/{python-b2sdk => python3-b2sdk}/template  | 15 +++++++++++----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update    |  0
 5 files changed, 12 insertions(+), 4 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 71%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..f0da74a3ea97 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,8 +1,7 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From 9d787e3855a1e979e246a403f0d3e5d1250034d0 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/5] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 0e7bf441f118c3eed501b5cf07816e6e5be8aae3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 11:51:56 -0500
Subject: [PATCH 3/5] python3-docutils: update to 0.19.

---
 srcpkgs/python3-docutils/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-docutils/template b/srcpkgs/python3-docutils/template
index 9d322219faf7..d36b578c1000 100644
--- a/srcpkgs/python3-docutils/template
+++ b/srcpkgs/python3-docutils/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-docutils'
 pkgname=python3-docutils
-version=0.18.1
-revision=2
+version=0.19
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 # docutils/writers/odf_odt/pygmentsformatter.py
@@ -12,7 +12,7 @@ maintainer="Alessio Sergi <al3hex@gmail.com>"
 license="Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
 homepage="http://docutils.sourceforge.net"
 distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
-checksum=679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06
+checksum=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6
 
 alternatives="
  docutils:rst2html:/usr/bin/rst2html.py

From d6efa325ce3945c1ef295422f38b88069c94e659 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 12:20:32 -0500
Subject: [PATCH 4/5] python3-tqdm: update to 4.64.1.

---
 srcpkgs/python3-tqdm/template | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/python3-tqdm/template b/srcpkgs/python3-tqdm/template
index 66d7346427ec..91cb10685a46 100644
--- a/srcpkgs/python3-tqdm/template
+++ b/srcpkgs/python3-tqdm/template
@@ -1,16 +1,18 @@
 # Template file for 'python3-tqdm'
 pkgname=python3-tqdm
-version=4.48.2
-revision=5
+version=4.64.1
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-pytest-asyncio
+ python3-pytest-timeout $depends"
 short_desc="Fast, extensible progress bar for Python and CLI (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, MIT"
 homepage="https://tqdm.github.io/"
-distfiles="https://github.com/tqdm/tqdm/archive/v${version}.tar.gz"
-checksum=91a61673103ae2d5a1b93672ff60455d689b58372c08b1a27e1a7def71dc05a3
+distfiles="${PYPI_SITE}/t/tqdm/tqdm-${version}.tar.gz"
+checksum=5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4
 conflicts="python-tqdm>=0"
 
 post_install() {

From 738e50d9f357dd2c9e356e84dbd8ceb43914cf85 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 5/5] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../backblaze-b2/patches/python-3.11.patch    | 87 +++++++++++++++++++
 .../patches/setuptools_scm_version.patch      | 13 +++
 .../patches/src_last_modified_millis.patch    | 12 ---
 srcpkgs/backblaze-b2/template                 | 27 ++----
 4 files changed, 108 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/python-3.11.patch
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/python-3.11.patch b/srcpkgs/backblaze-b2/patches/python-3.11.patch
new file mode 100644
index 000000000000..630a0d032d03
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/python-3.11.patch
@@ -0,0 +1,87 @@
+From 1eac94954530a1dca2c498de7bf9f92ee12479b1 Mon Sep 17 00:00:00 2001
+From: kkalinowski-reef <114084217+kkalinowski-reef@users.noreply.github.com>
+Date: Tue, 15 Nov 2022 01:11:34 +0100
+Subject: [PATCH] Fetching command class from parsed arguments instead of
+ registry (#836)
+
+* Fetching command class from parsed arguments instead of registry
+
+* Enabled 3.11 tests in both nox and github workflows
+---
+ .github/workflows/ci.yml |  2 +-
+ CHANGELOG.md             |  1 +
+ b2/console_tool.py       | 11 ++++++-----
+ noxfile.py               |  8 +++++++-
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+[Void note (ahesford): CHANGLEOG.md diff conflicts and was dropped.]
+
+diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
+index 5d64cdb5..84932867 100644
+--- a/.github/workflows/ci.yml
++++ b/.github/workflows/ci.yml
+@@ -80,7 +80,7 @@ jobs:
+       fail-fast: false
+       matrix:
+         os: ["ubuntu-latest", "macos-latest", "windows-latest"]
+-        python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
++        python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "3.11"]
+         exclude:
+           - os: "macos-latest"
+             python-version: "pypy-3.7"
+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']
diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..47801daa5a18 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+make_check=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (10 preceding siblings ...)
  2022-12-07 13:37 ` [PR PATCH] [Updated] " ahesford
@ 2022-12-07 13:42 ` ahesford
  2022-12-07 14:21 ` kartikynwa
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-07 13:42 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

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

Comment:
I pulled the patch from the corresponding upstream commit.

Fetching from PyPI is sufficient to make `setuptools_scm` work as expected. The GitHub archive is missing some release bits that the package looks for when determining a version.

As for `python3-tqdm`, this is an optional dependency of `python3-b2sdk`. The package is supposed to fall back gracefully to a simple text progress indicator when the package is not installed. We shouldn't add a hard requirement here.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (11 preceding siblings ...)
  2022-12-07 13:42 ` ahesford
@ 2022-12-07 14:21 ` kartikynwa
  2022-12-07 14:31 ` kartikynwa
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07 14:21 UTC (permalink / raw)
  To: ml

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

New comment by kartikynwa on void-packages repository

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

Comment:
@ahesford backblaze-b2 fails without tqdm. I am not sure why this is:

<details>

<summary>Output</summary>

```
in void-packages on  update-b2 [✘!?] took 3s
 ❯ xbps-query -l | grep '\(backblaze-b2\|tqdm\)'
ii backblaze-b2-3.6.0_1                    Command Line Interface for Backblaze's B2 storage service

in void-packages on  update-b2 [✘!?]
 ❯ b2 help
Traceback (most recent call last):
  File "/usr/local/bin/b2", line 33, in <module>
    sys.exit(load_entry_point('b2==3.6.0', 'console_scripts', 'b2')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/b2", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 198, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/b2/console_tool.py", line 34, in <module>
    from b2sdk.v2 import (
  File "/usr/lib/python3.11/site-packages/b2sdk/v2/__init__.py", line 11, in <module>
    from b2sdk._v3 import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/b2sdk/_v3/__init__.py", line 48, in <module>
    from b2sdk.version_utils import rename_argument, rename_function
  File "/usr/lib/python3.11/site-packages/b2sdk/version_utils.py", line 16, in <module>
    from pkg_resources import parse_version
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3259, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 909, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkg_resources/__init__.py", line 795, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'tqdm<5.0.0,>=4.5.0' distribution was not found and is required by b2sdk
```

</details>

On the other hand it works if tqdm is present

<details>

<summary>Output</summary>

```
in void-packages on  update-b2 [✘!?] took 420ms
 ❯ xbps-query -l | grep '\(backblaze-b2\|tqdm\)'
ii backblaze-b2-3.6.0_1                    Command Line Interface for Backblaze's B2 storage service
ii python3-tqdm-4.64.1_1                   Fast, extensible progress bar for Python and CLI (Python3)

in void-packages on  update-b2 [✘!?]
 ❯ b2 help
b2 [-h]
   {authorize-account,authorize_account,cancel-all-unfinished-large-files,cancel_all_unfinished_large_files,cancel-large-file,cancel_large_file,clear-account,clear_account,copy-file-by-id,copy_file_by_id,create-bucket,create_bucket,create-key,create_key,delete-bucket,delete_bucket,delete-file-version,delete_file_version,delete-key,delete_key,download-file-by-id,download_file_by_id,download-file-by-name,download_file_by_name,get-account-info,get_account_info,get-bucket,get_bucket,get-file-info,get_file_info,get-download-auth,get_download_auth,get-download-url-with-auth,get_download_url_with_auth,hide-file,hide_file,list-buckets,list_buckets,list-keys,list_keys,list-parts,list_parts,list-unfinished-large-files,list_unfinished_large_files,ls,make-url,make_url,make-friendly-url,make_friendly_url,sync,update-bucket,update_bucket,upload-file,upload_file,update-file-legal-hold,update_file_legal_hold,update-file-retention,update_file_retention,replication-setup,replication_setup,replication-delete,replication_delete,replication-pause,replication_pause,replication-unpause,replication_unpause,replication-status,replication_status,version}
   ...
```

</details>

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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (12 preceding siblings ...)
  2022-12-07 14:21 ` kartikynwa
@ 2022-12-07 14:31 ` kartikynwa
  2022-12-07 14:34 ` [PR PATCH] [Updated] " ahesford
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07 14:31 UTC (permalink / raw)
  To: ml

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

New comment by kartikynwa on void-packages repository

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

Comment:
@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:

![image](https://user-images.githubusercontent.com/7846060/206205894-c6f73956-4645-4793-b281-a9d1bbd0a773.png)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (13 preceding siblings ...)
  2022-12-07 14:31 ` kartikynwa
@ 2022-12-07 14:34 ` ahesford
  2022-12-07 14:35 ` ahesford
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-07 14:34 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 17640 bytes --]

From c8492ce72ffb7ce59afd557b5a1b6d352a1067d9 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/5] python-b2sdk: rename to python3-b2sdk, clean up depends

This package no longer reverts a later version and can now conform to
standard nomenclature.
---
 srcpkgs/python-b2sdk                            |  1 +
 .../patches/lazy-fixture.patch                  |  0
 .../patches/setuptools_scm.patch                |  0
 .../{python-b2sdk => python3-b2sdk}/template    | 17 ++++++++++++-----
 srcpkgs/{python-b2sdk => python3-b2sdk}/update  |  0
 5 files changed, 13 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/python-b2sdk
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (70%)
 rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%)

diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk
new file mode 120000
index 000000000000..3eb37f21757b
--- /dev/null
+++ b/srcpkgs/python-b2sdk
@@ -0,0 +1 @@
+python3-b2sdk
\ No newline at end of file
diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch
rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch
diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
similarity index 100%
rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch
rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch
diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template
similarity index 70%
rename from srcpkgs/python-b2sdk/template
rename to srcpkgs/python3-b2sdk/template
index 58101fd48579..d2f54383adc9 100644
--- a/srcpkgs/python-b2sdk/template
+++ b/srcpkgs/python3-b2sdk/template
@@ -1,12 +1,11 @@
-# Template file for 'python-b2sdk'
-# keep python-b2sdk name to revert this package
-pkgname=python-b2sdk
+# Template file for 'python3-b2sdk'
+pkgname=python3-b2sdk
 version=1.18.0
-revision=2
+revision=3
 build_style=python3-pep517
 make_install_target="dist/b2sdk-${version}-*-*-*.whl"
 hostmakedepends="python3-setuptools_scm python3-wheel"
-depends="python3-logfury python3-Arrow python3-requests python3-six"
+depends="python3-logfury python3-Arrow python3-requests python3-tqdm"
 checkdepends="python3-pytest-lazy-fixture $depends python3-dateutil
  python3-mock python3-tqdm python3-pyflakes"
 short_desc="Backblaze's B2 Python SDK"
@@ -15,8 +14,16 @@ license="MIT"
 homepage="https://pypi.org/project/b2sdk"
 distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz"
 checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec
+replaces="python-b2sdk>=0"
+# Tests require an application key
 make_check=no
 
 post_install() {
 	vlicense LICENSE
 }
+
+python-b2sdk_package() {
+	build_style=meta
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - transitional package"
+}
diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update
similarity index 100%
rename from srcpkgs/python-b2sdk/update
rename to srcpkgs/python3-b2sdk/update

From a8b16cff47a5fb7c47d354922df6ad5ddbd0a418 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/5] New package: python3-rst2ansi-0.1.5

---
 .../python3-rst2ansi/patches/table-fix.patch  | 31 +++++++++++++++++++
 .../python3-rst2ansi/patches/unicode.patch    | 25 +++++++++++++++
 srcpkgs/python3-rst2ansi/template             | 23 ++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch
 create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch
 create mode 100644 srcpkgs/python3-rst2ansi/template

diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
new file mode 100644
index 000000000000..61e28098c7cd
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch
@@ -0,0 +1,31 @@
+From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Thu, 14 Jul 2016 13:39:31 +0200
+Subject: [PATCH 1/2] Fix name error
+
+---
+ rst2ansi/table.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/rst2ansi/table.py b/rst2ansi/table.py
+index 389eb38..9f867a5 100644
+--- a/rst2ansi/table.py
++++ b/rst2ansi/table.py
+@@ -91,7 +91,7 @@ def noop(*args, **kwargs):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+ 
+   def depart_table(self, node):
+@@ -197,7 +197,7 @@ def _draw_rule(self):
+ 
+   def visit_table(self, node):
+     if self.level > 0:
+-      raise SkipChildren
++      raise nodes.SkipChildren
+     self.level += 1
+     self._draw_rule()
+ 
diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch
new file mode 100644
index 000000000000..591eb0704234
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch
@@ -0,0 +1,25 @@
+From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001
+From: "Franklin \"Snaipe\" Mathieu" <snaipe@arista.com>
+Date: Mon, 25 Jan 2021 18:06:51 +0100
+Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode
+ strings in python3
+
+Fixes #12, #13
+---
+ rst2ansi/__init__.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py
+index f0665f4..0ea9a97 100644
+--- a/rst2ansi/__init__.py
++++ b/rst2ansi/__init__.py
+@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+   for style in STYLES:
+     roles.register_local_role('ansi-' + style, style_role)
+ 
+-  out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
++  if hasattr(input_string, 'decode'):
++    input_string = input_string.decode('utf-8')
++
++  out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf')))
+   return out.decode(output_encoding)
diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template
new file mode 100644
index 000000000000..31734232678f
--- /dev/null
+++ b/srcpkgs/python3-rst2ansi/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-rst2ansi'
+pkgname=python3-rst2ansi
+version=0.1.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-docutils"
+short_desc="Python utility for rendering RST in the terminal"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Snaipe/python-rst2ansi"
+distfiles="
+ ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz
+ https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE
+"
+checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f
+ f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0"
+make_check=no # package defines no tests
+skip_extraction="LICENSE"
+
+post_install() {
+	vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE"
+}

From 21cfb7827575462ff099ed92516c80ea0c5dab18 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 11:51:56 -0500
Subject: [PATCH 3/5] python3-docutils: update to 0.19.

---
 srcpkgs/python3-docutils/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/python3-docutils/template b/srcpkgs/python3-docutils/template
index 9d322219faf7..d36b578c1000 100644
--- a/srcpkgs/python3-docutils/template
+++ b/srcpkgs/python3-docutils/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-docutils'
 pkgname=python3-docutils
-version=0.18.1
-revision=2
+version=0.19
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 # docutils/writers/odf_odt/pygmentsformatter.py
@@ -12,7 +12,7 @@ maintainer="Alessio Sergi <al3hex@gmail.com>"
 license="Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0"
 homepage="http://docutils.sourceforge.net"
 distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz"
-checksum=679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06
+checksum=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6
 
 alternatives="
  docutils:rst2html:/usr/bin/rst2html.py

From 2c42eb4f438b2b11d303a67dff52625956de2a9d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 12:20:32 -0500
Subject: [PATCH 4/5] python3-tqdm: update to 4.64.1.

---
 srcpkgs/python3-tqdm/template | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/python3-tqdm/template b/srcpkgs/python3-tqdm/template
index 66d7346427ec..91cb10685a46 100644
--- a/srcpkgs/python3-tqdm/template
+++ b/srcpkgs/python3-tqdm/template
@@ -1,16 +1,18 @@
 # Template file for 'python3-tqdm'
 pkgname=python3-tqdm
-version=4.48.2
-revision=5
+version=4.64.1
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
+depends="python3"
+checkdepends="python3-pytest-xdist python3-pytest-asyncio
+ python3-pytest-timeout $depends"
 short_desc="Fast, extensible progress bar for Python and CLI (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, MIT"
 homepage="https://tqdm.github.io/"
-distfiles="https://github.com/tqdm/tqdm/archive/v${version}.tar.gz"
-checksum=91a61673103ae2d5a1b93672ff60455d689b58372c08b1a27e1a7def71dc05a3
+distfiles="${PYPI_SITE}/t/tqdm/tqdm-${version}.tar.gz"
+checksum=5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4
 conflicts="python-tqdm>=0"
 
 post_install() {

From 70cedcd71ca5171f5e569648665ec411346db141 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 5/5] backblaze-b2: update to 3.6.0.

Fixes: #37484.
---
 .../backblaze-b2/patches/python-3.11.patch    | 87 +++++++++++++++++++
 .../patches/setuptools_scm_version.patch      | 13 +++
 .../patches/src_last_modified_millis.patch    | 12 ---
 srcpkgs/backblaze-b2/template                 | 27 ++----
 4 files changed, 108 insertions(+), 31 deletions(-)
 create mode 100644 srcpkgs/backblaze-b2/patches/python-3.11.patch
 create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
 delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch

diff --git a/srcpkgs/backblaze-b2/patches/python-3.11.patch b/srcpkgs/backblaze-b2/patches/python-3.11.patch
new file mode 100644
index 000000000000..630a0d032d03
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/python-3.11.patch
@@ -0,0 +1,87 @@
+From 1eac94954530a1dca2c498de7bf9f92ee12479b1 Mon Sep 17 00:00:00 2001
+From: kkalinowski-reef <114084217+kkalinowski-reef@users.noreply.github.com>
+Date: Tue, 15 Nov 2022 01:11:34 +0100
+Subject: [PATCH] Fetching command class from parsed arguments instead of
+ registry (#836)
+
+* Fetching command class from parsed arguments instead of registry
+
+* Enabled 3.11 tests in both nox and github workflows
+---
+ .github/workflows/ci.yml |  2 +-
+ CHANGELOG.md             |  1 +
+ b2/console_tool.py       | 11 ++++++-----
+ noxfile.py               |  8 +++++++-
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+[Void note (ahesford): CHANGLEOG.md diff conflicts and was dropped.]
+
+diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
+index 5d64cdb5..84932867 100644
+--- a/.github/workflows/ci.yml
++++ b/.github/workflows/ci.yml
+@@ -80,7 +80,7 @@ jobs:
+       fail-fast: false
+       matrix:
+         os: ["ubuntu-latest", "macos-latest", "windows-latest"]
+-        python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
++        python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "3.11"]
+         exclude:
+           - os: "macos-latest"
+             python-version: "pypy-3.7"
+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']
diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
new file mode 100644
index 000000000000..2038bdb7c72c
--- /dev/null
+++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch
@@ -0,0 +1,13 @@
+Setup works just fine with the version of setuptools_scm in Void.
+
+--- a/setup.py
++++ b/setup.py
+@@ -111,7 +111,7 @@
+     # for example:
+     # $ pip install -e .[dev,test]
+     extras_require={'doc': read_requirements('doc')},
+-    setup_requires=['setuptools_scm<6.0'],
++    setup_requires=['setuptools_scm'],
+     use_scm_version=True,
+ 
+     # If there are data files included in your packages that need to be
diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
deleted file mode 100644
index 04ec4886fe4a..000000000000
--- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/b2/console_tool.py
-+++ b/b2/console_tool.py
-@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i
-     B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE
- )
- from b2sdk.progress import make_progress_listener
--from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS
-+from b2sdk.raw_api import MetadataDirectiveMode
-+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS
- from b2sdk.version import VERSION as b2sdk_version
- from b2sdk.v1 import (
-     parse_sync_folder,
diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template
index 1552c67ef8e6..47801daa5a18 100644
--- a/srcpkgs/backblaze-b2/template
+++ b/srcpkgs/backblaze-b2/template
@@ -1,34 +1,23 @@
 # Template file for 'backblaze-b2'
 pkgname=backblaze-b2
-version=2.1.0
-revision=3
+version=3.6.0
+revision=1
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-logfury python3-Arrow python3-requests python3-six
- python3-tqdm python-b2sdk python3-phx-class-registry"
-checkdepends="python3-pytest $depends python3-pyflakes python3-mock
- python3-dateutil"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-Arrow python3-b2sdk python3-docutils
+ python3-phx-class-registry python3-rst2ansi python3-tabulate"
 short_desc="Command Line Interface for Backblaze's B2 storage service"
 maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="MIT"
 homepage="https://github.com/Backblaze/B2_Command_Line_Tool"
 distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz"
-checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080
+checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252
 replaces="python-b2>=0"
-provides="python-b2-${version}_${revision}"
-
-post_patch() {
-	# this files is necessary for do_check
-	# the files is copied directly from its GitHub's repository
-	cp "$FILESDIR/test_b2_command_line.py" "$wrksrc"
-}
+make_check=no # tests require unpackaged dependencies
 
 post_install() {
-	# Remove test directory polluting site-packages
-	rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test
-
 	# Avoid conflict with Boost's b2 tool
-	mv ${DESTDIR}/usr/bin/b2  ${DESTDIR}/usr/bin/backblaze-b2
+	mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2
 
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (14 preceding siblings ...)
  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
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-07 14:35 UTC (permalink / raw)
  To: ml

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

New comment by ahesford on void-packages repository

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

Comment:
OK, I just added the dependency to `python3-b2sdk`. I also noticed that `six` dropped off the requirements list, so we can drop that.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (15 preceding siblings ...)
  2022-12-07 14:35 ` ahesford
@ 2022-12-07 14:44 ` kartikynwa
  2022-12-07 14:52 ` [PR PATCH] [Merged]: " ahesford
  17 siblings, 0 replies; 19+ messages in thread
From: kartikynwa @ 2022-12-07 14:44 UTC (permalink / raw)
  To: ml

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

New comment by kartikynwa on void-packages repository

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

Comment:
@ahesford Working fine now. Thanks a lot. Just tested it.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Merged]: backblaze-b2: update to 3.6.0
  2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
                   ` (16 preceding siblings ...)
  2022-12-07 14:44 ` kartikynwa
@ 2022-12-07 14:52 ` ahesford
  17 siblings, 0 replies; 19+ messages in thread
From: ahesford @ 2022-12-07 14:52 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

backblaze-b2: update to 3.6.0
https://github.com/void-linux/void-packages/pull/40928

Description:
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-12-07 14:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 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
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

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).