From patchwork Tue Jan 12 09:37:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 26333 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5317527BC10; Tue, 12 Jan 2021 09:38:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6B42A27BC0F for ; Tue, 12 Jan 2021 09:38:30 +0000 (GMT) Received: from localhost ([::1]:38724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzG8D-0002KW-I1 for patchwork@mira.cbaines.net; Tue, 12 Jan 2021 04:38:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzG7m-0002Jn-SK for guix-patches@gnu.org; Tue, 12 Jan 2021 04:38:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzG7m-0006D6-Le for guix-patches@gnu.org; Tue, 12 Jan 2021 04:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzG7m-00058g-IV for guix-patches@gnu.org; Tue, 12 Jan 2021 04:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45712] [PATCHES] Improve Python package quality References: Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Jan 2021 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45712 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Hartmut Goebel , Ricardo Wurmus Received: via spool by 45712-submit@debbugs.gnu.org id=B45712.161044425319701 (code B ref 45712); Tue, 12 Jan 2021 09:38:02 +0000 Received: (at 45712) by debbugs.gnu.org; 12 Jan 2021 09:37:33 +0000 Received: from localhost ([127.0.0.1]:59316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzG7F-00057c-14 for submit@debbugs.gnu.org; Tue, 12 Jan 2021 04:37:32 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:16756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzG7A-00057G-RI for 45712@debbugs.gnu.org; Tue, 12 Jan 2021 04:37:27 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4DFQTV44XZzQldS; Tue, 12 Jan 2021 10:37:18 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1610444236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=tA0pIASsK1vmrsi+xwhem2KTXsgM1s7ZFx+WG+qRW38=; b=EfjpiUkOkoz60bWXkzHkqY4Yn6edv/47IiXmF10Kq793olpJjcbOIB7pbKrJOWHFsolvJS Dntwz1XPg4WUo+fVCUj+LzM0c3QH4AxrOIJqroqHtEr/Yr8XF/kR13FgNEZwhqnpkuoEMl miKFJV6qQLlAuBCNM2PQRTiBs395FcEP2QvHj5g0fmC+1pfl6xFVI93CcCLoghIuMOJChE l3MSVvipUe8toyR60HE9N4Ul8DhVwGEsVgABUYb+0kkxEeETOaTLcoZGe68RUYuaUkep+X TvLs04J2G97yfx4qLh475iUNvBQJ7D2Tz++YYe5vrZFm9h1kshIf4oQqsRP/RQ== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id zzwYouXiXdcg; Tue, 12 Jan 2021 10:37:10 +0100 (CET) Date: Tue, 12 Jan 2021 10:37:07 +0100 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87pn2ffwoe.fsf@elephly.net> <87mtxj1wym.fsf@lenashee.goebel-consult.de> X-MBO-SPAM-Probability: X-Rspamd-Score: -6.22 / 15.00 / 15.00 X-Rspamd-Queue-Id: 9816717D7 X-Rspamd-UID: 8dfd68 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45712@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Hartmut, > Please but this int a new line - makeing it easier to copy & paste. > (Leading emptry lines doe nor effect "from __future__ import"). adopted Ricardo’s suggestion here. > This looks very uncommon (and make my mind hooking on it). Please use > this, which is more common and less mindbogling ;-) Done. > Any reason for converting the req into a string first? IC, > "`requirements` must be a string". So I'd move the "str()" to the > function call: Yes, the string is used in the error message. > if group not in {'console_scripts', 'gui_scripts'}: > Why not gui-scripts? > If not adding gui-scripts, just use "if group != 'concolse_scrips':" I wasn’t aware this exists. Added, thanks! > Does it make sence to try loading the top-level modules *after* the the > entry-point? Chances are very high that the entry-points implicitly test > the top-level modules already. > IMHO it would make more sense to first try the top-level modules, and > even stop processing if this fails. True, I reversed the order. Still, I think continuing with the entry points might be worth, if it points out more (different) errors. For small packages this might not be the case, but larger ones often only re-export specific names in the top-level module, thus testing might reveal more issues. > Please add a short explanation why there can be unavailable top-level > modules. Done. > While not having antoher idea, I'm not happy with this name. "loadable" > is not easy to get. (See also below, where this term is used in commit message.) > top-level-modules-are-importable? I’m also not happy with the name, but can’t think of a better one right now. Anyone? > AFAIKS the packages only differ by some requirements. So I suggest > using a function to return the packages. This makes it easier to spot > the actull differences. > […] > (mkdir-p "src/dummy") > (chdir "src") Done. > I would strip this down (version is not required AFAIK) and put it one > line (her assuming you use (format) for creating the code within a function: Not sure whether it’s optional or not, [1] does not say it is. No harm in keeping it? [1] https://setuptools.readthedocs.io/en/latest/references/keywords.html?highlight=version#keywords > Arguments are not used? Fixed. > Any reason for relaxing this? Why not use python-pytest-6 as input? Yes, our pytest@6 package reports its version as 0.0.0, so this patch is required with either package. Or we figure out how to fix pytest@6 (works fine with PEP 517 compliant build system). > Please rephrase into something like > Do not validate loadability Done. > Dosn't this change fix the checks? So this comment would be obsoltes and > "#:tests #t" can be removed. Should’ve been #f, sorry, fixed. > I suggest keeping the old way, as this is will automatically update to > upstream changes. Okay, I’ve added another phase that disables the test manually, because it fails for me every time. See attached patchset (v2) or git repository for updated patches. I’ve also rebuilt all 2284 packages depending on python-build-system. Currently 426 of them fail to build for any reason (not necessarily caused by this patchset; I’ve seen some unrelated issues). Due to the large number of packages failing I suggest moving forward with applying this first batch and then fixing everything else incrementally, unless some major package is broken (see attached list). WDYT? Cheers, Lars awscli b4 beets beets-bandcamp behave bpython buku calibre certbot curseradio dbxfs debops diffoscope docker-compose electron-cash electrum enjarify fabric fdroidserver fenics frescobaldi gandi.cli gaupol gitless gpodder grit grocsvs instantmusic jrnl jupyter keepkey-agent khmer ledger-agent letsencrypt linkchecker mailman miso mps-youtube nmoldyn nototools offlate onionshare openshot pagekite patchwork pbtranscript-tofu pepr picard poetry poretools postorius pre-commit presentty protonvpn-cli ptpython2 pulseaudio-dlna pybitmessage pyicoteo python2-anaconda-client python2-apache-libcloud python2-argcomplete python2-arrow python2-autograd python2-axolotl python2-bcrypt python2-behave-web-api python2-betamax python2-betamax-matchers python2-bigfloat python2-biom-format python2-booleanoperations python2-botocore python2-cachecontrol python2-cairocffi python2-celery python2-checkm-genome python2-clf python2-cloudpickle python2-consul python2-cryptography python2-cvxopt python2-cypari2 python2-discogs-client python2-dns-lexicon python2-drmaa python2-dulwich python2-ecpy python2-elasticsearch python2-email-validator python2-empy python2-entrypoints python2-factory-boy python2-faker python2-fakeredis python2-falcon python2-falcon-cors python2-fastlmm python2-fido2 python2-flake8 python2-flake8-polyfill python2-flask python2-flask-babel python2-flask-htmlmin python2-flask-login python2-flask-multistatic python2-flask-wtf python2-flex python2-furl python2-future python2-git-review python2-google-api-client python2-graphql-core python2-gridmap python2-guzzle-sphinx-theme python2-hdf4 python2-html5-parser python2-htseq python2-httpbin python2-ipykernel python2-ipyparallel python2-ipython python2-ipython-cluster-helper python2-ipywidgets python2-josepy python2-jupyter-client python2-jupyter-console python2-kivy python2-kombu python2-ledgerblue python2-libadalang python2-lzstring python2-mapnik python2-matplotlib python2-matplotlib-documentation python2-mechanicalsoup python2-mutagen python2-mwclient python2-nbconvert python2-nbxmpp python2-ndg-httpsclient python2-nose2 python2-notebook python2-notify2 python2-numpydoc python2-numpy-documentation python2-oauthlib python2-openid-cla python2-openid-teams python2-openpyxl python2-orator python2-os-client-config python2-os-testr python2-pandas python2-paramiko python2-parsedatetime python2-partd python2-pathpy python2-patsy python2-pendulum python2-pep517 python2-pgpdump python2-pika python2-plastid python2-plotly python2-py2neo python2-pybedtools python2-pyclipper python2-pyfakefs python2-pylibmc python2-pymysql python2-pynacl python2-pynamecheap python2-pyopenssl python2-pysnptools python2-pytest-xdist python2-radon python2-rauth python2-renpy python2-requests python2-requests-file python2-requests-mock python2-requests-oauthlib python2-requests-toolbelt python2-responses python2-roca-detect python2-rpython python2-rq python2-rst.linker python2-ruamel.yaml python2-s3transfer python2-scikit-learn python2-scipy python2-scripttest python2-seaborn python2-service-identity python2-setuptools-scm-git-archive python2-sh python2-shapely python2-sockjs-tornado python2-sphinx-cloud-sptheme python2-sphinxcontrib-programoutput python2-sphinx-repoze-autointerface python2-statsmodels python2-stem python2-stevedore python2-tables python2-terminado python2-tldextract python2-tornado python2-translate-toolkit python2-trollius-redis python2-twine python2-urlgrabber python2-urllib3 python2-utils python2-validators python2-warpedlmm python2-widgetsnbextension python2-wsgiproxy2 python2-xenon python2-yubikey-manager python2-zope-component python2-zope-configuration python2-zope-exceptions python2-zope-i18nmessageid python2-zope-location python2-zope-proxy python2-zope-schema python2-zope-security python2-zope-testrunner python-args python-aws-xray-sdk python-bbknn python-behave-web-api python-bigfloat python-btrees python-cachy python-clint python-codacy-coverage python-cypari2 python-daemux python-dendropy python-django-auth-ldap python-django-bulk-update python-django-classy-tags python-django-compressor python-django-contact-form python-django-debug-toolbar python-django-debug-toolbar-alchemy python-django-extensions python-django-filter python-django-haystack python-django-jinja python-django-logging-json python-django-mailman3 python-django-netfields python-django-redis python-djangorestframework python-django-rq python-django-sekizai python-django-statici18n python-django-url-filter python-docker python-drmaa python-duniterpy python-eliot python-enum34 python-eventlet python-faiss python-fakeredis python-flasgger python-flask-restplus python-flask-session python-flit python-funcparserlib python-graphene python-gridmap python-gyp python-hacking python-hdf4 python-html5-parser python-hy python-hyperkitty python-internetarchive python-ipykernel python-ipyparallel python-ipython-cluster-helper python-ipython-documentation python-ipywidgets python-jaraco-packaging python-jose python-jsonpickle python-jupyter-client python-jupyter-console python-jupyter-kernel-mgmt python-jupyter-kernel-test python-jupyter-protocol python-keyring python-keyrings.alt python-keystoneclient python-kivy python-ldap python-lfdfiles python-libsass python-logwrap python-mailman-hyperkitty python-mamba python-matplotlib-documentation python-matrix-synapse-ldap3 python-miniboa python-moto python-nautilus python-nbval python-ndg-httpsclient python-notebook python-numpy-documentation python-onnx python-ont-fast5-api python-openid-cla python-openid-teams python-orator python-os-client-config python-oslo.config python-oslo.context python-oslo.i18n python-oslo.log python-oslo.serialization python-oslosphinx python-oslo.utils python-os-testr python-owslib python-pafy python-parallel python-pari-jupyter python-pathpy python-pendulum python-persistent python-petsc4py python-pifpaf python-plotly python-py3dns python-pyacoustid python-pyclipper python-pydub python-pykafka python-pykka python-pylibmc python-pyramid python-pytest-arraydiff python-pytest-checkdocs python-pytest-django python-pytest-mpl python-pytest-shutil python-pytest-virtualenv python-pytidylib python-pyxb python-qdarkstyle python-qtconsole python-qtpy python-radon python-scripttest python-setools python-setuptools-scm-git-archive python-slepc4py python-socksipychain python-sphinx-copybutton python-stestr python-swiftclient python-symengine python-tempest-lib python-tortoise-orm python-translate-toolkit python-translation-finder python-trollius-redis python-trytond-account python-trytond-account-invoice python-trytond-account-invoice-stock python-trytond-account-product python-trytond-analytic-account python-trytond-company python-trytond-country python-trytond-currency python-trytond-party python-trytond-product python-trytond-purchase python-trytond-purchase-request python-trytond-stock python-trytond-stock-lot python-trytond-stock-supply python-txacme python-typing python-widgetsnbextension python-xattr python-xenon python-zope-component python-zope-configuration python-zope-copy python-zope-deferredimport python-zope-exceptions python-zope-i18nmessageid python-zope-location python-zope-proxy python-zope-schema python-zope-security python-zope-testrunner qutebrowser rapid-photo-downloader renpy reprotest ribodiff rtv silkaj solaar synapse syncthing-gtk tadbit taxtastic tbsp trezor-agent tuir unknown-horizons virtaal xpra you-get youtube-dl youtube-dl-gui From 55aab0eba972c6672be9d8de5e0ec9340b10c243 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 11 Jan 2021 15:19:01 +0100 Subject: [PATCH v2 16/16] gnu: python2-packaging-bootstrap: Add missing dependency * gnu/packages/python-xyz.scm (python2-packaging-bootstrap) [propagated-inputs]: Add python2-six-bootstrap. --- gnu/packages/python-xyz.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1df9807626..434946acfd 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -16069,7 +16069,8 @@ information.") (name "python2-packaging-bootstrap") (native-inputs '()) (propagated-inputs - `(("python-pyparsing" ,python2-pyparsing))) + `(("python-pyparsing" ,python2-pyparsing) + ("python-six" ,python2-six-bootstrap))) (arguments `(#:tests? #f ,@(package-arguments python2-packaging)))))) -- 2.26.2