[med-svn] [Git][med-team/python-etelemetry][master] 9 commits: routine-update: New upstream version

Lance Lin (@linqigang) gitlab at salsa.debian.org
Thu Nov 16 16:50:57 GMT 2023



Lance Lin pushed to branch master at Debian Med / python-etelemetry


Commits:
86184fce by Lance Lin at 2023-11-16T20:27:43+07:00
routine-update: New upstream version

- - - - -
391f0295 by Lance Lin at 2023-11-16T20:27:57+07:00
New upstream version 0.3.1
- - - - -
3883e41f by Lance Lin at 2023-11-16T20:27:57+07:00
Update upstream source from tag 'upstream/0.3.1'

Update to upstream version '0.3.1'
with Debian dir f41b1dc391a0a3a531bb1206aedec449af4a6164
- - - - -
78819368 by Lance Lin at 2023-11-16T20:27:57+07:00
routine-update: Standards-Version: 4.6.2

- - - - -
1fc53bf0 by Lance Lin at 2023-11-16T20:28:02+07:00
routine-update: Build-Depends: s/dh-python/dh-sequence-python3/

- - - - -
271a6e16 by Lance Lin at 2023-11-16T20:47:30+07:00
d/patches: Removed, upstream applied pytest skips for no connection

- - - - -
34b546ef by Lance Lin at 2023-11-16T23:33:48+07:00
d/rules: Remove override to enable build tests and add conditional for pybuild-autopkgtest

- - - - -
8a47b3b8 by Lance Lin at 2023-11-16T23:34:07+07:00
d/control: Remove comments for Build-Depends for testing and replace testsuite for autopkgtest-pkg-pybuild

- - - - -
e4cf05c4 by Lance Lin at 2023-11-16T23:48:45+07:00
d/tests: Test supported python versions

- - - - -


11 changed files:

- .github/workflows/pythonpackage.yml
- debian/changelog
- debian/control
- − debian/patches/series
- − debian/patches/skip_online_tests.patch
- debian/rules
- debian/tests/run-unit-test
- etelemetry/_version.py
- etelemetry/client.py
- etelemetry/tests/test_client.py
- setup.cfg


Changes:

=====================================
.github/workflows/pythonpackage.yml
=====================================
@@ -14,6 +14,7 @@ jobs:
 
     runs-on: ${{ matrix.os }}
     strategy:
+      fail-fast: false
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
         python-version: [3.7, 3.8, 3.9, "3.10"]
@@ -31,10 +32,10 @@ jobs:
     - name: Test with pytest
       run: |
         pytest -vs --cov ./ --cov-config .coveragerc --cov-report xml:cov.xml --doctest-modules etelemetry
-    - uses: codecov/codecov-action at v1
+    - uses: codecov/codecov-action at v3
       with:
         token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
         file: ./cov.xml # optional
         flags: unittests # optional
         name: codecov-et # optional
-        fail_ci_if_error: true # optional (default = false)
\ No newline at end of file
+        fail_ci_if_error: false


=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+python-etelemetry (0.3.1-1) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * New upstream version
+  * Standards-Version: 4.6.2 (routine-update)
+  * Build-Depends: s/dh-python/dh-sequence-python3/ (routine-update)
+  * d/patches: Removed, upstream applied pytest skips for no connection
+  * d/rules: Remove override to enable build tests and add conditional for
+    pybuild-autopkgtest
+  * d/control: Remove comments for Build-Depends for testing and replace
+    testsuite for autopkgtest-pkg-pybuild
+  * d/tests: Test supported python versions
+
+ -- Lance Lin <lq27267 at gmail.com>  Thu, 16 Nov 2023 20:27:43 +0700
+
 python-etelemetry (0.3.0-3) unstable; urgency=medium
 
   * Fix watch file


=====================================
debian/control
=====================================
@@ -5,18 +5,18 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>,
   Yaroslav Halchenko <debian at onerussian.com>,
 Build-Depends: debhelper-compat (= 13),
-               dh-python,
+               dh-sequence-python3,
                python3-all,
                python3-setuptools,
                python3-ci-info,
-#               python3-requests <!nocheck>,
-#               python3-pytest <!nocheck>
-Standards-Version: 4.6.1
+               python3-requests <!nocheck>,
+               python3-pytest <!nocheck>
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/python-etelemetry
 Vcs-Git: https://salsa.debian.org/med-team/python-etelemetry.git
 Homepage: https://github.com/sensein/etelemetry-client/
 Rules-Requires-Root: no
-Testsuite: autopkgtest-pkg-python
+Testsuite: autopkgtest-pkg-pybuild
 
 Package: python3-etelemetry
 Architecture: all


=====================================
debian/patches/series deleted
=====================================
@@ -1 +0,0 @@
-skip_online_tests.patch


=====================================
debian/patches/skip_online_tests.patch deleted
=====================================
@@ -1,23 +0,0 @@
-Description: Skip two tests accessing network
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 29 Sep 2020 09:46:21 +0200
-
---- a/etelemetry/tests/test_client.py
-+++ b/etelemetry/tests/test_client.py
-@@ -15,7 +15,7 @@
-         _etrequest(endpoint, timeout=0.001)
-     assert _etrequest(endpoint)
- 
--
-+ at pytest.mark.skip(reason='Tries to download something')
- def test_get_project():
-     repo = "invalidrepo"
-     with pytest.raises(ValueError):
-@@ -40,6 +40,7 @@
-         os.environ["NO_ET"] = old_var[1]
- 
- 
-+ at pytest.mark.skip(reason='Tries to download something')
- def test_check_available():
-     repo = "invalidrepo"
-     res = check_available_version(repo, "0.1.0")


