Hi,
I've uploaded my first package (python-cloudscraper). I've filled a RFS (#1053332). I have some questions (some specific to debian-python organisation)
* Question 1: Git repo
I pushed the code to
https://salsa.debian.org/carlespina/python-cloudscraper/ . Should I,
instead, push it already to https://salsa.debian.org/python-team/packages/python-cloudscraper/ ?
That might be related to Question 2.
* Question 2: debian/control, Maintainers and Uploaders
I've read https://salsa.debian.org/python-team/tools/python-modules/-/blob/master/policy.rst#maintainership
and I think that my favourite, "long term" (does not need to be now),
would be:
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Uploader: Carles Pina i Estany <carles@pina.cat>
So far I've done:
Maintainer: Carles Pina i Estany <carles@pina.cat>
And no Uploader (will be the sponsor on the first time).
Is that correct?
* Question 3: allow failing tests from upstream in dh_auto_test
Upstream has 4 failing unit tests. Besides working with upstream to fix
them what I've done is, in debian/rules:
-----
override_dh_auto_test:
# Disable tests failing from upstream
pytest -k "not (test_bad_interpreter_js_challenge1_16_05_2020 or test_bad_solve_js_challenge1_16_05_2020 or test_Captcha_challenge_12_12_2019 or test_reCaptcha_providers)"
-----
The reason is that I don't want to disable or even ignore failing unit
tests in the salsa-ci pipeline. If there is a new one failing I'd like
to know. The override_dh_auto_test is my way of having "allowed to fail"
for a specific list. Is there any other, better / recommended / standard
way?
* Question 4
Any casual comments on the package would be welcomed (even in a
non-sponsor level). For sponsoring: the main reason of packaging this is
that it's an indirect dependency of "simplemonitor". Related bugs:
RFS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053134
ITP: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053134
ITP of simplemonitor: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016113
On 10/2/23 09:11, Carles Pina i Estany wrote:
Hi,
I've uploaded my first package (python-cloudscraper). I've filled a RFS (#1053332). I have some questions (some specific to debian-python organisation)
* Question 1: Git repo
I pushed the code to https://salsa.debian.org/carlespina/python-cloudscraper/ . Should I, instead, push it already to https://salsa.debian.org/python-team/packages/python-cloudscraper/ ?
Yes please.
That might be related to Question 2.
* Question 2: debian/control, Maintainers and Uploaders
I've read https://salsa.debian.org/python-team/tools/python-modules/-/blob/master/policy.rst#maintainership
and I think that my favourite, "long term" (does not need to be now),
would be:
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Uploader: Carles Pina i Estany <carles@pina.cat>
Yes. Note that not everyone in the team agree with the Python team policy of having the team as Uploader, some, including myself, think that if you don't want other people from the team to upload, you shouldn't push the package to the team at all. YMMV...
So far I've done:
Maintainer: Carles Pina i Estany <carles@pina.cat>
And no Uploader (will be the sponsor on the first time).
Is that correct?
It's probably preferable to directly put the team as Maintainer.
* Question 3: allow failing tests from upstream in dh_auto_test
Upstream has 4 failing unit tests. Besides working with upstream to fix them what I've done is, in debian/rules:
-----
override_dh_auto_test:
# Disable tests failing from upstream
pytest -k "not (test_bad_interpreter_js_challenge1_16_05_2020 or test_bad_solve_js_challenge1_16_05_2020 or test_Captcha_challenge_12_12_2019 or test_reCaptcha_providers)"
-----
The reason is that I don't want to disable or even ignore failing unit tests in the salsa-ci pipeline. If there is a new one failing I'd like
to know. The override_dh_auto_test is my way of having "allowed to fail" for a specific list. Is there any other, better / recommended / standard way?
That's very good, and that's exactly what you should do, indeed: have as
many tests running as possible, so that you avoid regression. I would also strongly suggest to use autopkgtest, to avoid that someone breaks your package when uploading some of your dependencies.
* Question 4
Any casual comments on the package would be welcomed (even in a
non-sponsor level). For sponsoring: the main reason of packaging this is that it's an indirect dependency of "simplemonitor". Related bugs:
RFS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053134
ITP: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053134
ITP of simplemonitor: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016113
Sorry, I wont have time for this right now, but if nobody does it, feel free to ping me in a week or 2.
I will create a new version of the package and upload it into mentors.debian.net when I finish this email. For reference: it will beNote that the usual practice is not bumping Debian versions for packages
the version 1.2.69-3.
In my first version (not published) I wrote a simple autopkgtest with an "import cloudscraper" (I know that this is not fully testing everythingYeah.
but at least something!). Then I realised that it's not needed...
without debian/tests it's just doing it:It says "each supported package type is tried against a set of heuristics, based on packages names, build dependencies. specific files under debian/,
https://salsa.debian.org/python-team/packages/python-cloudscraper/-/jobs/4762103#L180
"""
autopkgtest [22:24:36]: test autodep8-python3: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import cloudscraper; print(cloudscraper)" ; done
"""
I don't see this mentioned in "man autodep8":
On Mon, Oct 02, 2023 at 11:32:31PM +0100, Carles Pina i Estany wrote:
I will create a new version of the package and upload it into mentors.debian.net when I finish this email. For reference: it will beNote that the usual practice is not bumping Debian versions for packages
the version 1.2.69-3.
that were not uploaded yet and always uploading -1.
In my first version (not published) I wrote a simple autopkgtest with an "import cloudscraper" (I know that this is not fully testing everythingYeah.
but at least something!). Then I realised that it's not needed...
And you should try "Testsuite: autopkgtest-pkg-pybuild" instead, to run
upstream tests. Though I think it won't see your explicit `pytest -k` and
you should replace the override with a PYBUILD_TEST_ARGS var.
without debian/tests it's just doing it:
https://salsa.debian.org/python-team/packages/python-cloudscraper/-/jobs/4762103#L180
"""
autopkgtest [22:24:36]: test autodep8-python3: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import cloudscraper; print(cloudscraper)" ; done
"""
I don't see this mentioned in "man autodep8":It says "each supported package type is tried against a set of heuristics, based on packages names, build dependencies. specific files under debian/,
or a combination of those", or do you mean something else?
On 03 Oct 2023 at 12:25:27, Andrey Rakhmatullin wrote:
On Mon, Oct 02, 2023 at 11:32:31PM +0100, Carles Pina i Estany wrote:
I will create a new version of the package and upload it into mentors.debian.net when I finish this email. For reference: it will be the version 1.2.69-3.Note that the usual practice is not bumping Debian versions for packages that were not uploaded yet and always uploading -1.
Note taken, thanks! It will stay in -1 until uploaded. Makes it even
easier.
In my first version (not published) I wrote a simple autopkgtest with an "import cloudscraper" (I know that this is not fully testing everything but at least something!). Then I realised that it's not needed...Yeah.
And you should try "Testsuite: autopkgtest-pkg-pybuild" instead, to run
Ha! I didn't know of autopkgtest-pkg-pybuild. Thanks for this!
upstream tests. Though I think it won't see your explicit `pytest -k` and you should replace the override with a PYBUILD_TEST_ARGS var.
Done this way: https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43
When I added it, the automatic simple test from autodep8 (importing the module) stopped being added.
pytest, as run automatically when having "Testsuite: autopkgtest-pkg-pybuild": runs in the directory "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing "python3.11 -m pytest -k ...".
The contents of the directory via "ls -l" can be seen here: https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357)
Because there is the sub-directory /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper
: for what I can tell, pytest is running the tests with the code from /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper
and not the installed package in
/usr/lib/python3/dist-packages/cloudscraper/ . Generally speaking, I
prefer to use the installed code (as done via the basic "import").
Once, in a similar situation, some files were shipped but not installed
and the tests were running but not for the user.
So I still added this:
---
Test-Command: set -e ; cd "$AUTOPKGTEST_TMP" ; python3 -c "import cloudscraper"
Depends: python3-cloudscraper
Features: test-name=import-cloudscraper
---
(simplified from the the original code done by autodep8)
Now you don't need to override dh_auto_test, it should call pytest withupstream tests. Though I think it won't see your explicit `pytest -k` and you should replace the override with a PYBUILD_TEST_ARGS var.
Done this way: https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43
pytest, as run automatically when having "Testsuite: autopkgtest-pkg-pybuild": runs in the directory "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing "python3.11 -m pytest -k ...".This gives 404.
The contents of the directory via "ls -l" can be seen here: https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357)
Because there is the sub-directory /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraperIt shouldn't be there.
: for what I can tell, pytest is running the tests with the code from /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraperSure, autopkgtests need to use the installed code.
and not the installed package in
/usr/lib/python3/dist-packages/cloudscraper/ . Generally speaking, I
prefer to use the installed code (as done via the basic "import").
On Tue, Oct 03, 2023 at 11:52:58PM +0100, Carles Pina i Estany wrote:
upstream tests. Though I think it won't see your explicit `pytest -k` and you should replace the override with a PYBUILD_TEST_ARGS var.
Done this way: https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43Now you don't need to override dh_auto_test, it should call pytest with correct args automatically.
pytest, as run automatically when having "Testsuite: autopkgtest-pkg-pybuild": runs in the directory "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing "python3.11 -m pytest -k ...".
The contents of the directory via "ls -l" can be seen here: https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357)This gives 404.
Because there is the sub-directory /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraperIt shouldn't be there.
: for what I can tell, pytest is running the tests with the code from /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraper and not the installed package in /usr/lib/python3/dist-packages/cloudscraper/ . Generally speaking, ISure, autopkgtests need to use the installed code.
prefer to use the installed code (as done via the basic "import").
On Wed, Oct 04, 2023 at 07:58:11AM +0100, Carles Pina i Estany wrote:
Recap: pytest executed from "pybuild-autopkgtest", in the python-cloudscraper package, would use the src cloudscrapper instead of
the installed one.
So, to make sure that pytest uses the installed one, I added in debian/rules:
-----
before-pybuild-autopkgtest:
mv cloudscraper $(AUTOPKGTEST_TMP)
after-pybuild-autopkgtest:This looks very wrong, assuming it even runs.
mv $(AUTOPKGTEST_TMP) cloudscraper
On Tue, Oct 03, 2023 at 11:52:58PM +0100, Carles Pina i Estany wrote:
upstream tests. Though I think it won't see your explicit `pytest -k` and you should replace the override with a PYBUILD_TEST_ARGS var.
Done this way: https://salsa.debian.org/python-team/packages/python-cloudscraper/-/commit/78a83fbb0fe5fdfba78136921b919a11c8c9bc43Now you don't need to override dh_auto_test, it should call pytest with correct args automatically.
pytest, as run automatically when having "Testsuite: autopkgtest-pkg-pybuild": runs in the directory "/tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build" doing "python3.11 -m pytest -k ...".
The contents of the directory via "ls -l" can be seen here: https://salsa.debian.org/carlespina/python-cloudscraper/-/jobs/4766353#L357)This gives 404.
Because there is the sub-directory /tmp/autopkgtest-lxc.u3g8w1m_/downtmp/autopkgtest_tmp/build/cloudscraperIt shouldn't be there.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 350 |
Nodes: | 16 (2 / 14) |
Uptime: | 10:14:42 |
Calls: | 7,625 |
Files: | 12,793 |
Messages: | 5,686,534 |