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 2022-07-28 20:58:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nbxmpp (Old)
 and      /work/SRC/openSUSE:Factory/.python-nbxmpp.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nbxmpp"

Thu Jul 28 20:58:53 2022 rev:31 rq:991451 version:3.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nbxmpp/python-nbxmpp.changes      
2022-05-30 12:44:49.444460296 +0200
+++ /work/SRC/openSUSE:Factory/.python-nbxmpp.new.1533/python-nbxmpp.changes    
2022-07-28 20:59:20.527687077 +0200
@@ -1,0 +2,8 @@
+Wed Jul 27 21:40:35 UTC 2022 - Alexei Sorokin <[email protected]>
+
+- Update to version 3.1.1:
+  * Add more datetime test cases.
+  * Use cache when calling JID.new_as_bare().
+  * Allow handlers to connect to presence type available.
+
+-------------------------------------------------------------------

Old:
----
  python-nbxmpp-3.1.0.tar.bz2

New:
----
  python-nbxmpp-3.1.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-nbxmpp.spec ++++++
--- /var/tmp/diff_new_pack.QHeQis/_old  2022-07-28 20:59:20.991688383 +0200
+++ /var/tmp/diff_new_pack.QHeQis/_new  2022-07-28 20:59:20.995688394 +0200
@@ -18,10 +18,11 @@
 
 # Requires at least python 3.9
 %define skip_python2 1
+%define skip_python36 1
 %define skip_python38 1
 %define _name   nbxmpp
 Name:           python-nbxmpp
-Version:        3.1.0
+Version:        3.1.1
 Release:        0
 Summary:        XMPP library by Gajim team
 License:        GPL-3.0-or-later

