Bug 283360 - devel/py-proxmoxer: Update to 2.2.0
Summary: devel/py-proxmoxer: Update to 2.2.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: Nuno Teixeira
URL: https://github.com/proxmoxer/proxmoxe...
Keywords:
Depends on: 283381
Blocks:
  Show dependency treegraph
 
Reported: 2024-12-16 10:59 UTC by Einar Bjarni Halldórsson
Modified: 2024-12-24 08:52 UTC (History)
1 user (show)

See Also:
eduardo: merge-quarterly-


Attachments
Updates devel/py-proxmoxer to 2.2.0 (1.28 KB, patch)
2024-12-16 11:00 UTC, Einar Bjarni Halldórsson
einar: maintainer-approval+
Details | Diff
pep517 + pytest (failing, missing deps) (1.24 KB, patch)
2024-12-16 12:56 UTC, Nuno Teixeira
no flags Details | Diff
Update py-proxmoxer, using pep517 + pytest (2.08 KB, patch)
2024-12-17 12:42 UTC, Einar Bjarni Halldórsson
einar: maintainer-approval+
Details | Diff
Sync tests with GH released version (59.81 KB, patch)
2024-12-21 22:34 UTC, Nuno Teixeira
no flags Details | Diff
Sync tests with GH released version, cleaned (42.01 KB, patch)
2024-12-23 12:58 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2024-12-16 10:59:37 UTC
Update devel/py-proxmoxer to 2.2.0

https://github.com/proxmoxer/proxmoxer/releases/tag/2.2.0
Comment 1 Einar Bjarni Halldórsson 2024-12-16 11:00:14 UTC
Created attachment 255888 [details]
Updates devel/py-proxmoxer to 2.2.0
Comment 2 Einar Bjarni Halldórsson 2024-12-16 11:00:42 UTC
portlint OK, builds in poudriere on 14.2-RELEASE amd64
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-16 12:56:38 UTC
Created attachment 255893 [details]
pep517 + pytest (failing, missing deps)

Hello,

Before I commit, we could update port to pep517 build as distutils will be deprecated soon.

I added pytest so we can have a testunit ready but `make test` fails with some non ported dependencies.

Could you test build/run tests?
Give a try on `make test, you can add missing deps to TEST_DEPENDENDS=...

Sugestion, if tests are not possible to run at this point, we could commit it with pep517 build at least.

Cheers
Comment 4 Einar Bjarni Halldórsson 2024-12-16 12:57:52 UTC
(In reply to Nuno Teixeira from comment #3)

I'll do that
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-16 13:29:14 UTC
(In reply to Einar Bjarni Halldórsson from comment #4)

Nice.

A small correction:
- TEST_DEPENDENDS=...
+ TEST_DEPENDS=...

Cheers
Comment 6 Einar Bjarni Halldórsson 2024-12-16 15:09:48 UTC
(In reply to Nuno Teixeira from comment #3)

There (In reply to Nuno Teixeira from comment #3)

I added the missing dependencies, but the tests are still failing to run.

Looks like there are files missing from the pypi archive.
I've openened an issue with upstream https://github.com/proxmoxer/proxmoxer/issues/195
Comment 7 Einar Bjarni Halldórsson 2024-12-16 15:18:03 UTC
(In reply to Einar Bjarni Halldórsson from comment #6)

I had forgotten, we already did engage upstream about tests missing from pypi archives: https://github.com/proxmoxer/proxmoxer/issues/126

Not sure if their position has changed since then.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-16 16:56:16 UTC
(In reply to Einar Bjarni Halldórsson from comment #7)

Hello Einar,

I'm following new PR and we can wait for upstream reaction.

Until then we can commit port with pep517+pytest(including TEST_DEPENDS) with:

+ TESTING_UNSAFE= <link to upstream PR> until it is fixed.

You thoughts?
Comment 9 Einar Bjarni Halldórsson 2024-12-16 23:58:37 UTC
(In reply to Nuno Teixeira from comment #8)

Let me test the pep517 build tomorrow, and you can commit it with TESTING_UNSAFE.
Comment 10 Einar Bjarni Halldórsson 2024-12-17 10:28:32 UTC
Ok, you should commit now with pep517+pytest
Comment 11 Einar Bjarni Halldórsson 2024-12-17 10:29:56 UTC
I have a patch that adds the missing dependency (security/py-openssh-wrapper) and the other needed dependencies for pytest. Should I add it here or in a seperate PR?
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-17 10:55:57 UTC
(In reply to Einar Bjarni Halldórsson from comment #11)

Please add it in a separate PR and add me in CC. You could put that new PR blocking this one (or I can do that later).

Thanks
Comment 13 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-17 11:33:45 UTC
(In reply to Nuno Teixeira from comment #12)

(...)
And upload patch with pep517+pytest+test_depends+testing_unsafe to this PR.

Cheers
Comment 14 Einar Bjarni Halldórsson 2024-12-17 12:42:31 UTC
Created attachment 255914 [details]
Update py-proxmoxer, using pep517 + pytest
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-12-17 13:50:36 UTC
A commit in branch main references this bug:

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

commit b59c92b2de849111811caf8539532cf261f4ced4
Author:     Einar Bjarni Halldórsson <einar@isnic.is>
AuthorDate: 2024-12-17 13:40:48 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-12-17 13:47:55 +0000

    devel/py-proxmoxer: Update to 2.2.0

    - Switch to pep517 build
    - Add tests
    - Add TESTING_UNSAFE

    ChangeLog:      https://github.com/proxmoxer/proxmoxer/releases/tag/2.2.0
    PR:             283360

 devel/py-proxmoxer/Makefile | 12 ++++++++++--
 devel/py-proxmoxer/distinfo |  6 +++---
 2 files changed, 13 insertions(+), 5 deletions(-)
Comment 16 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-17 13:55:19 UTC
Committed, thanks
Comment 17 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-20 13:41:45 UTC
I can confirm that unittest completes fine with just a deprecation warning on wrapper.

- Used tests directory from github tarball (released version) replacing pypi one.
- Add missing TEST_DEPENDS=
${PYTHON_PKGNAMEPREFIX}requests-toolbelt>0:www/py-requests-toolbelt@${PY_FLAVOR}

What we can do here?

Fetching missing files from github seems counter-productive since we want tarball from pypi.

My opinion is too create a tests directory tarball copied from github tarball and upload it to FreeBSD/distfiles since every committer can do that.

After it we can instruct port to fetch extra distfile for FreeBSD and add missing files to tests or maybe better to replace completely pypi tests dir.

A clean way is to instruct port to not extract 'tests' at extract target and then a clean copy will be extracted from the extra distfile.

A crazy plan :)

Cheers
Comment 18 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-20 14:13:22 UTC
(In reply to Nuno Teixeira from comment #17)
(...)

I think the best method is to include multiple distfiles:
https://docs.freebsd.org/en/books/porters-handbook/book/#porting-master-sites-n

Thoughts?
Comment 19 Einar Bjarni Halldórsson 2024-12-20 15:31:39 UTC
(In reply to Nuno Teixeira from comment #18)

Looking at https://github.com/proxmoxer/proxmoxer/commits/develop/tests I have a feeling it could become a painpoint to sync the freebsd hosted tests/ directory with upstream.

If you think it's worth it, then I agree :)
Comment 20 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-20 16:51:21 UTC
(In reply to Einar Bjarni Halldórsson from comment #19)

Well there is a dirty but fast way to do it: patch.
The problem is that it is not recomended to add new files via patch...
Comment 21 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-20 17:04:05 UTC
(In reply to Nuno Teixeira from comment #20)
...

But since we are not adding binary files... a patch could pass without notice :)
Comment 22 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-21 22:34:30 UTC
Created attachment 256030 [details]
Sync tests with GH released version

- Sync tests with GH released version
- Use BINARY_ALIAS to replace python3 with PYTHON_CMD
- Add missing test dependency
Comment 23 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-21 22:35:21 UTC
Reopening for testunit fixes
Comment 24 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-21 22:38:46 UTC
Hello,

This was the more elegant way that I found to sync tests with GH.
I believe that a good cleanup could be made directly on 'extra-patch-tests' since some diffs don't apply to tests funcionality.

Just give a try and say your opinion.

Cheers
Comment 25 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-23 12:58:19 UTC
Created attachment 256062 [details]
Sync tests with GH released version, cleaned

Remove an extra file and reduce patch from 57k to 40k
Comment 26 Einar Bjarni Halldórsson 2024-12-24 00:41:14 UTC
Looks like a good solution to a bad situtation, since upstream won't add the files to the archive.

I approve
Comment 27 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-24 08:39:01 UTC
(In reply to Einar Bjarni Halldórsson from comment #26)

Agreed.

Lets see what happens in next release and then you can decide if port stay fetching from PYPI with no pytest or fetch from GH.

This kind of patch isn't the best and correct way to do this fixes as it belongs on upstream side.

I saw similar patches adding missing stuff for cmake builds because upstream forgot to include it in released tarball.

I will include upstream PR in a small comment after the extra patch in Makefile.

Thanks
Comment 28 commit-hook freebsd_committer freebsd_triage 2024-12-24 08:50:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=20d2e961ee73f108e45838473147bcccea0c5a7b

commit 20d2e961ee73f108e45838473147bcccea0c5a7b
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-12-24 08:47:09 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-12-24 08:47:09 +0000

    devel/py-proxmoxer: Fix tests

    Sync PYPI tests with GH released version until fixed upstream

    See also:       https://github.com/proxmoxer/proxmoxer/issues/195
    PR:             283360

 devel/py-proxmoxer/Makefile                      |    6 +-
 devel/py-proxmoxer/files/extra-patch-tests (new) | 1117 ++++++++++++++++++++++
 2 files changed, 1122 insertions(+), 1 deletion(-)
Comment 29 Nuno Teixeira freebsd_committer freebsd_triage 2024-12-24 08:52:25 UTC
Committed, thank you!