diff mbox series

[bug#45712,PATCHES] Improve Python package quality

Message ID X/1tw1fRLS6JYVwu@noor.fritz.box
State Accepted
Headers show
Series [bug#45712,PATCHES] Improve Python package quality | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Lars-Dominik Braun Jan. 12, 2021, 9:37 a.m. UTC
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
diff mbox series

Patch

From 55aab0eba972c6672be9d8de5e0ec9340b10c243 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
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