++++++ python-nbxmpp-3.1.0.tar.bz2 -> python-nbxmpp-3.1.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/.chglog/CHANGELOG.tpl.md 
new/python-nbxmpp-3.1.1/.chglog/CHANGELOG.tpl.md
--- old/python-nbxmpp-3.1.0/.chglog/CHANGELOG.tpl.md    2022-05-28 
11:27:58.000000000 +0200
+++ new/python-nbxmpp-3.1.1/.chglog/CHANGELOG.tpl.md    2022-07-27 
10:19:35.000000000 +0200
@@ -1,26 +1,11 @@
-{{ if .Versions -}}
-<a name="unreleased"></a>
-## [Unreleased]
-
-{{ if .Unreleased.CommitGroups -}}
-{{ range .Unreleased.CommitGroups -}}
-{{ .Title }}
-
-{{ range .Commits -}}
-  * {{if .Refs}}{{range .Refs}}#{{.Ref}} {{end}}{{end}}{{ if .Scope }}**{{ 
.Scope }}:** {{ end }}{{ .Subject }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-
-
 {{ range .Versions }}
-<a name="{{ .Tag.Name }}"></a>
-## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - 
{{ datetime "2006-01-02" .Tag.Date }}
+nbxmpp {{ .Tag.Name }} ({{ datetime "02 Jan 2006" .Tag.Date }})
+
 {{ range .CommitGroups -}}
-{{ .Title }}
+{{ if .Title }}  {{ .Title }}{{end}}
+
 {{ range .Commits -}}
-  * {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
+{{ if .Subject }}  * {{ .Subject }}{{end}}{{if .Refs}} ({{range 
.Refs}}#{{.Ref}}{{end}}){{end}}
 {{ end }}
 {{ end -}}
 
@@ -32,13 +17,7 @@
 {{ end }}
 {{ end -}}
 {{ end -}}
-{{ end -}}
 
-{{- if .Versions }}
-[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 
0 }}{{ $latest.Tag.Name }}...HEAD
-{{ range .Versions -}}
-{{ if .Tag.Previous -}}
-[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name 
}}...{{ .Tag.Name }}
-{{ end -}}
+{{break}}
+
 {{ end -}}
-{{ end -}}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/.chglog/config.yml 
new/python-nbxmpp-3.1.1/.chglog/config.yml
--- old/python-nbxmpp-3.1.0/.chglog/config.yml  2022-05-28 11:27:58.000000000 
+0200
+++ new/python-nbxmpp-3.1.1/.chglog/config.yml  2022-07-27 10:19:35.000000000 
+0200
@@ -9,6 +9,7 @@
       Type:
         - feat
         - imprv
+        - change
         - perf
         - fix
   commit_groups:
@@ -16,11 +17,13 @@
     title_order:
       - feat
       - imprv
+      - change
       - perf
       - fix
     title_maps:
       feat: New
       imprv: Improvements
+      change: Change
       perf: Performance
       fix: Bug Fixes
   header:
@@ -34,3 +37,6 @@
   refs:
     actions:
       - Fixes
+  notes:
+    keywords:
+      - NOTES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/.ci/deploy.py 
new/python-nbxmpp-3.1.1/.ci/deploy.py
--- old/python-nbxmpp-3.1.0/.ci/deploy.py       2022-05-28 11:27:58.000000000 
+0200
+++ new/python-nbxmpp-3.1.1/.ci/deploy.py       2022-07-27 10:19:35.000000000 
+0200
@@ -13,7 +13,7 @@
 
 def build() -> None:
     cmd = [
-        'python',
+        'python3',
         'setup.py',
         'sdist',
         'bdist_wheel'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/ChangeLog 
new/python-nbxmpp-3.1.1/ChangeLog
--- old/python-nbxmpp-3.1.0/ChangeLog   2022-05-28 11:27:58.000000000 +0200
+++ new/python-nbxmpp-3.1.1/ChangeLog   2022-07-27 10:19:35.000000000 +0200
@@ -1,266 +1,280 @@
-python-nbxmpp 3.1.0 (28 May 2022)
+nbxmpp 3.1.1 (27 Jul 2022)
 
- New
- 
- * Examples: Allow to connect with different modes
- 
- Bug Fixes
+  Improvements
+
+  * Add more datetime test cases
+
+  Performance
+
+  * Use cache when calling JID.new_as_bare()
+
+  Bug Fixes
+
+  * Allow handlers to connect to presence type available
+
+nbxmpp 3.1.0 (28 May 2022)
+
+  New
  
- * Client: Disconnect after stream restart in Login mode
+  * Examples: Allow to connect with different modes
 
-python-nbxmpp 3.0.2 (18 May 2022)
+  Bug Fixes
+ 
+  * Client: Disconnect after stream restart in Login mode
 
- Bug Fixes
+nbxmpp 3.0.2 (18 May 2022)
  
- * Roster: Raise exception if a full jid is found
- * AdHoc: Don???t raise on empty nodes
- * Roster: Don???t fail when no roster attribute is found
- * #126 Remove redundant wheel dependency
+  Bug Fixes
+
+  * Roster: Raise exception if a full jid is found
+  * AdHoc: Don???t raise on empty nodes
+  * Roster: Don???t fail when no roster attribute is found
+  * #126 Remove redundant wheel dependency
 
-python-nbxmpp 3.0.1 (09 May 2022)
+nbxmpp 3.0.1 (09 May 2022)
 
- Bugfix
+  Bugfix
 
- * Fix non-installable release
+  * Fix non-installable release
 
-python-nbxmpp 3.0.0 (09 May 2022)
+nbxmpp 3.0.0 (09 May 2022)
 
- New
+  New
 
- * Add Roster module
- * Add Last Activity module
- * Add EntityTime module
- * Bookmarks: Add extensions support
- * Add Message Moderation
- * Implement SCRAM-SHA-512
+  * Add Roster module
+  * Add Last Activity module
+  * Add EntityTime module
+  * Bookmarks: Add extensions support
+  * Add Message Moderation
+  * Implement SCRAM-SHA-512
 
- Bugfixes
+  Bugfixes
 
- * AdHoc: Improve XEP-0050 Compliance
- * Correctly handle RSM count request
- * Correction: Ignore messages where message id == replace id
- * Blocking: Don???t abort processing after parsing unblocks
- * Handle multiple stanza-id elements
+  * AdHoc: Improve XEP-0050 Compliance
+  * Correctly handle RSM count request
+  * Correction: Ignore messages where message id == replace id
+  * Blocking: Don???t abort processing after parsing unblocks
+  * Handle multiple stanza-id elements
 
- Others
+  Others
 
- * Many breaking changes to methods and structs
+  * Many breaking changes to methods and structs
 
-python-nbxmpp 2.0.6 (14 March 2022)
+nbxmpp 2.0.6 (14 March 2022)
 
- Bugfixes
+  Bugfixes
 
- * Don???t fail on invalid host meta file
+  * Don???t fail on invalid host meta file
 
-python-nbxmpp 2.0.5 (13 March 2022)
+nbxmpp 2.0.5 (13 March 2022)
 
- Bugfixes
+  Bugfixes
 
- * Fix bookmarks compat namespace
- * Resolve websocket uri only via https
+  * Fix bookmarks compat namespace
+  * Resolve websocket uri only via https
 
-python-nbxmpp 2.0.4 (09 October 2021)
+nbxmpp 2.0.4 (09 October 2021)
 
- Bugfixes
+  Bugfixes
 
- * Ignore messages with incorrect id
- * AdHoc: Make parsing AdHoc commands more compliant
+  * Ignore messages with incorrect id
+  * AdHoc: Make parsing AdHoc commands more compliant
 
-python-nbxmpp 2.0.3 (24 July 2021)
+nbxmpp 2.0.3 (24 July 2021)
 
- Bugfixes
+  Bugfixes
 
- * Correctly handle RSM count request
- * Improve XEP-0050 Compliance
- * GSSAPI: Catch OSError
+  * Correctly handle RSM count request
+  * Improve XEP-0050 Compliance
+  * GSSAPI: Catch OSError
 
-python-nbxmpp 2.0.2 (18 February 2021)
+nbxmpp 2.0.2 (18 February 2021)
 
- Bugfixes
+  Bugfixes
 
- * Add get_text() for Error Base class
- * Client: Remove GSSAPI from default mechanisms
- * Presence: Fix is_nickname_changed check
- * UserAvatar: Add default argument
+  * Add get_text() for Error Base class
+  * Client: Remove GSSAPI from default mechanisms
+  * Presence: Fix is_nickname_changed check
+  * UserAvatar: Add default argument
 
-python-nbxmpp 2.0.1 (07 February 2021)
+nbxmpp 2.0.1 (07 February 2021)
 
- New
+  New
 
- * Properties: is_from_us() Method
+  * Properties: is_from_us() Method
 
- Bugfixes
+  Bugfixes
 
- * Fix handling invalid websocket uris
+  * Fix handling invalid websocket uris
 
-python-nbxmpp 2.0.0 (29 December 2020)
+nbxmpp 2.0.0 (29 December 2020)
 
- New
+  New
 
- * New JID object
- * Add JID Escaping (XEP-0106) support
- * Add VCard4 (XEP-0292) support
- * Make module calls generator based
- * Add GSSAPI support (XEP-0233)
- * Simplify and harmonize module API
+  * New JID object
+  * Add JID Escaping (XEP-0106) support
+  * Add VCard4 (XEP-0292) support
+  * Make module calls generator based
+  * Add GSSAPI support (XEP-0233)
+  * Simplify and harmonize module API
 
-python-nbxmpp 1.0.2 (14 August 2020)
+nbxmpp 1.0.2 (14 August 2020)
 
- New
+  New
 
- * Client: Expose more information about the connection
- * Client: set_ignored_tls_errors() allow to pass None
- * Add method to disable stream management
+  * Client: Expose more information about the connection
+  * Client: set_ignored_tls_errors() allow to pass None
+  * Add method to disable stream management
 
- Bugfixes
+  Bugfixes
 
- * TCP: Set input/output closed on finalize()
- * TCP: Catch Runtime error
- * Perform UTS46 mapping on domain names
+  * TCP: Set input/output closed on finalize()
+  * TCP: Catch Runtime error
+  * Perform UTS46 mapping on domain names
 
-python-nbxmpp 1.0.1 (07 July 2020)
+nbxmpp 1.0.1 (07 July 2020)
 
- New
+  New
 
- * Add XEP-0377 support
- * MUC: Return message id when using inivite()
+  * Add XEP-0377 support
+  * MUC: Return message id when using inivite()
 
- Bugfixes
+  Bugfixes
 
- * OMEMO: Correctly parse prekey value
- * Client: Determine protocol and type correctly if a custom host is used
- * Smacks: Don't fail on saving error replies
+  * OMEMO: Correctly parse prekey value
+  * Client: Determine protocol and type correctly if a custom host is used
+  * Smacks: Don't fail on saving error replies
 
-python-nbxmpp 1.0.0 (18 June 2020)
+nbxmpp 1.0.0 (18 June 2020)
 
- * Library rewritten in most parts
- * Replace BOSH with Websocket
- * Add new example client
- * Many other improvements
+  * Library rewritten in most parts
+  * Replace BOSH with Websocket
+  * Add new example client
+  * Many other improvements
  
- Known Issues:
+  Known Issues:
  
- * Currently no Client Cert support
+  * Currently no Client Cert support
 
-python-nbxmpp 0.6.10 (19 February 2019)
+nbxmpp 0.6.10 (19 February 2019)
 
- * Add support for domain based name in features for GSSAPI
- * Fix usage of BOSH
- * Fix Jingle hash namespace
+  * Add support for domain based name in features for GSSAPI
+  * Fix usage of BOSH
+  * Fix Jingle hash namespace
 
-python-nbxmpp 0.6.9 (10 January 2019)
+nbxmpp 0.6.9 (10 January 2019)
 
- * Always bind after SM failed Fixes #64
- * Dont try and guess system language
+  * Always bind after SM failed Fixes #64
+  * Dont try and guess system language
 
-python-nbxmpp 0.6.8 (07 October 2018)
+nbxmpp 0.6.8 (07 October 2018)
 
- * Reset SM counter after receiving <enabled>
- * Issue event when SM resume fails
+  * Reset SM counter after receiving <enabled>
+  * Issue event when SM resume fails
 
-python-nbxmpp 0.6.7 (19 August 2018)
+nbxmpp 0.6.7 (19 August 2018)
 
- * Raise default TLS version to 1.2
- * Remove DIGEST-MD5 from the default auth mechs
- * Add STANZA RECEIVED Event (Some servers send more than one stanza in one 
packet)
- * Add alternative locations to load TLS certs from
+  * Raise default TLS version to 1.2
+  * Remove DIGEST-MD5 from the default auth mechs
+  * Add STANZA RECEIVED Event (Some servers send more than one stanza in one 
packet)
+  * Add alternative locations to load TLS certs from
 
-python-nbxmpp 0.6.6 (20 May 2018)
+nbxmpp 0.6.6 (20 May 2018)
 
- * Record all SSL errors instead of only the first
- * Pass arguments to plugin/plugout methods
- * Allow the Roster to be initalized without requesting it from the server
+  * Record all SSL errors instead of only the first
+  * Pass arguments to plugin/plugout methods
+  * Allow the Roster to be initalized without requesting it from the server
 
-python-nbxmpp 0.6.5 (30 April 2018)
+nbxmpp 0.6.5 (30 April 2018)
 
- * Fix BOSH usage (don't set ALPN)
- * Better handling of certificate files
+  * Fix BOSH usage (don't set ALPN)
+  * Better handling of certificate files
 
-python-nbxmpp 0.6.4 (17 March 2018)
+nbxmpp 0.6.4 (17 March 2018)
 
- * Fix SOCKS5 usage
+  * Fix SOCKS5 usage
 
-python-nbxmpp 0.6.3 (26 January 2018)
+nbxmpp 0.6.3 (26 January 2018)
 
- * Add ALPN and SNI support for when using DirectTLS
- * Bugfixes
+  * Add ALPN and SNI support for when using DirectTLS
+  * Bugfixes
 
-python-nbxmpp 0.6.2 (27 December 2017)
+nbxmpp 0.6.2 (27 December 2017)
 
- * Correctly load client certs
- * Warn on any error in the certificate chain
- * Fixed a traceback loop
+  * Correctly load client certs
+  * Warn on any error in the certificate chain
+  * Fixed a traceback loop
 
-python-nbxmpp 0.6.1 (29 November 2017)
+nbxmpp 0.6.1 (29 November 2017)
 
- * Add new getStanzaIDAttrs method
- * Fix BOSH connexion
- * stop using PyOpenSSL for random generator
+  * Add new getStanzaIDAttrs method
+  * Fix BOSH connexion
+  * stop using PyOpenSSL for random generator
 
-python-nbxmpp 0.6.0 (25 September 2017)
+nbxmpp 0.6.0 (25 September 2017)
 
- * Add new getOriginID/SetOriginID method for Messages
- * Add new getJid() method for Protocol
- * getTagAttr() accepts now a namespace argument
- * Add new `protocol` argument for getTag()
- * Add new XEP Namespaces
+  * Add new getOriginID/SetOriginID method for Messages
+  * Add new getJid() method for Protocol
+  * getTagAttr() accepts now a namespace argument
+  * Add new `protocol` argument for getTag()
+  * Add new XEP Namespaces
 
-python-nbxmpp 0.5.6 (03 June 2017)
+nbxmpp 0.5.6 (03 June 2017)
 
   * Support XEP-0198 Version 1.5.2
   * Add new XEP Namespaces
 
-python-nbxmpp 0.5.5 (30 January 2017)
+nbxmpp 0.5.5 (30 January 2017)
 
   * Some cleanup
   * Add some namespaces
 
-python-nbxmpp 0.5.4 (04 September 2016)
+nbxmpp 0.5.4 (04 September 2016)
 
   * Fix SCRAM authentication
   * Fix BOSH connection with UTF-8 messages
   * Fix smacks implementation
   * Use uuid in stanza ids
 
-python-nbxmpp 0.5.3 (13 July 2015)
+nbxmpp 0.5.3 (13 July 2015)
 
   * Fix receiving long utf8 strings under py3
   * Fix issue with pyopenssl 0.15.1
   * Fix decoding issues
 
-python-nbxmpp 0.5.2 (27 December 2014)
+nbxmpp 0.5.2 (27 December 2014)
 
   * Fix BOSH HTTP requests
   * Fix handling of binary SASL data for mechanism GSSAPI
   * Update MAM namespace
 
-python-nbxmpp 0.5.1 (04 October 2014)
+nbxmpp 0.5.1 (04 October 2014)
 
   * Fix printing network errors in a non-utf-8 console
 
-python-nbxmpp 0.5 (02 July 2014)
+nbxmpp 0.5 (02 July 2014)
 
   * support both python2 and python3
   * Fix storing server certificate when there is no error
 
-python-nbxmpp 0.4 (15 March 2014)
+nbxmpp 0.4 (15 March 2014)
 
   * Ability to configure TLS protocol version
   * Add support for SCRAM-SHA-1-PLUS
   * Security improvements
 
-python-nbxmpp 0.3 (23 December 2013)
+nbxmpp 0.3 (23 December 2013)
 
   * Improve security level
   * Ability to configure cipher list
   * Store only depth 0 SSL certificate
 
-python-nbxmpp 0.2 (26 July 2013)
+nbxmpp 0.2 (26 July 2013)
 
   * Add some namespace
   * do TLS handshake without blocking
   * store all SSL errors instead of only last one
 
-python-nbxmpp 0.1 (05 August 2012)
+nbxmpp 0.1 (05 August 2012)
 
   * Initial release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/nbxmpp/__init__.py 
new/python-nbxmpp-3.1.1/nbxmpp/__init__.py
--- old/python-nbxmpp-3.1.0/nbxmpp/__init__.py  2022-05-28 11:27:58.000000000 
+0200
+++ new/python-nbxmpp-3.1.1/nbxmpp/__init__.py  2022-07-27 10:19:35.000000000 
+0200
@@ -4,4 +4,4 @@
 
 gi.require_version('Soup', '2.4')
 
-__version__: str = '3.1.0'
+__version__: str = '3.1.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/nbxmpp/dispatcher.py 
new/python-nbxmpp-3.1.1/nbxmpp/dispatcher.py
--- old/python-nbxmpp-3.1.0/nbxmpp/dispatcher.py        2022-05-28 
11:27:58.000000000 +0200
+++ new/python-nbxmpp-3.1.1/nbxmpp/dispatcher.py        2022-07-27 
10:19:35.000000000 +0200
@@ -421,10 +421,13 @@
                 return
 
         typ = stanza.getType()
-        if name == 'message' and not typ:
-            typ = 'normal'
-        elif not typ:
-            typ = ''
+        if not typ:
+            if name == 'message':
+                typ = 'normal'
+            elif name == 'presence':
+                typ = 'available'
+            else:
+                typ = ''
 
         stanza.props = stanza.getProperties()
         self._log.debug('type: %s, properties: %s', typ, stanza.props)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/nbxmpp/protocol.py 
new/python-nbxmpp-3.1.1/nbxmpp/protocol.py
--- old/python-nbxmpp-3.1.0/nbxmpp/protocol.py  2022-05-28 11:27:58.000000000 
+0200
+++ new/python-nbxmpp-3.1.1/nbxmpp/protocol.py  2022-07-27 10:19:35.000000000 
+0200
@@ -700,9 +700,7 @@
     def new_as_bare(self) -> JID:
         if self.resource is None:
             return self
-        new = asdict(self)
-        new.pop('resource')
-        return JID(**new)
+        return JID.from_string(self.bare)
 
     def bare_match(self, other: Union[str, JID]) -> bool:
         if isinstance(other, str):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/scripts/bump_version.py 
new/python-nbxmpp-3.1.1/scripts/bump_version.py
--- old/python-nbxmpp-3.1.0/scripts/bump_version.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/python-nbxmpp-3.1.1/scripts/bump_version.py     2022-07-27 
10:19:35.000000000 +0200
@@ -0,0 +1,67 @@
+#!/usr/bin/env python3
+
+import re
+import argparse
+from pathlib import Path
+import subprocess
+
+REPO_DIR = Path(__file__).resolve().parent.parent
+
+
+INIT = REPO_DIR / 'nbxmpp' / '__init__.py'
+CFG = REPO_DIR / 'setup.cfg'
+CHANGELOG = REPO_DIR / 'ChangeLog'
+
+VERSION_RX = r'\d+\.\d+\.\d+'
+
+
+def get_current_version() -> str:
+    content = INIT.read_text(encoding='utf8')
+    match = re.search(VERSION_RX, content)
+    if match is None:
+        exit('Unable to find current version')
+    return match[0]
+
+
+def bump_version(current_version: str, new_version: str) -> None:
+    content = INIT.read_text(encoding='utf8')
+    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:
+
+    cmd = [
+        'git-chglog',
+        '--next-tag',
+        new_version
+    ]
+
+    result = subprocess.run(cmd,
+                            cwd=REPO_DIR,
+                            text=True,
+                            check=True,
+                            capture_output=True)
+
+    changes = result.stdout
+    changes = changes.removeprefix('\n')
+
+    current_changelog = CHANGELOG.read_text()
+
+    with CHANGELOG.open('w') as f:
+        f.write(changes + current_changelog)
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Bump Version')
+    parser.add_argument('version', help='The new version, e.g. 1.5.0')
+    args = parser.parse_args()
+
+    current_version = get_current_version()
+
+    bump_version(current_version, args.version)
+    make_changelog(args.version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-3.1.0/setup.cfg 
new/python-nbxmpp-3.1.1/setup.cfg
--- old/python-nbxmpp-3.1.0/setup.cfg   2022-05-28 11:27:58.000000000 +0200
+++ new/python-nbxmpp-3.1.1/setup.cfg   2022-07-27 10:19:35.000000000 +0200
@@ -1,6 +1,6 @@
 [metadata]
 name = nbxmpp
-version = 3.1.0
+version = 3.1.1
 description = XMPP Library
 author = Yann Leboulanger, Philipp Hoerist
 author_email = [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-nbxmpp-3.1.0/test/unit/test_datetime_parsing.py 
new/python-nbxmpp-3.1.1/test/unit/test_datetime_parsing.py
--- old/python-nbxmpp-3.1.0/test/unit/test_datetime_parsing.py  2022-05-28 
11:27:58.000000000 +0200
+++ new/python-nbxmpp-3.1.1/test/unit/test_datetime_parsing.py  2022-07-27 
10:19:35.000000000 +0200
@@ -27,6 +27,8 @@
             # Valid strings with offset
             '2017-11-05T01:41:20-05:00': 1509864080.0,
             '2017-11-05T01:41:20+05:00': 1509828080.0,
+            '2017-11-05T01:41:20-00:00': 1509846080.0,
+            '2017-11-05T01:41:20+00:00': 1509846080.0,
         }
 
         strings2 = {

Reply via email to