Package Details: sqlite-utils 3.38-1

Git Clone URL: https://aur.archlinux.org/sqlite-utils.git (read-only, click to copy)
Package Base: sqlite-utils
Description: CLI tool and Python utility functions for manipulating SQLite databases
Upstream URL: https://sqlite-utils.datasette.io/
Licenses: Apache
Conflicts: sqlite-utils
Submitter: NBonaparte
Maintainer: micwoj92
Last Packager: micwoj92
Votes: 6
Popularity: 0.62
First Submitted: 2021-07-01 21:06 (UTC)
Last Updated: 2025-06-25 20:32 (UTC)

Latest Comments

micwoj92 commented on 2025-07-07 12:27 (UTC)

It is not related to "datetime parsing". This is because you have python-sqlite-migrate installed, as a workaround you can uninstall it and then rerun.

hak8or commented on 2025-07-05 14:51 (UTC)

Has anyone had any luck with finding a resolution for the following failing test output? It's been happening on my system for ~ a month or so at this point, but I am not seeing any discussion on the upstream project nor in the arch forums or arch subreddit. Maybe my google-fu is lacking though.

_____________________________________________ test_commands_are_documented[migrate] ______________________________________________

documented_commands = {'add-column', 'add-foreign-key', 'add-foreign-keys', 'add-geometry-column', 'analyze', 'analyze-tables', ...}
command = 'migrate'

    @pytest.mark.parametrize("command", cli.cli.commands.keys())
    def test_commands_are_documented(documented_commands, command):
>       assert command in documented_commands
E       AssertionError: assert 'migrate' in {'add-column', 'add-foreign-key', 'add-foreign-keys', 'add-geometry-column', 'analyze', 'analyze-tables', ...}

tests/test_docs.py:32: AssertionError
_____________________________________________________ test_register_commands _____________________________________________________

    def test_register_commands():
        importlib.reload(cli)
>       assert plugins.get_plugins() == []
E       AssertionError: assert [{'hooks': ['...on': '0.1b0'}] == []
E         
E         Left contains one more item: {'hooks': ['register_commands'], 'name': 'sqlite-migrate', 'version': '0.1b0'}
E         Use -v to get more diff

tests/test_plugins.py:9: AssertionError
____________________________________________________ test_prepare_connection _____________________________________________________

    def test_prepare_connection():
        importlib.reload(cli)
>       assert plugins.get_plugins() == []
E       AssertionError: assert [{'hooks': ['...on': '0.1b0'}] == []
E         
E         Left contains one more item: {'hooks': ['register_commands'], 'name': 'sqlite-migrate', 'version': '0.1b0'}
E         Use -v to get more diff

tests/test_plugins.py:42: AssertionError

I suspect it's related to datetime parsing based on this;

tests/test_insert_files.py: 12 warnings
  /home/hak8or/.cache/yay/sqlite-utils/src/sqlite_utils-3.38/sqlite_utils/cli.py:3206: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    "mtime_iso": lambda p: datetime.utcfromtimestamp(p.stat().st_mtime).isoformat(),

...
    File "/home/hak8or/.cache/yay/sqlite-utils/src/sqlite_utils-3.38/sqlite_utils/db.py", line 2886, in convert_value
      return jsonify_if_needed(fn(v))
                               ~~^^^
    File "/home/hak8or/.cache/yay/sqlite-utils/src/sqlite_utils-3.38/tests/test_recipes.py", line 77, in <lambda>
      fresh_db["example"].convert("dt", lambda value: getattr(recipes, fn)(value))
                                                      ~~~~~~~~~~~~~~~~~~~~^^^^^^^
    File "/home/hak8or/.cache/yay/sqlite-utils/src/sqlite_utils-3.38/sqlite_utils/recipes.py", line 19, in parsedate
      parser.parse(value, dayfirst=dayfirst, yearfirst=yearfirst)
      ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.13/site-packages/dateutil/parser/_parser.py", line 1368, in parse
      return DEFAULTPARSER.parse(timestr, **kwargs)
             ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.13/site-packages/dateutil/parser/_parser.py", line 643, in parse
      raise ParserError("Unknown string format: %s", timestr)
  dateutil.parser._parser.ParserError: Unknown string format: invalid

With the full output on pastebin (since comment length here is limited); https://pastebin.com/bMr4dE1B

Apparently this has something to do with some sqlite-migrate plugin and there was some discussion here in the past about a patch file, but I am not seeing either here.