Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-nbxmpp for openSUSE:Factory checked in at 2023-01-24 19:43:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-nbxmpp (Old) and /work/SRC/openSUSE:Factory/.python-nbxmpp.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nbxmpp" Tue Jan 24 19:43:32 2023 rev:39 rq:1060578 version:4.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-nbxmpp/python-nbxmpp.changes 2023-01-16 18:01:29.131685673 +0100 +++ /work/SRC/openSUSE:Factory/.python-nbxmpp.new.32243/python-nbxmpp.changes 2023-01-24 20:32:19.540372981 +0100 @@ -1,0 +2,7 @@ +Mon Jan 23 23:28:52 UTC 2023 - Alexei Sorokin <sor.ale...@meowr.ru> + +- Update to version 4.1.0: + * Port package to pyproject.toml. + * Handle race condition when cancelling request. + +------------------------------------------------------------------- Old: ---- python-nbxmpp-4.0.1.tar.bz2 New: ---- python-nbxmpp-4.1.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-nbxmpp.spec ++++++ --- /var/tmp/diff_new_pack.m23wNJ/_old 2023-01-24 20:32:20.004375437 +0100 +++ /var/tmp/diff_new_pack.m23wNJ/_new 2023-01-24 20:32:20.008375458 +0100 @@ -24,22 +24,24 @@ %endif %define _name nbxmpp Name: python-nbxmpp -Version: 4.0.1 +Version: 4.1.0 Release: 0 Summary: XMPP library by Gajim team License: GPL-3.0-or-later Group: Development/Languages/Python URL: https://dev.gajim.org/gajim/python-nbxmpp Source: %{url}/-/archive/%{version}/python-nbxmpp-%{version}.tar.bz2 -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module setuptools >= 65.0} BuildRequires: fdupes BuildRequires: python-rpm-generators >= 20200714 BuildRequires: python-rpm-macros >= 20200714 # For testing -BuildRequires: %{python_module gobject-Gdk} +BuildRequires: %{python_module gobject-Gdk >= 3.42} BuildRequires: %{python_module idna} BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pip} BuildRequires: %{python_module precis-i18n} +BuildRequires: %{python_module wheel} BuildRequires: typelib(Soup) = 3.0 Recommends: python-gssapi BuildArch: noarch @@ -57,10 +59,10 @@ %setup -q %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib}/ %check ++++++ python-nbxmpp-4.0.1.tar.bz2 -> python-nbxmpp-4.1.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/.ci/debian_build.py new/python-nbxmpp-4.1.0/.ci/debian_build.py --- old/python-nbxmpp-4.0.1/.ci/debian_build.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/.ci/debian_build.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,105 +0,0 @@ -#!/usr/bin/env python3 - -from __future__ import annotations - -import argparse -import dataclasses -import logging -import shutil -import subprocess -from datetime import datetime -from datetime import timezone -from pathlib import Path - -LOG_FORMAT = '%(asctime)s %(levelname)s %(message)s' -logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG) -log = logging.getLogger() - -ROOT_DIR = Path(__file__).resolve().parent.parent -BUILD_DIR = ROOT_DIR / 'debian_build' - -DATE = datetime.now().strftime('%Y%m%d') -DATE_TIME = datetime.now(tz=timezone.utc).strftime('%a, %d %b %Y %T %z') - - -@dataclasses.dataclass -class ReleaseContext: - app: str - pkg_name: str - rev: str - release_name: str - release_dir: Path - tarball: Path - - @classmethod - def from_tarball(cls, path: str, prefix: str, rev: str) -> ReleaseContext: - tarball = Path(path) - app = tarball.name.split('-', maxsplit=1)[0] - pkg_name = f'{prefix}{app}-nightly' - release_name = f'{pkg_name}_{DATE}' - release_dir = BUILD_DIR / release_name - return cls(app=app, - pkg_name=pkg_name, - rev=rev, - release_name=release_name, - release_dir=release_dir, - tarball=tarball) - - -def clean_build_dir() -> None: - log.info('Cleanup build directory') - if BUILD_DIR.exists(): - shutil.rmtree(BUILD_DIR) - BUILD_DIR.mkdir() - - -def prepare_package_dir(context: ReleaseContext) -> None: - log.info('Extract tarball') - tarball = Path(shutil.copy(context.tarball, BUILD_DIR)) - tarball = tarball.rename(BUILD_DIR / f'{context.release_name}.orig.tar.gz') - shutil.unpack_archive(tarball, BUILD_DIR) - - log.info('Rename dir to: %s', context.release_name) - folder = list(BUILD_DIR.glob(f'{context.app}-?.?.?'))[0] - folder = folder.rename(context.release_dir) - - log.info('Copy debian folder into release directory') - shutil.copytree(ROOT_DIR / 'debian', context.release_dir / 'debian') - - -def prepare_changelog(context: ReleaseContext) -> None: - log.info('Prepare Changelog') - changelog = context.release_dir / 'debian' / 'changelog' - content = changelog.read_text() - content = content.replace('{DATE}', f'{DATE}-{context.rev}') - content = content.replace('{DATE_TIME}', DATE_TIME) - changelog.write_text(content) - - -def build(context: ReleaseContext) -> None: - log.info('Start package build') - subprocess.run( - [ - 'dpkg-buildpackage', - '--no-sign' - ], - cwd=context.release_dir, - check=True) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Build debian package') - parser.add_argument('tarball', help='Path to tarball e.g. app.tar.gz') - parser.add_argument('rev', help='The package revision e.g. 1') - parser.add_argument('--pkgprefix', default='', required=False, - help='Prefix for the package name e.g. python3-') - args = parser.parse_args() - - context = ReleaseContext.from_tarball(args.tarball, - args.pkgprefix, - args.rev) - - clean_build_dir() - prepare_package_dir(context) - prepare_changelog(context) - build(context) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/.ci/deploy.py new/python-nbxmpp-4.1.0/.ci/deploy.py --- old/python-nbxmpp-4.0.1/.ci/deploy.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/.ci/deploy.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import subprocess -from pathlib import Path - - -REPO_DIR = Path(__file__).parent.parent -USERNAME = '__token__' -PASSWORD = os.environ['PYPI_TOKEN'] - - -def build() -> None: - cmd = [ - 'python3', - 'setup.py', - 'sdist', - 'bdist_wheel' - ] - - try: - subprocess.run(cmd, cwd=REPO_DIR, check=True) - except subprocess.CalledProcessError: - sys.exit('build failed') - - -def upload() -> None: - cmd = [ - 'twine', - 'upload', - '--username', USERNAME, - '--password', PASSWORD, - 'dist/*' - ] - - try: - subprocess.run(cmd, cwd=REPO_DIR, check=True) - except subprocess.CalledProcessError: - sys.exit('upload failed') - - -if __name__ == '__main__': - # build() - upload() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/.gitlab-ci.yml new/python-nbxmpp-4.1.0/.gitlab-ci.yml --- old/python-nbxmpp-4.0.1/.gitlab-ci.yml 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/.gitlab-ci.yml 2023-01-24 00:06:26.000000000 +0100 @@ -20,12 +20,14 @@ coverage_format: cobertura path: coverage.xml -build-linux: +build-unix: stage: build dependencies: [] script: - - python3 setup.py sdist bdist_wheel - - python3 .ci/debian_build.py "$(find dist/nbxmpp-*.tar.gz)" 1 --pkgprefix=python3- + - pip install git+https://dev.gajim.org/gajim/release-helper.git + - pip install build + - python3 -m build + - release-helper build-debian-pkg "$(find dist/nbxmpp-*.tar.gz)" 1 --pkgprefix=python3 --pkgsuffix=nightly artifacts: name: "nbxmpp-$CI_COMMIT_SHA" @@ -33,12 +35,30 @@ paths: - dist/nbxmpp-*.tar.gz - dist/nbxmpp-*.whl + - debian_build/* deploy-pypi: + image: nbxmpp-deploy:latest stage: deploy dependencies: - - "build-linux" + - "build-unix" rules: - if: '$CI_COMMIT_TAG' script: - - python3 .ci/deploy.py + - twine upload --username=__token__ --password=$PYPI_TOKEN dist/* + +deploy-debian-nightly: + image: nbxmpp-deploy:latest + stage: deploy + dependencies: + - build-unix + rules: + - if: '$NIGHTLY_BUILD' + script: + - > + release-helper deploy-to-ftp \ + --host=$FTP_HOST \ + --user=$FTP_USER \ + --password=$FTP_PASS \ + --directory=debian/nbxmpp/"$(date +'%Y%m%d')" \ + debian_build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/ChangeLog new/python-nbxmpp-4.1.0/ChangeLog --- old/python-nbxmpp-4.0.1/ChangeLog 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/ChangeLog 2023-01-24 00:06:26.000000000 +0100 @@ -1,3 +1,13 @@ +nbxmpp 4.1.0 (24 Jan 2023) + + Change + + * Port package to pyproject.toml + + Bug Fixes + + * Handle race condition when cancelling request (#136) + nbxmpp 4.0.1 (10 Jan 2023) Bug Fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/debian/control new/python-nbxmpp-4.1.0/debian/control --- old/python-nbxmpp-4.0.1/debian/control 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/debian/control 2023-01-24 00:06:26.000000000 +0100 @@ -1,18 +1,17 @@ Source: python3-nbxmpp-nightly -Section: net +Section: python Priority: optional Maintainer: Gajim Maintainers <c...@gajim.org> Build-Depends: debhelper-compat (= 13), dh-python, - libglib2.0-0 (>= 2.60), gir1.2-soup-3.0, python3-all, python3-gi, python3-idna, python3-packaging, python3-precis-i18n, - python3-setuptools, + python3-setuptools (>= 65.0.0), Standards-Version: 4.1.4 Rules-Requires-Root: no Homepage: https://dev.gajim.org/gajim/python-nbxmpp @@ -23,14 +22,11 @@ Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, - libglib2.0-0 (>= 2.60), gir1.2-soup-3.0, python3-gi, - python3-idna, - python3-packaging, - python3-precis-i18n, Recommends: python3-gssapi, -Breaks: gajim (<< 1.4~) +Breaks: gajim (<< 1.6~) +Conflicts: python3-nbxmpp Description: Non blocking XMPP Python library python-nbxmpp is a Python library that provides a way for Python applications - to use the XMPP network. This library was initially a fork of xmpppy. \ No newline at end of file + to use the XMPP network. This library was initially a fork of xmpppy. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/nbxmpp/__init__.py new/python-nbxmpp-4.1.0/nbxmpp/__init__.py --- old/python-nbxmpp-4.0.1/nbxmpp/__init__.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/nbxmpp/__init__.py 2023-01-24 00:06:26.000000000 +0100 @@ -3,4 +3,4 @@ from .protocol import * # pylint: disable=wrong-import-position -__version__: str = '4.0.1' +__version__: str = '4.1.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/nbxmpp/http.py new/python-nbxmpp-4.1.0/nbxmpp/http.py --- old/python-nbxmpp-4.0.1/nbxmpp/http.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/nbxmpp/http.py 2023-01-24 00:06:26.000000000 +0100 @@ -449,6 +449,17 @@ self._set_failed(HTTPRequestError.STATUS_NOT_OK) return + self._log.info('Request status: %s', Soup.Status.get_phrase(status)) + + if self._cancellable.is_cancelled(): + # It can happen that the message is finished before the + # response callback returns after calling cancel(). If + # we call complete, the response callback will also + # try to cleanup and will fail. + self._log.info('Skip setting message complete because ' + 'cancel is in progess') + return + self._set_complete() def _set_failed(self, error: HTTPRequestError) -> None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/pyproject.toml new/python-nbxmpp-4.1.0/pyproject.toml --- old/python-nbxmpp-4.0.1/pyproject.toml 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/pyproject.toml 2023-01-24 00:06:26.000000000 +0100 @@ -1,9 +1,44 @@ [build-system] -requires = [ - "setuptools >= 43.0.0", -] +requires = ["setuptools >= 65.0.0"] build-backend = "setuptools.build_meta" +[project] +name = "nbxmpp" +description = "XMPP Library" +keywords = ["chat", "messaging", "im", "xmpp"] +readme = "README.md" +requires-python = ">=3.10" +license = {text = "GPL-3.0-or-later"} +authors = [ + {name = "Philipp Hörist", email = "phil...@hoerist.com"}, + {name = "Yann Leboulanger", email = "y...@leboulanger.org"}, +] +classifiers = [ + "Programming Language :: Python :: 3.10", +] +dependencies = [ + "precis-i18n>=1.0.0", + "packaging", + "idna", + "PyGObject", +] + +dynamic = ["version"] + +[project.optional-dependencies] +gssapi = ["gssapi"] + +[project.urls] +repository = "https://dev.gajim.org/gajim/python-nbxmpp" + +[tool.setuptools.packages.find] +include = ["nbxmpp*"] + +[tool.setuptools.package-data] +"nbxmpp" = ["py.typed"] + +[tool.setuptools.dynamic] +version = {attr = "nbxmpp.__version__"} [tool.pyright] pythonVersion = "3.10" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/scripts/bump_version.py new/python-nbxmpp-4.1.0/scripts/bump_version.py --- old/python-nbxmpp-4.0.1/scripts/bump_version.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/scripts/bump_version.py 2023-01-24 00:06:26.000000000 +0100 @@ -9,7 +9,6 @@ INIT = REPO_DIR / 'nbxmpp' / '__init__.py' -CFG = REPO_DIR / 'setup.cfg' CHANGELOG = REPO_DIR / 'ChangeLog' VERSION_RX = r'\d+\.\d+\.\d+' @@ -28,10 +27,6 @@ content = content.replace(current_version, new_version, 1) INIT.write_text(content, encoding='utf8') - content = CFG.read_text(encoding='utf8') - content = content.replace(current_version, new_version, 1) - CFG.write_text(content, encoding='utf8') - def make_changelog(new_version: str) -> None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/setup.cfg new/python-nbxmpp-4.1.0/setup.cfg --- old/python-nbxmpp-4.0.1/setup.cfg 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/setup.cfg 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -[metadata] -name = nbxmpp -version = 4.0.1 -description = XMPP Library -author = Yann Leboulanger, Philipp Hoerist -author_email = gajim-de...@gajim.org -long_description = file: README.md -long_description_content_type = text/markdown -keywords = xmpp chat -url = https://dev.gajim.org/gajim/python-nbxmpp -license_file = COPYING -license = GPL v3 -classifiers = - Programming Language :: Python :: 3.10 - -[options] -python_requires = >=3.10 -packages = find: -install_requires = - precis-i18n>=1.0.0 - packaging - idna - -[options.extras_require] -gssapi = gssapi - -[options.packages.find] -exclude = - test* - -[options.package_data] -nbxmpp = py.typed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-4.0.1/setup.py new/python-nbxmpp-4.1.0/setup.py --- old/python-nbxmpp-4.0.1/setup.py 2023-01-13 22:38:32.000000000 +0100 +++ new/python-nbxmpp-4.1.0/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup - -setup()