Re: Making py2dsp/pypi2deb the default tool to create Python-based packages in Debian

2022-07-25 Thread Andreas Tille
Am Mon, Jul 25, 2022 at 10:09:05AM +0200 schrieb Andreas Tille:
> I was able to run
> 
>   py2dsp pystow
> 
> with a sufficient result for my purposes...

While I've read here the suggestion to fetch the Tarball rather vom Github than
from pypi (and I agree with this) I would suggest to implement this suggestion
in what is planed to become a default tool.  With the command above the watch
file points to pypi and thus I tried:

$ py2dsp --github pystow
/usr/bin/py2dsp:163: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
E: py2dsp py2dsp:167: 404 {"message": "Not Found", "documentation_url": 
"https://docs.github.com/rest"}


Since the original thread started with opinions to make the tool the default
tool I'd suggest waiting a bit until it

   a) does not throw DeprecationWarnings
   b) works out of the box for simple usage

IMHO the suggestions where it should be advertised are perfectly fine
but its a bit bad timing when people stumble over it and run into
trouble at first usage.

Thanks for working on such a promising tools anyway

  Andreas.

-- 
http://fam-tille.de



Re: Making py2dsp/pypi2deb the default tool to create Python-based packages in Debian

2022-07-25 Thread Andreas Tille
Hi Sandro,

I was able to run

  py2dsp pystow

with a sufficient result for my purposes with the following patch:

diff --git a/pypi2deb/pypi.py b/pypi2deb/pypi.py
index 3e342c0..0639de3 100644
--- a/pypi2deb/pypi.py
+++ b/pypi2deb/pypi.py
@@ -38,8 +38,8 @@ log = logging.getLogger('pypi2deb')
 @asyncio.coroutine
 def get_pypi_info(name, version=None):
 url = PYPI_JSON_URL + '/' + name
-if version:
-url += '/' + version
+#   if version:
+#   url += '/' + version
 url += '/json'
 session = None
 try:

Since I do not really understand pypi2deb and what role version might have I do
not step further (MR or so) from this point but leave it to you to decide 
whether
this is useful or not.

Kind regards

Andreas.

-- 
http://fam-tille.de



pybuild-autopkgtest (was: Notes from the DC22 Python Team BoF)

2022-07-25 Thread Julian Gilbey
On Sat, Jul 23, 2022 at 07:52:19PM +0200, Louis-Philippe VĂ©ronneau wrote:
> == pybuild improvements ==
> 
> getting the autopkgtest MR in would be great
> 
> https://salsa.debian.org/python-team/tools/dh-python/-/merge_requests/27
> 
> We need people to test this MR some more, although it seems fairly mature.
> 
> It might be a good idea to have a line in d/control to let us migrate from
> the existing autopkgtests running unit tests to the new automated MR.

I've been looking at this a bit more.  I'm not sure what this last
paragraph means: the new "automated" autopkgtest will only be run if
the maintainer explicitly adds:

Testsuite: autopkgtest-pkg-pybuild

to debian/control (see the autodep8 MR at
https://salsa.debian.org/ci-team/autodep8/-/merge_requests/27/diffs -
it will never automatically detect a pybuild package).
And a maintainer would presumably only add that if they are also
removing their existing debian/tests/control (or want to run the
pybuild tests in addition).

An alternative would be for the autodep8 patch to try to determine
whether to run pybuild-autopkgtest.  One approach could be:

if the package would run autopkgtest-pkg-python:
  if debian/control does not contain an override_dh_auto_test stanza:
run pybuild-autopkgtest

Note, though, that if autodep8 is called, it will run all of the
detected tests.  (At least that is what I believe happens from reading
/usr/bin/autodep8; I haven't double-checked this.)  So, for example,
if a package specifies

Testsuite: autopkgtest-pkg-python

it will also run the autopkgtest-pkg-pybuild suite as it will be
detected as being a Python package, and vice versa.  That is a
possible reason *not* to use the above suggestion, as it would
potentially run pybuild-autopkgtest even if not desired.

Best wishes,

   Julian



Re: Notes from the DC22 Python Team BoF

2022-07-25 Thread Julian Gilbey
On Sat, Jul 23, 2022 at 07:52:19PM +0200, Louis-Philippe VĂ©ronneau wrote:
> Hey folks,
> 
> We had a Python Team BoF at DC22 earlier today and I thought relaying the
> notes we took in gobby here would be a good idea.

Thanks for the notes, Louis-Philippe, and sorry I couldn't join you!

A few comments

> --
> == python3.11 ==
> 
> python3.11 release has been delayed, from october 2022 to december 2022.
> [...]

My 2 cents' worth is as the 3.9->3.10 transition took several months,
and was quite complicated, it is not wise to attempt the 3.10->3.11
before the freeze.  We could then potentially go straight to 3.12 a
few months after the bookworm freeze rather than going to 3.11 first.
And that will probably be quite painful.

> == pybuild improvements ==
> 
> getting the autopkgtest MR in would be great
> 
> https://salsa.debian.org/python-team/tools/dh-python/-/merge_requests/27
> 
> We need people to test this MR some more, although it seems fairly mature.
> 
> It might be a good idea to have a line in d/control to let us migrate from
> the existing autopkgtests running unit tests to the new automated MR.

I'll take this to a separate email.

> == lintian tags requests for the team ==
> 
> pollo will write you Python-related lintian tags. Ask him to.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004746  :-)

   Julian