diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c3999cf..c3efc017 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 54ec3eb5..37d289be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/changelog.md b/changelog.md index eed8fa29..f7a18629 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +Upcoming (TBD) +============== + +Internal +-------- +* Test on Python 3.14. + + 1.39.1 (2025/10/06) ============== diff --git a/pyproject.toml b/pyproject.toml index 617bb2e8..3a1d826d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "prompt_toolkit>=3.0.6,<4.0.0", "PyMySQL >= 0.9.2", "sqlparse>=0.3.0,<0.6.0", - "sqlglot[rs] == 26.*", + "sqlglot[rs] == 27.*", "configobj >= 5.0.5", "cli_helpers[styles] >= 2.7.0", "pyperclip >= 1.8.1", diff --git a/test/features/steps/auto_vertical.py b/test/features/steps/auto_vertical.py index 77a33638..33b43375 100644 --- a/test/features/steps/auto_vertical.py +++ b/test/features/steps/auto_vertical.py @@ -24,16 +24,22 @@ def step_execute_large_query(context): @then("we see small results in horizontal format") def step_see_small_results(context): + expected = ( + dedent( + """ + +---+\r + | 1 |\r + +---+\r + | 1 |\r + +---+ + """ + ).strip() + + '\r\n\r\n' + ) + wrappers.expect_pager( context, - dedent("""\ - +---+\r - | 1 |\r - +---+\r - | 1 |\r - +---+\r - \r - """), + expected, timeout=5, ) wrappers.expect_exact(context, "1 row in set", timeout=2) diff --git a/test/features/steps/basic_commands.py b/test/features/steps/basic_commands.py index c56ae4f4..830d94fe 100644 --- a/test/features/steps/basic_commands.py +++ b/test/features/steps/basic_commands.py @@ -71,19 +71,22 @@ def step_check_application_name(context): @then("we see found") def step_see_found(context): - wrappers.expect_exact( - context, - context.conf["pager_boundary"] - + "\r" - + dedent(""" + expected = ( + dedent( + """ +-------+\r | found |\r +-------+\r | found |\r - +-------+\r - \r - """) - + context.conf["pager_boundary"], + +-------+ + """ + ).strip() + + '\r\n\r\n' + ) + + wrappers.expect_exact( + context, + context.conf["pager_boundary"] + '\r\n' + expected + context.conf["pager_boundary"], timeout=5, ) @@ -94,19 +97,22 @@ def step_see_date(context): # such as running near midnight when the test database has # a different TZ setting than the system. date_str = datetime.datetime.now().strftime("%Y-%m-%d") - wrappers.expect_exact( - context, - context.conf["pager_boundary"] - + "\r" - + dedent(f""" + expected = ( + dedent( + f""" +------------+\r | dt |\r +------------+\r | {date_str} |\r - +------------+\r - \r - """) - + context.conf["pager_boundary"], + +------------+ + """ + ).strip() + + '\r\n\r\n' + ) + + wrappers.expect_exact( + context, + context.conf["pager_boundary"] + '\r\n' + expected + context.conf["pager_boundary"], timeout=5, ) diff --git a/test/features/steps/crud_table.py b/test/features/steps/crud_table.py index 11b0df22..d76c6964 100644 --- a/test/features/steps/crud_table.py +++ b/test/features/steps/crud_table.py @@ -70,16 +70,22 @@ def step_see_record_updated(context): @then("we see data selected") def step_see_data_selected(context): """Wait to see select output.""" - wrappers.expect_pager( - context, - dedent("""\ + expected = ( + dedent( + """ +-----+\r | x |\r +-----+\r | yyy |\r - +-----+\r - \r - """), + +-----+ + """ + ).strip() + + '\r\n\r\n' + ) + + wrappers.expect_pager( + context, + expected, timeout=2, ) wrappers.expect_exact(context, "1 row in set", timeout=2) @@ -106,16 +112,22 @@ def step_select_null(context): @then("we see null selected") def step_see_null_selected(context): """Wait to see null output.""" - wrappers.expect_pager( - context, - dedent("""\ + expected = ( + dedent( + """ +--------+\r | NULL |\r +--------+\r | |\r - +--------+\r - \r - """), + +--------+ + """ + ).strip() + + '\r\n\r\n' + ) + + wrappers.expect_pager( + context, + expected, timeout=2, ) wrappers.expect_exact(context, "1 row in set", timeout=2) diff --git a/test/features/steps/iocommands.py b/test/features/steps/iocommands.py index 7b9be240..bf1a3f1d 100644 --- a/test/features/steps/iocommands.py +++ b/test/features/steps/iocommands.py @@ -54,18 +54,22 @@ def step_tee_ouptut(context): @when('we select "select {param}"') def step_query_select_number(context, param): context.cli.sendline(f"select {param}") + expected = ( + dedent( + f""" + +{'-' * (len(param) + 2)}+\r + | {param} |\r + +{'-' * (len(param) + 2)}+\r + | {param} |\r + +{'-' * (len(param) + 2)}+ + """ + ).strip() + + '\r\n\r\n' + ) + wrappers.expect_pager( context, - dedent( - f"""\ - +{'-' * (len(param) + 2)}+\r - | {param} |\r - +{'-' * (len(param) + 2)}+\r - | {param} |\r - +{'-' * (len(param) + 2)}+\r - \r - """ - ), + expected, timeout=5, ) wrappers.expect_exact(context, "1 row in set", timeout=2) diff --git a/test/test_special_iocommands.py b/test/test_special_iocommands.py index 467f6f50..9fba9af1 100644 --- a/test/test_special_iocommands.py +++ b/test/test_special_iocommands.py @@ -223,7 +223,7 @@ def test_watch_query_full(): expected_value = "1" query = f"SELECT {expected_value}" expected_title = f"> {query}" - expected_results = [4, 5] + expected_results = [4, 5, 6, 7] # Python 3.14 is skipping ahead to 6 or 7 ctrl_c_process = send_ctrl_c(wait_interval) with db_connection().cursor() as cur: results = list(mycli.packages.special.iocommands.watch_query(arg=f"{watch_seconds} {query}", cur=cur))