public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mycli] f45: 2.31.0
@ 2026-11-15  9:18 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-15  9:18 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mycli
Branch : f45
Commit : abb62a9e53a88e09b065b4d9cfc8541449fbc2f4
Author : Terje Røsten <terjeros@gmail.com>
Date   : 2026-11-15T10:17:24+01:00
Stats  : +210/-11 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/mycli/c/abb62a9e53a88e09b065b4d9cfc8541449fbc2f4?branch=f45

Log:
2.31.0

---
diff --git a/.gitignore b/.gitignore
index e629a0e..281630c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,4 @@
 /mycli-2.29.4.tar.gz
 /mycli-2.30.2.tar.gz
 /mycli-2.30.3.tar.gz
+/mycli-2.31.0.tar.gz

diff --git a/mycli-2.29.4-no-version-dep.patch b/mycli-2.29.4-no-version-dep.patch
index d92b3b8..a14ee5c 100644
--- a/mycli-2.29.4-no-version-dep.patch
+++ b/mycli-2.29.4-no-version-dep.patch
@@ -1,5 +1,5 @@
 diff --git a/pyproject.toml b/pyproject.toml
-index aeef341..5ea1c66 100644
+index aa540ae..ccfdff2 100644
 --- a/pyproject.toml
 +++ b/pyproject.toml
 @@ -25,25 +25,24 @@ classifiers = [
@@ -11,8 +11,8 @@ index aeef341..5ea1c66 100644
 -    "cryptography ~= 50.0.2",
 -    "Pygments ~= 2.21.0",
 -    "prompt_toolkit ~= 3.0.53",
--    "PyMySQL ~= 1.2.3",
--    "sqlparse ~= 0.6.0",
+-    "PyMySQL ~= 1.2.4",
+-    "sqlparse ~= 0.6.1",
 -    "sqlglot ~= 30.25.0",
 -    "sqlglotc ~= 30.25.0",
 -    "configobj ~= 5.0.9",
@@ -59,9 +59,9 @@ index aeef341..5ea1c66 100644
  
  [project.optional-dependencies]
  llm = [
--    "llm ~= 0.36",
+-    "llm ~= 0.37.1",
 -    "setuptools == 84.*",                   # Required by llm commands to install models
--    "pip ~= 26.2.2",
+-    "pip ~= 26.3",
 +    "llm",
 +    "setuptools",                   # Required by llm commands to install models
 +    "pip",
@@ -79,8 +79,8 @@ index aeef341..5ea1c66 100644
  ]
  dev = [
 -    "behave ~= 1.3.3",
--    "coverage ~= 7.17.0",
--    "mypy ~= 2.4.0",
+-    "coverage ~= 7.17.2",
+-    "mypy ~= 2.4.1",
 -    "pexpect ~= 4.9.0",
 -    "pytest ~= 9.2.0",
 -    "pytest-cov ~= 7.1.0",
@@ -100,7 +100,7 @@ index aeef341..5ea1c66 100644
  ]
  
  [project.scripts]
-@@ -174,7 +172,6 @@ commands = [['uv', 'run', '--no-sync', '--frozen', '--', 'python', '-m', 'ensure
+@@ -175,7 +173,6 @@ commands = [['uv', 'run', '--no-sync', '--frozen', '--', 'python', '-m', 'ensure
              ['uv', 'run', '--no-sync', '--frozen', '--', 'python', '-m', 'mypy', '--no-pretty', '--install-types', '--non-interactive', '.']]
  
  [tool.pytest]

diff --git a/mycli-2.31.0-revert.patch b/mycli-2.31.0-revert.patch
new file mode 100644
index 0000000..b7d2a95
--- /dev/null
+++ b/mycli-2.31.0-revert.patch
@@ -0,0 +1,193 @@
+diff --git a/mycli/client_connection.py b/mycli/client_connection.py
+index 1ed5683..344f1e1 100644
+--- a/mycli/client_connection.py
++++ b/mycli/client_connection.py
+@@ -10,7 +10,7 @@ import click
+ import keyring
+ import pymysql
+ from pymysql.constants.CR import CR_SERVER_LOST
+-from pymysql.constants.ER import ACCESS_DENIED_ERROR, HANDSHAKE_ERROR, MUST_CHANGE_PASSWORD_LOGIN
++from pymysql.constants.ER import ACCESS_DENIED_ERROR, HANDSHAKE_ERROR
+ 
+ from mycli.compat import WIN
+ from mycli.config import str_to_bool
+@@ -19,6 +19,7 @@ from mycli.constants import (
+     DEFAULT_HOST,
+     DEFAULT_PORT,
+     EMPTY_PASSWORD_FLAG_SENTINEL,
++    ER_MUST_CHANGE_PASSWORD_LOGIN,
+ )
+ from mycli.packages.credentials.password_sources import PasswordCandidates
+ from mycli.packages.execution.sql_execute import SQLExecute
+@@ -432,7 +433,7 @@ class ClientConnectionMixin:
+                         keyring_retrieved_cleanly=keyring_retrieved_cleanly,
+                         keyring_save_eligible=keyring_save_eligible,
+                     )
+-                elif e1.args[0] == MUST_CHANGE_PASSWORD_LOGIN:
++                elif e1.args[0] == ER_MUST_CHANGE_PASSWORD_LOGIN:
+                     self.echo(
+                         "Your password has expired and the server rejected the connection.",
+                         err=True,
+diff --git a/mycli/constants.py b/mycli/constants.py
+index 696da41..b80fc68 100644
+--- a/mycli/constants.py
++++ b/mycli/constants.py
+@@ -38,6 +38,10 @@ TEST_DATABASE = 'mycli_test_db'
+ DEFAULT_WIDTH = 80
+ DEFAULT_HEIGHT = 25
+ 
++# MySQL error codes not available in pymysql.constants.ER
++ER_MUST_CHANGE_PASSWORD_LOGIN = 1862
++ER_MUST_CHANGE_PASSWORD = 1820
++
+ EMPTY_PASSWORD_FLAG_SENTINEL = -1
+ DEFAULT_PROMPT = "\\t \\u@\\h:\\d> "
+ 
+diff --git a/mycli/main_modes/repl.py b/mycli/main_modes/repl.py
+index 7d666a3..f14c677 100644
+--- a/mycli/main_modes/repl.py
++++ b/mycli/main_modes/repl.py
+@@ -49,7 +49,6 @@ from pymysql.constants.CR import (
+     CR_SERVER_GONE_ERROR,
+     CR_SERVER_LOST,
+ )
+-from pymysql.constants.ER import MUST_CHANGE_PASSWORD
+ from pymysql.constants.SERVER_STATUS import SERVER_STATUS_IN_TRANS
+ from pymysql.cursors import Cursor
+ 
+@@ -58,6 +57,7 @@ from mycli.compat import WIN
+ from mycli.constants import (
+     DEFAULT_HOST,
+     DEFAULT_WIDTH,
++    ER_MUST_CHANGE_PASSWORD,
+     HOME_URL,
+     ISSUES_URL,
+     QueryState,
+@@ -1112,7 +1112,7 @@ def _one_iteration(
+         mycli.echo(str(exc), err=True, fg='red')
+     except pymysql.OperationalError as e1:
+         mycli.logger.debug('Exception: %r', e1)
+-        if e1.args[0] == MUST_CHANGE_PASSWORD:
++        if e1.args[0] == ER_MUST_CHANGE_PASSWORD:
+             mycli.sandbox_mode = True
+             mycli.echo(
+                 "ERROR 1820: You must reset your password using ALTER USER or SET PASSWORD before executing this statement.",
+diff --git a/mycli/packages/execution/sql_execute.py b/mycli/packages/execution/sql_execute.py
+index c632a7c..8013753 100644
+--- a/mycli/packages/execution/sql_execute.py
++++ b/mycli/packages/execution/sql_execute.py
+@@ -12,10 +12,10 @@ import pymysql
+ from pymysql.connections import Connection
+ from pymysql.constants import FIELD_TYPE
+ from pymysql.constants.CR import CR_SSL_CONNECTION_ERROR
+-from pymysql.constants.ER import MUST_CHANGE_PASSWORD
+ from pymysql.converters import conversions, convert_date, convert_datetime, convert_time, decoders
+ from pymysql.cursors import Cursor, SSCursor
+ 
++from mycli.constants import ER_MUST_CHANGE_PASSWORD
+ from mycli.packages.execution.background_runner import BackgroundRunner
+ from mycli.packages.special_commands import io_commands
+ from mycli.packages.special_commands.main import CommandNotFound, execute
+@@ -296,9 +296,9 @@ class SQLExecute:
+                 connect_kwargs['ssl_disabled'] = True
+                 conn = pymysql.connect(**connect_kwargs)  # type: ignore[misc]
+         except pymysql.OperationalError as e:
+-            if e.args[0] == MUST_CHANGE_PASSWORD:
++            if e.args[0] == ER_MUST_CHANGE_PASSWORD:
+                 # Post-handshake queries (SET NAMES, SET AUTOCOMMIT, init_command)
+-                # fail with MUST_CHANGE_PASSWORD in sandbox mode.
++                # fail with ER_MUST_CHANGE_PASSWORD in sandbox mode.
+                 # Reconnect with only the raw handshake.
+                 connect_kwargs['defer_connect'] = True
+                 connect_kwargs['autocommit'] = None
+@@ -659,7 +659,7 @@ class SQLExecute:
+         """Connect in sandbox mode, performing only the handshake.
+ 
+         pymysql's normal connect() runs post-handshake queries (SET NAMES,
+-        SET AUTOCOMMIT, init_command) that all fail with MUST_CHANGE_PASSWORD
++        SET AUTOCOMMIT, init_command) that all fail with ER_MUST_CHANGE_PASSWORD
+         in sandbox mode.  This method performs the raw socket connection and
+         authentication handshake only.
+         """
+diff --git a/mycli_test/pytests/test_client_connection.py b/mycli_test/pytests/test_client_connection.py
+index d385d71..32adc05 100644
+--- a/mycli_test/pytests/test_client_connection.py
++++ b/mycli_test/pytests/test_client_connection.py
+@@ -8,12 +8,11 @@ from typing import Any, Literal, cast
+ 
+ from configobj import ConfigObj
+ import pymysql
+-from pymysql.constants.ER import MUST_CHANGE_PASSWORD_LOGIN
+ import pytest
+ 
+ from mycli import client_connection
+ from mycli.client_connection import ClientConnectionMixin
+-from mycli.constants import DEFAULT_CHARSET, EMPTY_PASSWORD_FLAG_SENTINEL
++from mycli.constants import DEFAULT_CHARSET, EMPTY_PASSWORD_FLAG_SENTINEL, ER_MUST_CHANGE_PASSWORD_LOGIN
+ from mycli.packages.credentials.password_sources import KNOWN_PASSWORD_SOURCES, PasswordCandidates
+ 
+ 
+@@ -1305,7 +1304,7 @@ def test_connect_exits_when_password_retry_still_has_no_password(monkeypatch: py
+ 
+ def test_connect_reports_expired_password_login_error() -> None:
+     client = DummyClient()
+-    FakeSQLExecute.effects = [op_error(MUST_CHANGE_PASSWORD_LOGIN, 'expired')]
++    FakeSQLExecute.effects = [op_error(ER_MUST_CHANGE_PASSWORD_LOGIN, 'expired')]
+ 
+     with pytest.raises(SystemExit) as excinfo:
+         client.connect(host='db', port=3307)
+diff --git a/mycli_test/pytests/test_main.py b/mycli_test/pytests/test_main.py
+index 1afcb78..3092cab 100644
+--- a/mycli_test/pytests/test_main.py
++++ b/mycli_test/pytests/test_main.py
+@@ -25,7 +25,6 @@ from prompt_toolkit.formatted_text import (
+     to_plain_text,
+ )
+ import pymysql
+-from pymysql.constants.ER import MUST_CHANGE_PASSWORD_LOGIN
+ from pymysql.err import OperationalError
+ import pytest
+ 
+@@ -41,6 +40,7 @@ from mycli.constants import (
+     DEFAULT_PORT,
+     DEFAULT_USER,
+     EMPTY_PASSWORD_FLAG_SENTINEL,
++    ER_MUST_CHANGE_PASSWORD_LOGIN,
+     TEST_DATABASE,
+ )
+ from mycli.main import (
+@@ -2386,7 +2386,7 @@ def test_connect_reports_expired_password_login_error(monkeypatch: pytest.Monkey
+ 
+     class ExpiredPasswordSQLExecute(RecordingSQLExecute):
+         calls: list[dict[str, Any]] = []
+-        side_effects: list[Any] = [pymysql.OperationalError(MUST_CHANGE_PASSWORD_LOGIN, 'must change password')]
++        side_effects: list[Any] = [pymysql.OperationalError(ER_MUST_CHANGE_PASSWORD_LOGIN, 'must change password')]
+ 
+     monkeypatch.setattr(mycli.client_connection, 'SQLExecute', ExpiredPasswordSQLExecute)
+ 
+diff --git a/mycli_test/pytests/test_main_modes_repl.py b/mycli_test/pytests/test_main_modes_repl.py
+index 3884fb1..ba6f650 100644
+--- a/mycli_test/pytests/test_main_modes_repl.py
++++ b/mycli_test/pytests/test_main_modes_repl.py
+@@ -2260,7 +2260,7 @@ def test_one_iteration_enters_sandbox_mode_on_must_change_password_error(monkeyp
+         connection_id = 0
+ 
+         def run(self, text: str) -> Iterator[SQLResult]:
+-            raise pymysql.OperationalError(repl_mode.MUST_CHANGE_PASSWORD, 'must change password')
++            raise pymysql.OperationalError(repl_mode.ER_MUST_CHANGE_PASSWORD, 'must change password')
+ 
+     cli = make_repl_cli(FakeSQLExecute())
+ 
+diff --git a/mycli_test/pytests/test_sql_execute.py b/mycli_test/pytests/test_sql_execute.py
+index 8d26f5f..0e31eaa 100644
+--- a/mycli_test/pytests/test_sql_execute.py
++++ b/mycli_test/pytests/test_sql_execute.py
+@@ -1000,7 +1000,7 @@ def test_connect_enters_sandbox_after_ssl_fallback(monkeypatch: pytest.MonkeyPat
+     connect = Mock(
+         side_effect=[
+             pymysql.OperationalError(sql_execute.CR_SSL_CONNECTION_ERROR, 'SSL unsupported'),
+-            pymysql.OperationalError(sql_execute.MUST_CHANGE_PASSWORD, 'must change password'),
++            pymysql.OperationalError(sql_execute.ER_MUST_CHANGE_PASSWORD, 'must change password'),
+             new_conn,
+         ]
+     )

diff --git a/mycli.spec b/mycli.spec
index cf76699..bb02512 100644
--- a/mycli.spec
+++ b/mycli.spec
@@ -1,13 +1,14 @@
 %global         pypi_name mycli
 Summary:        Interactive CLI for MySQL Database with auto-completion and syntax highlighting
 Name:           mycli
-Version:        2.30.3
+Version:        2.31.0
 Release:        1%{?dist}
 # Automatically converted from old format: BSD - review is highly recommended.
 License:        LicenseRef-Callaway-BSD
 URL:            https://mycli.net
 Source0:        %{pypi_source}
 Patch:          mycli-2.29.4-no-version-dep.patch
+Patch:          mycli-2.31.0-revert.patch
 BuildArch:      noarch
 BuildRequires:  python3-devel
 BuildRequires:  pyproject-rpm-macros
@@ -47,7 +48,8 @@ sed -i -e 's/ ~=.*"/"/' pyproject.toml
 %pyproject_save_files %{pypi_name}
 
 %check
-%pytest --ignore-glob='*polars*' --ignore-glob='*test_main_modes_repl*'
+%pytest --ignore-glob='*polars*' --ignore-glob='*test_main_modes_repl*' \
+	-k 'not test_execute_from_file_does_not_use_locale_encoding and not test_open_external_editor_filename_does_not_use_locale_encoding'
 
 %files -f %{pyproject_files}
 %license LICENSE.txt
@@ -56,6 +58,9 @@ sed -i -e 's/ ~=.*"/"/' pyproject.toml
 %exclude %{python3_sitelib}/mycli_test
 
 %changelog
+* Sat Nov 14 2026 Terje Røsten <terjeros@gmail.com> - 2.31.0-1
+- 2.31.0
+
 * Thu Nov 05 2026 Terje Røsten <terjeros@gmail.com> - 2.30.3-1
 - 2.30.3
 

diff --git a/sources b/sources
index d6b46bd..65d812a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mycli-2.30.3.tar.gz) = c6e6f6e433efe5cc459a079b19e972eaf665d385965c0fa25a9a6952aedacb7236e7ded296657973e70c9361e98ff882144cce0c542e7a491e8c5bc297a16341
+SHA512 (mycli-2.31.0.tar.gz) = 476313b72fcead46c7b10af3678a04f4d88015c6d1cbcd987360957e0c2c30ee635d64fb1019281f65b8c31f87c35feb5e20b76e8aa193372aab69cdbb9b5a33

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-15  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15  9:18 [rpms/mycli] f45: 2.31.0 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox