Philipp Hörist pushed to branch pyproject at gajim / python-nbxmpp

Commits:

9 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -24,7 +24,8 @@ build-linux:
    24 24
       stage: build
    
    25 25
       dependencies: []
    
    26 26
       script:
    
    27
    -    - python3 setup.py sdist bdist_wheel
    
    27
    +    - pip install build
    
    28
    +    - python3 -m build
    
    28 29
         - python3 .ci/debian_build.py "$(find dist/nbxmpp-*.tar.gz)" 1 --pkgprefix=python3-
    
    29 30
     
    
    30 31
       artifacts:
    

  • ChangeLog
    1
    +nbxmpp 4.0.1 (10 Jan 2023)
    
    2
    +
    
    3
    +  Bug Fixes
    
    4
    +
    
    5
    +  * HTTP: Parse uri with correct flags
    
    6
    +
    
    1 7
     nbxmpp 4.0.0 (06 Jan 2023)
    
    2 8
     
    
    3 9
       New
    

  • debian/control
    1 1
     Source: python3-nbxmpp-nightly
    
    2
    -Section: net
    
    2
    +Section: python
    
    3 3
     Priority: optional
    
    4 4
     Maintainer: Gajim Maintainers <ci@gajim.org>
    
    5 5
     Build-Depends:
    
    6 6
         debhelper-compat (= 13),
    
    7 7
         dh-python,
    
    8
    -    libglib2.0-0 (>= 2.60),
    
    9 8
         gir1.2-soup-3.0,
    
    10 9
         python3-all,
    
    11 10
         python3-gi,
    
    12 11
         python3-idna,
    
    13 12
         python3-packaging,
    
    14 13
         python3-precis-i18n,
    
    15
    -    python3-setuptools,
    
    14
    +    python3-setuptools (>= 65.0.0),
    
    16 15
     Standards-Version: 4.1.4
    
    17 16
     Rules-Requires-Root: no
    
    18 17
     Homepage: https://dev.gajim.org/gajim/python-nbxmpp
    
    ... ... @@ -23,14 +22,10 @@ Package: python3-nbxmpp-nightly
    23 22
     Architecture: all
    
    24 23
     Depends: ${misc:Depends},
    
    25 24
         ${python3:Depends},
    
    26
    -    libglib2.0-0 (>= 2.60),
    
    27 25
         gir1.2-soup-3.0,
    
    28 26
         python3-gi,
    
    29
    -    python3-idna,
    
    30
    -    python3-packaging,
    
    31
    -    python3-precis-i18n,
    
    32 27
     Recommends: python3-gssapi,
    
    33
    -Breaks: gajim (<< 1.4~)
    
    28
    +Breaks: gajim (<< 1.6~)
    
    34 29
     Description: Non blocking XMPP Python library
    
    35 30
      python-nbxmpp is a Python library that provides a way for Python applications 
    
    36
    - to use the XMPP network. This library was initially a fork of xmpppy.
    \ No newline at end of file
    31
    + to use the XMPP network. This library was initially a fork of xmpppy.

  • nbxmpp/__init__.py
    ... ... @@ -3,4 +3,4 @@ gi.require_version('Soup', '3.0')
    3 3
     
    
    4 4
     from .protocol import *  # pylint: disable=wrong-import-position
    
    5 5
     
    
    6
    -__version__: str = '4.0.0'
    6
    +__version__: str = '4.0.1'

  • nbxmpp/http.py
    ... ... @@ -252,7 +252,7 @@ class HTTPRequest(GObject.GObject):
    252 252
                     Gio.FileCreateFlags.REPLACE_DESTINATION,
    
    253 253
                     self._cancellable)
    
    254 254
     
    
    255
    -        uri = GLib.Uri.parse(uri_string, GLib.UriFlags.HAS_PASSWORD)
    
    255
    +        uri = GLib.Uri.parse(uri_string, GLib.UriFlags(Soup.HTTP_URI_FLAGS))
    
    256 256
             self._message.set_uri(uri)
    
    257 257
     
    
    258 258
             if self._request_body_data is not None:
    
    ... ... @@ -449,6 +449,17 @@ class HTTPRequest(GObject.GObject):
    449 449
                 self._set_failed(HTTPRequestError.STATUS_NOT_OK)
    
    450 450
                 return
    
    451 451
     
    
    452
    +        self._log.info('Request status: %s', Soup.Status.get_phrase(status))
    
    453
    +
    
    454
    +        if self._cancellable.is_cancelled():
    
    455
    +            # It can happen that the message is finished before the
    
    456
    +            # response callback returns after calling cancel(). If
    
    457
    +            # we call complete, the response callback will also
    
    458
    +            # try to cleanup and will fail.
    
    459
    +            self._log.info('Skip setting message complete because '
    
    460
    +                           'cancel is in progess')
    
    461
    +            return
    
    462
    +
    
    452 463
             self._set_complete()
    
    453 464
     
    
    454 465
         def _set_failed(self, error: HTTPRequestError) -> None:
    

  • pyproject.toml
    1 1
     [build-system]
    
    2
    -requires = [
    
    3
    -  "setuptools >= 43.0.0",
    
    4
    -]
    
    2
    +requires = ["setuptools >= 65.0.0"]
    
    5 3
     build-backend = "setuptools.build_meta"
    
    6 4
     
    
    5
    +[project]
    
    6
    +name = "nbxmpp"
    
    7
    +description = "XMPP Library"
    
    8
    +keywords = ["chat", "messaging", "im", "xmpp"]
    
    9
    +readme = "README.md"
    
    10
    +requires-python = ">=3.10"
    
    11
    +license = {text = "GPL-3.0-or-later"}
    
    12
    +authors = [
    
    13
    +    {name = "Philipp Hörist", email = "philipp@hoerist.com"},
    
    14
    +    {name = "Yann Leboulanger", email = "yann@leboulanger.org"},
    
    15
    +]
    
    16
    +classifiers = [
    
    17
    +    "Programming Language :: Python :: 3.10",
    
    18
    +]
    
    19
    +dependencies = [
    
    20
    +    "precis-i18n>=1.0.0",
    
    21
    +    "packaging",
    
    22
    +    "idna",
    
    23
    +    "PyGObject",
    
    24
    +]
    
    25
    +
    
    26
    +dynamic = ["version"]
    
    27
    +
    
    28
    +[project.optional-dependencies]
    
    29
    +gssapi = ["gssapi"]
    
    30
    +
    
    31
    +[project.urls]
    
    32
    +repository = "https://dev.gajim.org/gajim/python-nbxmpp"
    
    33
    +
    
    34
    +[tool.setuptools.packages.find]
    
    35
    +include = ["nbxmpp*"]
    
    36
    +
    
    37
    +[tool.setuptools.package-data]
    
    38
    +"nbxmpp" = ["py.typed"]
    
    39
    +
    
    40
    +[tool.setuptools.dynamic]
    
    41
    +version = {attr = "nbxmpp.__version__"}
    
    7 42
     
    
    8 43
     [tool.pyright]
    
    9 44
     pythonVersion = "3.10"
    

  • scripts/bump_version.py
    ... ... @@ -9,7 +9,6 @@ REPO_DIR = Path(__file__).resolve().parent.parent
    9 9
     
    
    10 10
     
    
    11 11
     INIT = REPO_DIR / 'nbxmpp' / '__init__.py'
    
    12
    -CFG = REPO_DIR / 'setup.cfg'
    
    13 12
     CHANGELOG = REPO_DIR / 'ChangeLog'
    
    14 13
     
    
    15 14
     VERSION_RX = r'\d+\.\d+\.\d+'
    
    ... ... @@ -28,10 +27,6 @@ def bump_version(current_version: str, new_version: str) -> None:
    28 27
         content = content.replace(current_version, new_version, 1)
    
    29 28
         INIT.write_text(content, encoding='utf8')
    
    30 29
     
    
    31
    -    content = CFG.read_text(encoding='utf8')
    
    32
    -    content = content.replace(current_version, new_version, 1)
    
    33
    -    CFG.write_text(content, encoding='utf8')
    
    34
    -
    
    35 30
     
    
    36 31
     def make_changelog(new_version: str) -> None:
    
    37 32
     
    

  • setup.cfg deleted
    1
    -[metadata]
    
    2
    -name = nbxmpp
    
    3
    -version = 4.0.0
    
    4
    -description = XMPP Library
    
    5
    -author = Yann Leboulanger, Philipp Hoerist
    
    6
    -author_email = gajim-devel@gajim.org
    
    7
    -long_description = file: README.md
    
    8
    -long_description_content_type = text/markdown
    
    9
    -keywords = xmpp chat
    
    10
    -url = https://dev.gajim.org/gajim/python-nbxmpp
    
    11
    -license_file = COPYING
    
    12
    -license = GPL v3
    
    13
    -classifiers =
    
    14
    -    Programming Language :: Python :: 3.10
    
    15
    -
    
    16
    -[options]
    
    17
    -python_requires = >=3.10
    
    18
    -packages = find:
    
    19
    -install_requires =
    
    20
    -    precis-i18n>=1.0.0
    
    21
    -    packaging
    
    22
    -    idna
    
    23
    -
    
    24
    -[options.extras_require]
    
    25
    -gssapi = gssapi
    
    26
    -
    
    27
    -[options.packages.find]
    
    28
    -exclude =
    
    29
    -    test*
    
    30
    -
    
    31
    -[options.package_data]
    
    32
    -nbxmpp = py.typed

  • setup.py deleted
    1
    -#!/usr/bin/env python3
    
    2
    -
    
    3
    -from setuptools import setup
    
    4
    -
    
    5
    -setup()