Bug 258033 - devel/py-b2sdk: Update to 1.12.0
Summary: devel/py-b2sdk: Update to 1.12.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kai Knoblich
URL: https://github.com/Backblaze/b2-sdk-p...
Keywords:
Depends on:
Blocks: 259445
  Show dependency treegraph
 
Reported: 2021-08-24 22:42 UTC by Henry
Modified: 2021-11-12 11:35 UTC (History)
4 users (show)

See Also:
PopularMoment: maintainer-feedback+


Attachments
diff (1.19 KB, patch)
2021-08-24 22:42 UTC, Henry
no flags Details | Diff
patch (2.28 KB, patch)
2021-08-25 01:19 UTC, Henry
no flags Details | Diff
patch (2.33 KB, patch)
2021-08-25 01:46 UTC, Henry
no flags Details | Diff
py-b2sdk-1.12.0-revised.patch (4.32 KB, patch)
2021-11-04 06:41 UTC, Kai Knoblich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry 2021-08-24 22:42:23 UTC
Created attachment 227417 [details]
diff
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2021-08-24 23:16:42 UTC
Hello!

I found that some small style fixes could be applied to Makefile:

1 'portlint -C' (included in point 2)
---
WARN: Makefile: [32]: use a tab (not space) after a variable name
---

2. 'portfmt -D Makefile' (_DEPENDS and USE_ alphabetical order)
---
--- Makefile
+++ Makefile
@@ -16,13 +16,13 @@
                ${PYTHON_PKGNAMEPREFIX}requests>=2.9.1:www/py-requests@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
                ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} \
+               ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
+               ${PYTHON_PKGNAMEPREFIX}tqdm>=4.5.0:misc/py-tqdm@${PY_FLAVOR}
+TEST_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \
+               ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR}
-               ${PYTHON_PKGNAMEPREFIX}tqdm>=4.5.0:misc/py-tqdm@${PY_FLAVOR} \
-               ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
-TEST_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} \
-               ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}

 USES=          python:3.6+
+USE_PYTHON=    autoplist concurrent distutils
-USE_PYTHON=    distutils autoplist concurrent

 NO_ARCH=       yes

@@ -29,7 +29,7 @@
 .include <bsd.port.pre.mk>

 .if ${PYTHON_REL} < 30800
+RUN_DEPENDS+=  ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}

Thanks
---
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-25 00:52:41 UTC
Review items:

+	@${REINPLACE_CMD} -e '1 s|,.*||' ${WRKSRC}/requirements.txt
+	@${REINPLACE_CMD} -i '' -e '1 s|<.*||' ${WRKSRC}/*/requires.txt

Can you detail the rationale for these changes?

^Triage:

  - [tags] in issue Titles are deprecated
  - If there is a changelog or release notes URL available for this version, please add it to the URL field
  - Set attachment maintainer-approval flag (to +) on patches for ports you maintain to signify approval:

Attachment -> Details -> maintainer-approval [?]
Comment 3 Henry 2021-08-25 01:19:10 UTC
Created attachment 227418 [details]
patch

Updated patch with dependencies sorted and minor white space changes.
Comment 4 Henry 2021-08-25 01:21:26 UTC
(In reply to Kubilay Kocak from comment #2)
This is required due to the overly restrictive arrow dependency definition.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-25 01:35:07 UTC
(In reply to Henry from comment #4)

Thanks Henry. When doing that (which is fine), either:

- Add comments above the patch block clarifying what/why, like:

 # Remove pinned upper bound version-specs

or

- Do this with an explicit files/patch-* files so the specific dependencies and changes can be seen.

It's also highly recommended to ask upstream to use appropriate version-specs for distributed/distribution packages

Lastly, when patching dependency version specs, confirming that the package still functions appropriately, via upstreams test suite, is absolutely necessary [1] Can you confirm the port passes tests with current versions of ports in the tree? 

Thanks!

[1] https://wiki.freebsd.org/Python/PortsPolicy#Modifying_Dependencies
Comment 6 Henry 2021-08-25 01:46:58 UTC
Created attachment 227419 [details]
patch

Add comment describing reason for requirements/requires patching.
Comment 7 Henry 2021-08-25 01:51:45 UTC
(In reply to Kubilay Kocak from comment #5)
I can confirm the only consumer of this, sysutils/duplicity, functions correctly and passes the test suite.
Comment 8 Kai Knoblich freebsd_committer freebsd_triage 2021-11-04 06:41:23 UTC
Created attachment 229259 [details]
py-b2sdk-1.12.0-revised.patch

(In reply to Henry from comment #6)

Attached you can find a revised patch which is based on your last submission.  Following items were adjusted/changed:

* Update the "do-test" target to get a working test suite.  The new TEST_DEPENDS were extracted from "noxfile.py".

* Set the version requirements of the *_DEPENDS more specific.

* Convert the "${REINPLACE_CMD}" of "requirements.txt" into a patch (see Porter's Handbook 4.4.3) and remove the patching for "requires.txt".  The latter file is dynamically regenerated with the modified dependencies of "requirements.txt" during build.

* Add another patch to prepare the port for the 6.x release of devel/py-setuptools_scm.

Technically, all of the items listed above would fall under the portmgr blanket.  But because some time has passed by now and I still have to do some QA work for devel/py-setuptools_scm, I added the patch, in case there are any further questions.

QA:
~~~
poudriere -> OK (12.2-RELEASE amd64 for py36, py37, py38, py39, py310)
portclippy/portlint -> OK

Results of "make test" (for py36-39):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 387 passed, 48 skipped, 5 deselected, 3 warnings in N.NN seconds

P.S.: Meanwhile, the 1.13.0 release is out but devel/py-logfury would have to be updated to 1.0.1 (or later) beforehand.
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-11-12 11:29:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35e10dcc8d080edb3811acac2ae805c53b81a296

commit 35e10dcc8d080edb3811acac2ae805c53b81a296
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2021-11-12 11:12:59 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2021-11-12 11:12:59 +0000

    devel/py-b2sdk: Update to 1.12.0 [1]

    * Pet portclippy/portlint [1]

    * Update testsuite and prepare the port for the 6.x release of
      devel/py-setuptools_scm while I'm here.

    Changelog:

    https://github.com/Backblaze/b2-sdk-python/releases/tag/v1.12.0

    PR:             258033
    Reported by:    Henry <PopularMoment@protonmail.com> (maintainer) [1]
    Reviewed by:    eduardo, koobs (earlier revision)

 devel/py-b2sdk/Makefile                           | 30 ++++++++++++++---------
 devel/py-b2sdk/distinfo                           |  6 ++---
 devel/py-b2sdk/files/patch-requirements.txt (new) | 10 ++++++++
 devel/py-b2sdk/files/patch-setup.py (new)         | 14 +++++++++++
 4 files changed, 46 insertions(+), 14 deletions(-)
Comment 10 Kai Knoblich freebsd_committer freebsd_triage 2021-11-12 11:35:23 UTC
Committed, thanks!