=====================================
debian/rules
=====================================
@@ -3,6 +3,10 @@
 export PYBUILD_NAME=etelemetry
 export PYBUILD_TEST_PYTEST = 1
 
+ifeq ($(PYBUILD_AUTOPKGTEST),1)
+export PYBUILD_TEST_ARGS_python3=-v {dir}/etelemetry/tests/
+endif
+
 # Should redirect remote access but does not help either
 # export https_proxy=http://127.0.0.1:9/
 
@@ -13,9 +17,4 @@ export LC_ALL=C.UTF-8
 # export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
-	dh $@ --with python3 --buildsystem=pybuild
-
-override_dh_auto_test:
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	echo "All tests trying to access a remote server so the tests are skipped."
-endif
+	dh $@ --buildsystem=pybuild


=====================================
debian/tests/run-unit-test
=====================================
@@ -2,7 +2,7 @@
 
 set -e
 
-for py in $(py3versions -r 2> /dev/null)
+for py in $(py3versions -s)
 do
     pushd etelemetry/tests
     echo "Testing with $py in $(pwd):"


=====================================
etelemetry/_version.py
=====================================
@@ -24,9 +24,9 @@ def get_keywords():
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (HEAD -> master, tag: v0.3.0)"
-    git_full = "546f6ad780c09de0e3258b07085c223883bdb6ac"
-    git_date = "2022-01-12 14:52:55 -0500"
+    git_refnames = " (tag: v0.3.1)"
+    git_full = "5bdab69f63d7bc643f6e6c73d5eb78eaf2d6a21d"
+    git_date = "2023-10-13 11:10:57 -0400"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 


=====================================
etelemetry/client.py
=====================================
@@ -1,4 +1,5 @@
 import os
+from packaging.version import Version
 
 try:
     import ci_info
@@ -92,8 +93,6 @@ def check_available_version(project, version, lgr=None, raise_exception=False):
         import logging
         lgr = logging.getLogger('et-client')
 
-    from pkg_resources import parse_version
-
     latest = {"version": "Unknown", "bad_versions": []}
     ret = None
     try:
@@ -104,8 +103,8 @@ def check_available_version(project, version, lgr=None, raise_exception=False):
     finally:
         if ret:
             latest.update(**ret)
-            local_version = parse_version(version)
-            remote_version = parse_version(latest["version"])
+            local_version = Version(version)
+            remote_version = Version(latest["version"])
             if local_version < remote_version:
                 lgr.warning("A newer version (%s) of %s is available. You are "
                             "using %s", latest["version"], project, version)
@@ -118,7 +117,7 @@ def check_available_version(project, version, lgr=None, raise_exception=False):
                           version, project)
             if latest["bad_versions"] and any(
                     [
-                        local_version == parse_version(ver)
+                        local_version == Version(ver)
                         for ver in latest["bad_versions"]
                     ]
             ):


=====================================
etelemetry/tests/test_client.py
=====================================
@@ -4,6 +4,20 @@ from ..config import ET_ROOT
 from ..client import _etrequest, get_project, check_available_version
 
 
+def check_cxn(scope="session"):
+    import requests
+
+    try:
+        requests.get("http://example.com")
+        return True
+    except Exception:
+        return False
+
+
+no_cxn = check_cxn() is False
+
+
+ at pytest.mark.skipif(no_cxn, reason="No connection")
 def test_etrequest():
     endpoint = "http://fakeendpoint/"
     with pytest.raises(RuntimeError):
@@ -16,6 +30,7 @@ def test_etrequest():
     assert _etrequest(endpoint)
 
 
+ at pytest.mark.skipif(no_cxn, reason="No connection")
 def test_get_project():
     repo = "invalidrepo"
     with pytest.raises(ValueError):
@@ -27,8 +42,9 @@ def test_get_project():
 
 def test_noet():
     import os
+
     old_var = None
-    if 'NO_ET' in os.environ:
+    if "NO_ET" in os.environ:
         old_var = (True, os.environ["NO_ET"])
     os.environ["NO_ET"] = "1"
     repo = "github/hub"
@@ -40,6 +56,7 @@ def test_noet():
         os.environ["NO_ET"] = old_var[1]
 
 
+ at pytest.mark.skipif(no_cxn, reason="No connection")
 def test_check_available():
     repo = "invalidrepo"
     res = check_available_version(repo, "0.1.0")


=====================================
setup.cfg
=====================================
@@ -21,6 +21,7 @@ classifiers =
 [options]
 python_requires = >= 3.7
 install_requires =
+    packaging
     requests
     ci-info >= 0.2
 test_requires =



View it on GitLab: https://salsa.debian.org/med-team/python-etelemetry/-/compare/d4c0e825a5f34a12b6ce4cc04486bcf8189b4667...e4cf05c409e0c698758dbcdad7de818c3f70b7c5

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-etelemetry/-/compare/d4c0e825a5f34a12b6ce4cc04486bcf8189b4667...e4cf05c409e0c698758dbcdad7de818c3f70b7c5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231116/eb9b97ef/attachment-0001.htm>


More information about the debian-med-commit mailing list