Origin URL for a package listed by the pubdev lister is now in the form
https://pub.dev/packages/<package_name> so we need to reconstruct the
API URL to get package versions from it.
Related to T4465
Depends on D8354
Paths
| Differential D8355 Authored by anlambert on Aug 31 2022, 11:38 AM.
Details
Summary Origin URL for a package listed by the pubdev lister is now in the form Related to T4465 Depends on D8354
Diff Detail
Event TimelineHerald added a reviewer: Reviewers. · View Herald TranscriptAug 31 2022, 11:38 AM2022-08-31 11:38:44 (UTC+2) Comment Actions Build is green Patch application report for D8355 (id=30161)Rebasing onto 68e68e3f92... Current branch diff-target is up to date. Changes applied before testcommit 89d0302872b4c7098c304f5cd39aa9467b65fb9d Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Wed Aug 31 11:36:22 2022 +0200 pubdev: Simplify loader implementation No need to fetch package versions info anymore as it will be provided by the pubdev lister as loader extra argument. Related to T4465 See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/849/ for more details. Harbormaster completed remote builds in B31205: Diff 30161.Aug 31 2022, 11:42 AM2022-08-31 11:42:35 (UTC+2) anlambert retitled this revision from pubdev: Simplify loader implementation to pubdev: Modify loader after origin URL modification in related lister.Sep 2 2022, 4:55 PM2022-09-02 16:55:13 (UTC+2) Comment Actions Build is green Patch application report for D8355 (id=30271)Rebasing onto 68e68e3f92... Current branch diff-target is up to date. Changes applied before testcommit 435e4336ed26ce690693953be6562b54bcc5fba7 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Fri Sep 2 16:42:25 2022 +0200 pubdev: Modify loader after origin URL modification in related lister Origin URL for a package listed by the pubdev lister is now in the form https://pub.dev/packages/<package_name> so we need to reconstruct the API URL to get package versions from it. See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/854/ for more details. Harbormaster completed remote builds in B31306: Diff 30271.Sep 2 2022, 4:58 PM2022-09-02 16:58:22 (UTC+2) Comment Actions what are the changes to data files? just pretty-printed?
Comment Actions
Yes, they are hard to read when working on tests otherwise. I can make a dedicated commit if you prefer.
Comment Actions Build is green Patch application report for D8355 (id=30273)Rebasing onto 68e68e3f92... Current branch diff-target is up to date. Changes applied before testcommit d85615ac58e4a6fc1d8c17b9b7ac82d94521362c Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Fri Sep 2 16:42:25 2022 +0200 pubdev: Modify loader after origin URL modification in related lister Origin URL for a package listed by the pubdev lister is now in the form https://pub.dev/packages/<package_name> so we need to reconstruct the API URL to get package versions from it. See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/856/ for more details. Harbormaster completed remote builds in B31308: Diff 30273.Sep 2 2022, 5:16 PM2022-09-02 17:16:57 (UTC+2) This revision is now accepted and ready to land.Sep 5 2022, 3:53 PM2022-09-05 15:53:08 (UTC+2) Comment Actions Build is green Patch application report for D8355 (id=30299)Rebasing onto 3ae2df31fe... Current branch diff-target is up to date. Changes applied before testcommit 6cdf6d30045cd64c6a8e3674037a8a20ffb96ab6 Author: Antoine Lambert <anlambert@softwareheritage.org> Date: Fri Sep 2 16:42:25 2022 +0200 pubdev: Modify loader after origin URL modification in related lister Origin URL for a package listed by the pubdev lister is now in the form https://pub.dev/packages/<package_name> so we need to reconstruct the API URL to get package versions from it. See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/859/ for more details. Harbormaster completed remote builds in B31331: Diff 30299.Sep 5 2022, 5:20 PM2022-09-05 17:20:01 (UTC+2) Closed by commit rDLDBASE6cdf6d30045c: pubdev: Modify loader after origin URL modification in related lister (authored by anlambert). · Explain WhySep 5 2022, 5:20 PM2022-09-05 17:20:43 (UTC+2) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 30273 swh/loader/package/pubdev/loader.py
swh/loader/package/pubdev/tests/data/https_pub.dev/api_packages_Autolinker
swh/loader/package/pubdev/tests/data/https_pub.dev/api_packages_abstract_io
swh/loader/package/pubdev/tests/data/https_pub.dev/api_packages_authentication
|
I would like this class to be more pythonic by working as a context manager. For me, the sqlite3 connection should probably happen in an __enter__() function, and closing it in an __exit__() function. I know you cannot use a with block in the Fuse operation class (a shame...), but at least it keeps the quirky aspect of this solely in the Fuse class.