[med-svn] [Git][med-team/patsy][master] 9 commits: routine-update: New upstream version (Closes: #1058302)

Lance Lin (@linqigang) gitlab at salsa.debian.org
Wed Dec 20 16:24:42 GMT 2023



Lance Lin pushed to branch master at Debian Med / patsy


Commits:
63c6192b by Lance Lin at 2023-12-20T23:16:01+07:00
routine-update: New upstream version (Closes: #1058302)

- - - - -
6bbf1a39 by Lance Lin at 2023-12-20T23:16:19+07:00
New upstream version 0.5.4
- - - - -
baaf4a55 by Lance Lin at 2023-12-20T23:16:50+07:00
routine-update: Standards-Version: 4.6.2

- - - - -
68d70f6c by Lance Lin at 2023-12-20T23:16:52+07:00
d/source/lintian-overrides: Remove, not needed

- - - - -
40c048ed by Lance Lin at 2023-12-20T23:16:52+07:00
Refresh patches and update descriptions

- - - - -
370e3096 by Lance Lin at 2023-12-20T23:16:53+07:00
d/rules: Clean png files in doc/savefig (Closes: #1047040)

- - - - -
ea88a7a9 by Lance Lin at 2023-12-20T23:16:53+07:00
d/control: Add Testsuite autopkgtest-pkg-pybuild

- - - - -
b7fc1f87 by Lance Lin at 2023-12-20T23:16:54+07:00
d/tests: Remove, upstream tests run by autopkgtest-pkg-pybuild

- - - - -
cef9c0e3 by Lance Lin at 2023-12-20T23:16:54+07:00
d/rules: Copy upstream tests to build directory for autopkgtest

- - - - -


18 changed files:

- + .github/workflows/publish.yml
- + .github/workflows/tox.yml
- debian/changelog
- debian/control
- debian/patches/Remove-external-image-links.patch
- debian/patches/fix-sphinx-conf.patch
- debian/patches/series
- debian/patches/up_six_PY
- debian/rules
- − debian/source/lintian-overrides
- − debian/tests/control
- − debian/tests/pytest-3
- doc/changes.rst
- patsy/parse_formula.py
- patsy/tokens.py
- patsy/version.py
- setup.py
- tox.ini


Changes:

=====================================
.github/workflows/publish.yml
=====================================
@@ -0,0 +1,27 @@
+name: Publish tagged releases to PyPI
+
+on:
+  push:
+    tags:
+      - "v*"
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout at v1
+    - name: Set up Python
+      uses: actions/setup-python at v1
+      with:
+        python-version: '3.7'
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install setuptools wheel twine
+    - name: Build and publish
+      env:
+        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+      run: |
+        python setup.py sdist bdist_wheel
+        twine upload dist/*


=====================================
.github/workflows/tox.yml
=====================================
@@ -0,0 +1,42 @@
+name: Run Tox Tests
+
+on:
+  push:
+    branches:
+      - "*"
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 4
+      matrix:
+        python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
+        pandas-presence: ['with_pandas', 'without_pandas']
+    env:
+      PYTHON_VERSION: ${{ matrix.python-version }}
+      PANDAS_PRESENCE: ${{ matrix.pandas-presence }}
+    steps:
+    - uses: actions/checkout at v2
+    - uses: gabrielfalcao/pyenv-action at v17
+      with:
+        default: "${{ matrix.python-version }}"
+    - name: Install Python ${{ matrix.python-version }}
+      run: |
+          pyenv install "${{ matrix.python-version }}"
+          pyenv local "${{ matrix.python-version }}"
+          pyenv versions
+    - name: Install dependencies
+      run: |
+        pip install -U pip
+        pip install tox tox-gh-actions
+    - name: Test with tox
+      run: |
+        PYTHON_ENV="py$(echo $PYTHON_VERSION | sed 's/\.//;s/\-dev//')"
+        tox -e "${PYTHON_ENV}-${PANDAS_PRESENCE}"
+    - name: Upload coverage to Codecov
+      uses: codecov/codecov-action at v1.0.10
+      with:
+        file: ./coverage.xml
+        flags: unittests
+        env_vars: PYTHON_VERSION,PANDAS_PRESENCE


=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+patsy (0.5.4-1) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * New upstream version (Closes: #1058302)
+  * Standards-Version: 4.6.2 (routine-update)
+  * d/source/lintian-overrides: Remove, not needed
+  * Refresh patches and update descriptions
+  * d/rules: Clean png files in doc/savefig (Closes: #1047040)
+  * d/control: Add Testsuite autopkgtest-pkg-pybuild
+  * d/tests: Remove, upstream tests run by autopkgtest-pkg-pybuild
+  * d/rules: Copy upstream tests to build directory for autopkgtest
+
+ -- Lance Lin <lq27267 at gmail.com>  Wed, 20 Dec 2023 20:32:17 +0700
+
 patsy (0.5.3-1) unstable; urgency=medium
 
   * New upstream version 0.5.3 (Closes: #1022048)


=====================================
debian/control
=====================================
@@ -17,7 +17,8 @@ Build-Depends: debhelper-compat (= 13),
                python3-matplotlib,
                python3-sphinx,
                ipython3,
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
+Testsuite: autopkgtest-pkg-pybuild
 Vcs-Browser: https://salsa.debian.org/med-team/patsy
 Vcs-Git: https://salsa.debian.org/med-team/patsy.git
 Homepage: https://github.com/pydata/patsy


=====================================
debian/patches/Remove-external-image-links.patch
=====================================
@@ -14,5 +14,5 @@ Last Changed: Sat, July 11, 2020
 -   :target: https://doi.org/10.5281/zenodo.592075
 +All Patsy releases are archived at Zenodo.
  
- v0.5.3
+ v0.5.4
  ------


=====================================
debian/patches/fix-sphinx-conf.patch
=====================================
@@ -1,3 +1,7 @@
+Author: Nilesh Patra <npatra974 at gmail.com>
+Description: Fix sphinx conf.py
+Last-Update: Sun Sep 26 20:56:19 2021 +0530
+
 --- a/doc/conf.py
 +++ b/doc/conf.py
 @@ -1,27 +1,27 @@


=====================================
debian/patches/series
=====================================
@@ -2,5 +2,4 @@ up_six_PY
 print3.patch
 Allow-warning-in-ipython.patch
 Remove-external-image-links.patch
-#use-collections.abc.patch
 fix-sphinx-conf.patch


=====================================
debian/patches/up_six_PY
=====================================
@@ -1,4 +1,7 @@
+Author: Yaroslav Halchenko, Nilesh Patra <npatra974 at gmail.com>
 Description: Up_six_PY
+Last-Update: Sun Sep 26 19:19:49 2021 +0530
+
 --- a/patsy/compat.py
 +++ b/patsy/compat.py
 @@ -48,3 +48,11 @@


=====================================
debian/rules
=====================================
@@ -23,6 +23,8 @@ EXCLUDE_TESTS3.3 :=
 IPYTHONVER := $(shell dpkg -l ipython | awk '/^ii/{print $$3;}' || echo 0)
 IPYTHONPATH=$(shell dpkg --compare-versions $(IPYTHONVER) lt 1.0 && echo ':/usr/share/pyshared/IPython1X/' || echo '')
 
+export PYBUILD_BEFORE_TEST = cp -r {dir}/patsy {build_dir}
+
 # Mega rule
 %:
 	: # Explicit build system to avoid use of all-in-1 Makefile
@@ -42,7 +44,7 @@ override_dh_auto_install: $(PY3VERS:%=python-install%)
 	: # nothing more to do
 
 override_dh_clean:
-	rm -rf build *.egg-info doc/_build
+	rm -rf doc/_build doc/savefig
 	dh_clean
 
 override_dh_installdocs:


=====================================
debian/source/lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# False Positives
-patsy source: source-is-missing doc/_static/show-code.js *
-source-contains-prebuilt-javascript-object doc/_static/show-code.js *


=====================================
debian/tests/control deleted
=====================================
@@ -1,2 +0,0 @@
-Tests: pytest-3
-Depends: @, python3-all, python3-pytest


=====================================
debian/tests/pytest-3 deleted
=====================================
@@ -1,32 +0,0 @@
-#!/bin/bash
-#
-# ADT test executioner for python-* packages.
-# Should be usable with any module which uses pytest-3 and packaged
-# as python-MODULENAME.  To use for Python3, just symlink as pytest-3
-#
-# Version: 1.1
-#
-set -efu
-
-test_exec="$0"
-test_name=$(basename "$test_exec")
-test_path=$(readlink -f $0 | xargs dirname)
-
-# which tester to use is defined by the name
-tester=${test_name%%[0-9]}
-# Figure out for which version of Python this test runner was intended
-py_series=$(echo $test_exec | sed -e 's,.*\([0-9]\)$,\1,g')
-# Construct optional PY suffix which is empty for good old python2
-[ $py_series = '2' ] && PY='' || PY=$py_series
-# Figure out what is the name of the module we are testing
-py_module=$(sed -ne "/^Package: python${PY}/s,.*python${PY}-\(.*\),\1,gp" $test_path/../control \
-            | grep -v -e '-\(doc\|dbg\|lib\)' | head -n 1)
-
-pys="$(eval py${PY}versions -rv 2>/dev/null)"
-
-cd "${AUTOPKGTEST_TMP}"
-cp -a /usr/lib/python${PY}/dist-packages/$py_module .
-for py in $pys; do
-	echo "=== python$py ==="
-    python$py /usr/bin/$tester$PY ${TESTER_ARGS:-} $py_module  2>&1
-done


=====================================
doc/changes.rst
=====================================
@@ -8,6 +8,11 @@ All Patsy releases are archived at Zenodo:
 .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.592075.svg
    :target: https://doi.org/10.5281/zenodo.592075
 
+v0.5.4
+------
+
+* Add support for Python 3.12, and fix broken unit tests in this version.
+
 v0.5.3
 ------
 


=====================================
patsy/parse_formula.py
=====================================
@@ -84,7 +84,7 @@ def _tokenize_formula(code, operator_strings):
     # "magic" token does:
     end_tokens = set(magic_token_types)
     end_tokens.remove("(")
-    
+
     it = PushbackAdapter(python_tokenize(code))
     for pytype, token_string, origin in it:
         if token_string in magic_token_types:
@@ -92,7 +92,7 @@ def _tokenize_formula(code, operator_strings):
         else:
             it.push_back((pytype, token_string, origin))
             yield _read_python_expr(it, end_tokens)
-                    
+
 def test__tokenize_formula():
     code = "y ~ a + (foo(b,c +   2)) + -1 + 0 + 10"
     tokens = list(_tokenize_formula(code, ["+", "-", "~"]))
@@ -274,8 +274,8 @@ def _parsing_error_test(parse_fn, error_descs): # pragma: no cover
         except PatsyError as e:
             print(e)
             assert e.origin.code == bad_code
-            assert e.origin.start == start
-            assert e.origin.end == end
+            assert e.origin.start in (0, start)
+            assert e.origin.end in (end, len(bad_code))
         else:
             assert False, "parser failed to report an error!"
 


=====================================
patsy/tokens.py
=====================================
@@ -31,11 +31,10 @@ def python_tokenize(code):
         for (pytype, string, (_, start), (_, end), code) in it:
             if pytype == tokenize.ENDMARKER:
                 break
-            origin = Origin(code, start, end)
-            assert pytype != tokenize.NL
-            if pytype == tokenize.NEWLINE:
+            if pytype in (tokenize.NL, tokenize.NEWLINE):
                 assert string == ""
                 continue
+            origin = Origin(code, start, end)
             if pytype == tokenize.ERRORTOKEN:
                 raise PatsyError("error tokenizing input "
                                  "(maybe an unclosed string?)",
@@ -53,8 +52,14 @@ def python_tokenize(code):
         # end of the source text. We have our own error handling for
         # such cases, so just treat this as an end-of-stream.
         #
+        if "unterminated string literal" in e.args[0]:
+            raise PatsyError(
+                "error tokenizing input ({})".format(e.args[0]),
+                Origin(code, 0, len(code)),
+            )
+
         # Just in case someone adds some other error case:
-        assert e.args[0].startswith("EOF in multi-line")
+        assert "EOF in multi-line" in e.args[0]
         return
 
 def test_python_tokenize():


=====================================
patsy/version.py
=====================================
@@ -17,4 +17,4 @@
 # want. (Contrast with the special suffix 1.0.0.dev, which sorts *before*
 # 1.0.0.)
 
-__version__ = "0.5.3"
+__version__ = "0.5.4"


=====================================
setup.py
=====================================
@@ -46,6 +46,7 @@ setup(
       "Programming Language :: Python :: 3.9",
       "Programming Language :: Python :: 3.10",
       "Programming Language :: Python :: 3.11",
+      "Programming Language :: Python :: 3.12",
       "Topic :: Scientific/Engineering",
     ],
 )


=====================================
tox.ini
=====================================
@@ -1,5 +1,5 @@
 [tox]
-envlist = {py27,py36,py37,py38,py39,py310,py311}-{with_pandas,without_pandas}
+envlist = {py27,py36,py37,py38,py39,py310,py311,py312}-{with_pandas,without_pandas}
 
 [gh-actions]
 python =
@@ -10,6 +10,7 @@ python =
   3.9: py39
   3.10: py310
   3.11: py311
+  3.12: py312
 
 [testenv]
 deps=
@@ -25,6 +26,8 @@ setenv=
   OMP_NUM_THREADS=1
   MKL_NUM_THREADS=1
   VML_NUM_THREADS=1
+allowlist_externals=
+  env
 commands=
   pytest -vv --cov=patsy --cov-config={toxinidir}/.coveragerc --cov-report=term-missing --cov-report=xml --cov-report=html:{toxworkdir}/coverage/{envname} {posargs:}
   env PATSY_AVOID_OPTIONAL_DEPENDENCIES=1 pytest -vv --cov=patsy --cov-config={toxinidir}/.coveragerc --cov-report=term-missing --cov-report=xml --cov-report=html:{toxworkdir}/coverage/{envname} {posargs:}



View it on GitLab: https://salsa.debian.org/med-team/patsy/-/compare/a04399fa6b6477ed3808dab284db4d4b8567a590...cef9c0e3a1dd3cac1d43a2600df979ff9ba88d31

-- 
View it on GitLab: https://salsa.debian.org/med-team/patsy/-/compare/a04399fa6b6477ed3808dab284db4d4b8567a590...cef9c0e3a1dd3cac1d43a2600df979ff9ba88d31
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/20231220/1ef218f2/attachment-0001.htm>


More information about the debian-med-commit mailing list