# issues

node_id: I_kwDOCGYnMM5undLy
title: Get rid of test.utils.collapse_whitespace
state: closed
created_at: 2023-08-17T23:31:09Z
updated_at: 2023-08-18T00:59:19Z
closed_at: 2023-08-18T00:59:19Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I have a neater pattern for this now - instead of: https://github.com/simonw/sqlite-utils/blob/1dc6b5aa644a92d3654f7068110ed7930989ce71/tests/test_create.py#L472-L475

  I now prefer:

  https://github.com/simonw/sqlite-utils/blob/1dc6b5aa644a92d3654f7068110ed7930989ce71/tests/test_create.py#L1163-L1171

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/583/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5YM-I3
title: .transform() instead of modifying sqlite_master for add_foreign_keys
state: closed
created_at: 2023-08-17T23:32:45Z
updated_at: 2023-08-18T00:48:13Z
closed_at: 2023-08-18T00:48:08Z
author_association: OWNER
pull_request: simonw/sqlite-utils/pulls/584
type: pull
body:
  Refs:
  - #577

  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--584.org.readthedocs.build/en/584/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/584/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5unpBz
title: De-tangling Metadata before Datasette 1.0
state: open
created_at: 2023-08-18T00:51:50Z
updated_at: 2023-08-24T18:28:27Z
author_association: CONTRIBUTOR
type: issue
body:
  Metadata in Datasette is a really powerful feature, but is a bit difficult to work with. It was initially a way to add "metadata" about your "data" in Datasette instances, like descriptions for databases/tables/columns, titles, source URLs, licenses, etc. But it later became the go-to spot for other Datasette features that have nothing to do with metadata, like permissions/plugins/canned queries. 

  Specifically, I've found the following problems when working with Datasette metadata:

  1. Metadata cannot be updated without re-starting the entire Datasette instance.
  2. The `metadata.json`/`metadata.yaml` has become a kitchen sink of unrelated (imo) features like plugin config, authentication config, canned queries
  3. The Python APIs for defining extra metadata are a bit awkward (the `datasette.metadata()` class, `get_metadata()` hook, etc.)

  ## Possible solutions

  Here's a few ideas of Datasette core changes we can make to address these problems. 

  ### Re-vamp the Datasette Python metadata APIs

  The Datasette object has a single `datasette.metadata()` method that's a bit difficult to work with. There's also no Python API for inserted new metadata, so plugins have to rely on the `get_metadata()` hook.

  The `get_metadata()` hook can also be improved - it doesn't work with async functions yet, so you're quite limited to what you can do.

  (I'm a bit fuzzy on what to actually do here, but I imagine it'll be very small breaking changes to a few Python methods)

  ### Add an optional `datasette_metadata` table

  Datasette should detect and use metadata stored in a new special table called `datasette_metadata`. This would be a regular table that a user can edit on their own, and would serve as a "live updating" source of metadata, than can be changed while the Datasette instance is running.

  Not too sure what the schema would look like, but I'd imagine:

  ```sql
  CREATE TABLE datasette_metadata(
    level text,
    target any,
    key text,
    value any,
    primary key (level, target)
  )
  ```

  Every row in this table would map to a single metadata "entry".

  - `level` would be one of "datasette", "database", "table", "column", which is the "level" the entry describes. For example, `level="table"` means it is metadata about a specific table, `level="database"` for a specific database, or `level="datasette"` for the entire Datasette instance.
  - `target` would "point" to the specific object the entry metadata is about, and would depend on what `level` is specific. 
    - `level="database"`: `target` would be the string name of the database that the metadata entry is about. ex `"fixtures"`
    - `level="table"`: `target` would be a JSON array of two strings. The first element would be the database name, and the second would be the table name. ex `["fixtures", "students"]`
    - `level="column"`: `target` would be a JSON array of 3 strings: The database name, table name, and column name. Ex `["fixtures", "students", "student_id"`]
  - `key` would be the type of metadata entry the row has, similar to the current "keys" that exist in `metadata.json`. Ex `"about_url"`, `"source"`, `"description"`, etc
  - `value` would be the text value of be metadata entry. The literal text value of a description, about_url, column_label, etc

  A quick sample:

  level | target | key | value
  -- | -- | -- | --
  datasette | NULL | title | my datasette title...
  db | fixtures | source | <description of my database source>
  table | ["fixtures", "students"] | label_column | student_name
  column | ["fixtures", "students", "birthdate"] | description | <description of the fixtures.students.birthdate column>

  This `datasette_metadata` would be configured with other tools, and hopefully not manually by end users. Datasette Core could also offer a UI for editing entries in `datasette_metadata`, to update descriptions/columns on the fly.

  ### Re-vamp `metadata.json` and move non-metadata config to another place

  The motivation behind this is that it's awkward that `metadata.json` contains config about things that are not strictly metadata, including:

  - Plugin configuration
  - [Authentication/permissions](https://docs.datasette.io/en/latest/authentication.html#access-permissions-in-metadata) (ex the `allow` key on datasettes/databases/tables
  - Canned queries. might be controversial, but in my mind, canned queries are application-specific code and configuration, and don't describe the data that exists in SQLite databases. 

  I think we should move these outside of `metadata.json` and into a different file. The `datasette.json` idea in  #2093 may be a good solution here: plugin/permissions/canned queries can be defined in `datasette.json`, while `metadata.json`/`datasette_metadata` will strictly be about documenting databases/tables/columns. 

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2143/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5unrLO
title: CLI equivalents to `transform(add_foreign_keys=)`
state: closed
created_at: 2023-08-18T01:07:15Z
updated_at: 2023-08-18T01:51:16Z
closed_at: 2023-08-18T01:51:15Z
author_association: OWNER
type: issue
state_reason: completed
body:
  The new options added in:
  - #577
  Deserve consideration in the CLI as well.

  https://github.com/simonw/sqlite-utils/blob/d2bcdc00c6ecc01a6e8135e775ffdb87572b802b/sqlite_utils/db.py#L1706-L1708

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/585/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5uoXeU
title: .transform() fails to drop column if table is part of a view
state: open
created_at: 2023-08-18T05:25:22Z
updated_at: 2023-08-18T06:13:47Z
author_association: OWNER
type: issue
body:
  I got this error trying to drop a column from a table that was part of a SQL view:

  > error in view plugins: no such table: main.pypi_releases

  Upon further investigation I found that this pattern seemed to fix it:
  ```python
  def transform_the_table(conn):
      # Run this in a transaction:
      with conn:
          # We have to read all the views first, because we need to drop and recreate them
          db = sqlite_utils.Database(conn)
          views = {v.name: v.schema for v in db.views if table.lower() in v.schema.lower()}
          for view in views.keys():
              db[view].drop()
          db[table].transform(
              types=types,
              rename=rename,
              drop=drop,
              column_order=[p[0] for p in order_pairs],
          )
          # Now recreate the views
          for name, schema in views.items():
              db.create_view(name, schema)
  ```
  So grab a copy of any view that might reference this table, start a transaction, drop those views, run the transform, recreate the views again.

  > I wonder if this should become an option in `sqlite-utils`? Maybe a `recreate_views=True` argument for `table.tranform(...)`? Should it be opt-in or opt-out?

  _Originally posted by @simonw in https://github.com/simonw/datasette-edit-schema/issues/35#issuecomment-1683370548_
              

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/586/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YQGcc
title: Bump the python-packages group with 3 updates
state: closed
created_at: 2023-08-18T13:49:37Z
updated_at: 2023-08-21T13:48:18Z
closed_at: 2023-08-21T13:48:16Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2144
type: pull
body:
  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).

  Updates `sphinx` from 7.1.2 to 7.2.2
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.2</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.1</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.0</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.2 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix the signature of the <code>StateMachine.insert_input()</code> patch,
  for when calling with keyword arguments.</li>
  <li>Fixed membership testing (<code>in</code>) for the :py:class:<code>str</code> interface
  of the asset classes (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>),
  which several extensions relied upon.</li>
  <li>Fixed a type error in <code>SingleFileHTMLBuilder._get_local_toctree</code>,
  <code>includehidden</code> may be passed as a string or a boolean.</li>
  <li>Fix <code>:noindex:</code> for <code>PyModule</code> and JSModule``.</li>
  </ul>
  <h1>Release 7.2.1 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Restored the the :py:class:<code>str</code> interface of the asset classes
  (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>), which several extensions relied upon.
  This will be removed in Sphinx 9.</li>
  <li>Restored calls to <code>Builder.add_{css,js}_file()</code>,
  which several extensions relied upon.</li>
  <li>Restored the private API <code>TocTree.get_toctree_ancestors()</code>,
  which several extensions relied upon.</li>
  </ul>
  <h1>Release 7.2.0 (released Aug 17, 2023)</h1>
  <h2>Dependencies</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11511">#11511</a>: Drop Python 3.8 support.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11576">#11576</a>: Require Pygments 2.14 or later.</li>
  </ul>
  <h2>Deprecated</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11512">#11512</a>: Deprecate <code>sphinx.util.md5</code> and <code>sphinx.util.sha1</code>.
  Use <code>hashlib</code> instead.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11526">#11526</a>: Deprecate <code>sphinx.testing.path</code>.
  Use <code>os.path</code> or <code>pathlib</code> instead.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11528">#11528</a>: Deprecate <code>sphinx.util.split_index_msg</code> and <code>sphinx.util.split_into</code>.
  Use <code>sphinx.util.index_entries.split_index_msg</code> instead.</li>
  <li>Deprecate <code>sphinx.builders.html.Stylesheet</code>
  and <code>sphinx.builders.html.Javascript</code>.
  Use <code>sphinx.application.Sphinx.add_css_file()</code></li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ed84d63e6f2c4fd43b97fc43ee8be4156a13af9e"><code>ed84d63</code></a> Bump to 7.2.2 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ea4a73e148022244bba027b86a8c2bf7067e97be"><code>ea4a73e</code></a> [bot]: Update message catalogues (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11612">#11612</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/e47846a812f09ae2ca9e0444ed227934c2eb9c6e"><code>e47846a</code></a> Fix <code>:noindex:</code> for <code>PyModule</code> and JSModule``</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/b2fc47fe3dd0adba46edbb21ef03102ecb997f89"><code>b2fc47f</code></a> Add CHANGES entry for renaming the <code>StateMachine.insert_input()</code> parameter</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/0835c3e8ea6b23fb12b29d9c5104e06595f400b6"><code>0835c3e</code></a> Fix regression in <code>SingleFileHTMLBuilder._get_local_toctree</code></li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/49dc0dd3999f66f27728b974394585422f10d947"><code>49dc0dd</code></a> Fix asset class string interface membership testing</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/8512855776ddd4790547d7e46ad98fd3ee48c2fb"><code>8512855</code></a> Fix signature of docutils include_source monkeypatch (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11610">#11610</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/e1d9068c60b43cf8dcb8dbd62ba26900eb63ff3b"><code>e1d9068</code></a> Bump version</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/441a9e4d622e5f00f9fed8f59b9cac251cff9f80"><code>441a9e4</code></a> Bump to 7.2.1 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ec3185373044c120298501dbe91444bdb6ccb04c"><code>ec31853</code></a> Restore <code>TocTree.get_toctree_ancestors()</code></li>
  <li>Additional commits viewable in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.2">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `furo` from 2023.7.26 to 2023.8.17
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <ul>
  <li>Update Python version classifiers.</li>
  <li>Increase the icon size in mobile header.</li>
  <li>Increase admonition title bg opacity.</li>
  <li>Change the default API background to transparent.</li>
  <li>Transition the API background change.</li>
  <li>Remove the &quot;indent&quot; of API entries which have a background.</li>
  <li>Break long inline code literals.</li>
  </ul>
  <h2>2022.12.07 -- Reverent Raspberry</h2>
  <ul>
  <li>✨ Add support for Sphinx 6.</li>
  <li>✨ Improve footnote presentation with docutils 0.18+.</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/99f4e6df480ac3d043c09d472acd69390f47e402"><code>99f4e6d</code></a> Prepare release: 2023.08.17</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/59ad807bc6f8c8b36bf5a0bad2609e7781d8aaf9"><code>59ad807</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/9b94420776972613c3990a31467855ceceefcff7"><code>9b94420</code></a> Accomodate for Sphinx 7.2 behavior change</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/7aeb6d204f808ae0b0da8a5dee6f6035d9cd04cf"><code>7aeb6d2</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/pradyunsg/furo/issues/675">#675</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/0c9be3f65d6ae84ff56d7679b7d650323b355be3"><code>0c9be3f</code></a> Back to development</li>
  <li>See full diff in <a href="https://github.com/pradyunsg/furo/compare/2023.07.26...2023.08.17">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `blacken-docs` from 1.15.0 to 1.16.0
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst">blacken-docs's changelog</a>.</em></p>
  <blockquote>
  <h2>1.16.0 (2023-08-16)</h2>
  <ul>
  <li>
  <p>Allow Markdown fence options.</p>
  <p>Thanks to initial work from Matthew Anderson in <code>PR [#246](https://github.com/asottile/blacken-docs/issues/246) &lt;https://github.com/adamchainz/blacken-docs/pull/246&gt;</code>__.</p>
  </li>
  <li>
  <p>Expand Markdown detection to all Python language names from Pygments: <code>py</code>, <code>sage</code>, <code>python3</code>, <code>py3</code>, and <code>numpy</code>.</p>
  </li>
  <li>
  <p>Preserve leading whitespace lines in reStructuredText code blocks.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#217](https://github.com/asottile/blacken-docs/issues/217) &lt;https://github.com/adamchainz/blacken-docs/issues/217&gt;</code>__.</p>
  </li>
  <li>
  <p>Use exit code 2 to indicate errors from Black, whilst exit code 1 remains for “files have been formatted”.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#218](https://github.com/asottile/blacken-docs/issues/218) &lt;https://github.com/adamchainz/blacken-docs/issues/218&gt;</code>__.</p>
  </li>
  <li>
  <p>Support passing the <code>--preview</code> option through to Black, to select the future style.</p>
  </li>
  <li>
  <p>Remove <code>language_version</code> from <code>.pre-commit-hooks.yaml</code>.
  This change allows <code>default_language_version</code> in ``.pre-commit-config.yaml` to take precedence.</p>
  <p>Thanks to Aneesh Agrawal in <code>PR [#258](https://github.com/asottile/blacken-docs/issues/258) &lt;https://github.com/adamchainz/blacken-docs/pull/258&gt;</code>__.</p>
  </li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/960ead214cd1184149d366c6d27ca6c369ce46b6"><code>960ead2</code></a> Version 1.16.0</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/8f0ed18ce69d35e7e631d2b01983ecf8248667a0"><code>8f0ed18</code></a> Support passing --preview through to Black (<a href="https://redirect.github.com/asottile/blacken-docs/issues/273">#273</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/4eb4e4cdbff31cde3d9ffdd7693d5b7dce4dc506"><code>4eb4e4c</code></a> Tweak changelog note</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/6c7450cfa90581b482d71b451b2d007361aa47c1"><code>6c7450c</code></a> Use exit code 2 to indicate errors (<a href="https://redirect.github.com/asottile/blacken-docs/issues/272">#272</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/99dfc8d0b402b9b7b0f0e723fc1d030063249eac"><code>99dfc8d</code></a> Preserve leading whitespace lines in rST (<a href="https://redirect.github.com/asottile/blacken-docs/issues/271">#271</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/94465e83e7253b4caef1e00fcb30b74ced33f08e"><code>94465e8</code></a> Reformat markdown tests with dedent() (<a href="https://redirect.github.com/asottile/blacken-docs/issues/270">#270</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/7cd5f30f0f9e014bda566a1893df3b9c7f9a2c48"><code>7cd5f30</code></a> Use .md in glob example</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/f97e56994178e079ab807cebe54c2044f7b2ae55"><code>f97e569</code></a> Document applying to many files (<a href="https://redirect.github.com/asottile/blacken-docs/issues/269">#269</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/ae612b095b5005eee8c3ab9fe65a248d7654582d"><code>ae612b0</code></a> Expand Markdown detection to all Python language names (<a href="https://redirect.github.com/asottile/blacken-docs/issues/268">#268</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/da9b4557afc9b820c40b8d6bdb8f515c6cdec0f5"><code>da9b455</code></a> Replace NamedTuple with plain class (<a href="https://redirect.github.com/asottile/blacken-docs/issues/267">#267</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> dependency` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name> dependency` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2144.org.readthedocs.build/en/2144/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2144/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5usyVt
title: If a row has a primary key of `null` various things break
state: open
created_at: 2023-08-18T20:06:28Z
updated_at: 2023-08-21T17:30:01Z
author_association: OWNER
type: issue
body:
  Stumbled across this while experimenting with `datasette-write-ui`. The error I got was a 500 on the `/db` page:

  > `'NoneType' object has no attribute 'encode'`

  Tracked it down to this code, which assembles the URL for a row page:

  https://github.com/simonw/datasette/blob/943df09dcca93c3b9861b8c96277a01320db8662/datasette/utils/__init__.py#L120-L134

  That's because `tilde_encode` can't handle `None`: https://github.com/simonw/datasette/blob/943df09dcca93c3b9861b8c96277a01320db8662/datasette/utils/__init__.py#L1175-L1178

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2145/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5uvI_4
state: closed
created_at: 2023-08-19T20:01:26Z
updated_at: 2023-08-19T20:04:33Z
closed_at: 2023-08-19T20:04:32Z
author_association: OWNER
type: issue
state_reason: completed
title:
  New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference

body:
  Extremely detailed story of how I got to this point:

  - https://github.com/simonw/llm/issues/162

  Steps to reproduce (only if that pragma is on though):
  ```bash
  python -c '
  import sqlite_utils
  db = sqlite_utils.Database(memory=True)
  db.execute("""
  CREATE TABLE "logs" (
     [id] INTEGER PRIMARY KEY,
     [model] TEXT,
     [prompt] TEXT,
     [system] TEXT,
     [prompt_json] TEXT,
     [options_json] TEXT,
     [response] TEXT,
     [response_json] TEXT,
     [reply_to_id] INTEGER,
     [chat_id] INTEGER REFERENCES [log]([id]),
     [duration_ms] INTEGER,
     [datetime_utc] TEXT
  );
  """)
  db["logs"].add_foreign_key("reply_to_id", "logs", "id")
  '
  ```
  This succeeds in some environments, fails in others.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/587/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5uwk9Z
title: Plugin hook for database queries that are run
state: open
created_at: 2023-08-20T18:43:50Z
updated_at: 2023-08-24T03:54:35Z
author_association: NONE
type: issue
body:
  I'm interested in making a plugin that saves every query that gets run to a table in the database. (I know about datasette-query-history but thought it would be good to have a server-side option.)

  As far as I can tell reading the docs, there isn't really a hook setup to allow this.

  Maybe I could hack it with some of the hooks that are passed requests, but that doesn't seem good.

  I'm a little surprised this isn't possible, so I thought I would open an issue and see if that's a deeply considered decision or just "haven't needed it yet." I'm potentially interested in implementing the hook if the latter.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2147/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YY5Ea
title: Bump sphinx, furo, blacken-docs dependencies
state: closed
created_at: 2023-08-21T13:48:11Z
updated_at: 2023-08-29T00:15:31Z
closed_at: 2023-08-29T00:15:27Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2148
type: pull
body:
  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).

  Updates `sphinx` from 7.1.2 to 7.2.2
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.2</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.1</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.0</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.2 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix the signature of the <code>StateMachine.insert_input()</code> patch,
  for when calling with keyword arguments.</li>
  <li>Fixed membership testing (<code>in</code>) for the :py:class:<code>str</code> interface
  of the asset classes (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>),
  which several extensions relied upon.</li>
  <li>Fixed a type error in <code>SingleFileHTMLBuilder._get_local_toctree</code>,
  <code>includehidden</code> may be passed as a string or a boolean.</li>
  <li>Fix <code>:noindex:</code> for <code>PyModule</code> and JSModule``.</li>
  </ul>
  <h1>Release 7.2.1 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Restored the the :py:class:<code>str</code> interface of the asset classes
  (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>), which several extensions relied upon.
  This will be removed in Sphinx 9.</li>
  <li>Restored calls to <code>Builder.add_{css,js}_file()</code>,
  which several extensions relied upon.</li>
  <li>Restored the private API <code>TocTree.get_toctree_ancestors()</code>,
  which several extensions relied upon.</li>
  </ul>
  <h1>Release 7.2.0 (released Aug 17, 2023)</h1>
  <h2>Dependencies</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11511">#11511</a>: Drop Python 3.8 support.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11576">#11576</a>: Require Pygments 2.14 or later.</li>
  </ul>
  <h2>Deprecated</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11512">#11512</a>: Deprecate <code>sphinx.util.md5</code> and <code>sphinx.util.sha1</code>.
  Use <code>hashlib</code> instead.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11526">#11526</a>: Deprecate <code>sphinx.testing.path</code>.
  Use <code>os.path</code> or <code>pathlib</code> instead.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11528">#11528</a>: Deprecate <code>sphinx.util.split_index_msg</code> and <code>sphinx.util.split_into</code>.
  Use <code>sphinx.util.index_entries.split_index_msg</code> instead.</li>
  <li>Deprecate <code>sphinx.builders.html.Stylesheet</code>
  and <code>sphinx.builders.html.Javascript</code>.
  Use <code>sphinx.application.Sphinx.add_css_file()</code></li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ed84d63e6f2c4fd43b97fc43ee8be4156a13af9e"><code>ed84d63</code></a> Bump to 7.2.2 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ea4a73e148022244bba027b86a8c2bf7067e97be"><code>ea4a73e</code></a> [bot]: Update message catalogues (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11612">#11612</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/e47846a812f09ae2ca9e0444ed227934c2eb9c6e"><code>e47846a</code></a> Fix <code>:noindex:</code> for <code>PyModule</code> and JSModule``</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/b2fc47fe3dd0adba46edbb21ef03102ecb997f89"><code>b2fc47f</code></a> Add CHANGES entry for renaming the <code>StateMachine.insert_input()</code> parameter</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/0835c3e8ea6b23fb12b29d9c5104e06595f400b6"><code>0835c3e</code></a> Fix regression in <code>SingleFileHTMLBuilder._get_local_toctree</code></li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/49dc0dd3999f66f27728b974394585422f10d947"><code>49dc0dd</code></a> Fix asset class string interface membership testing</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/8512855776ddd4790547d7e46ad98fd3ee48c2fb"><code>8512855</code></a> Fix signature of docutils include_source monkeypatch (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11610">#11610</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/e1d9068c60b43cf8dcb8dbd62ba26900eb63ff3b"><code>e1d9068</code></a> Bump version</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/441a9e4d622e5f00f9fed8f59b9cac251cff9f80"><code>441a9e4</code></a> Bump to 7.2.1 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ec3185373044c120298501dbe91444bdb6ccb04c"><code>ec31853</code></a> Restore <code>TocTree.get_toctree_ancestors()</code></li>
  <li>Additional commits viewable in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.2">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `furo` from 2023.7.26 to 2023.8.19
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.08.19 -- Xenolithic Xanadu</h2>
  <ul>
  <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li>
  <li>Drop support for Python 3.7.</li>
  <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li>
  <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li>
  </ul>
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <ul>
  <li>Update Python version classifiers.</li>
  <li>Increase the icon size in mobile header.</li>
  <li>Increase admonition title bg opacity.</li>
  <li>Change the default API background to transparent.</li>
  <li>Transition the API background change.</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/0766bb2d6d0392bf90d4e4ac447ae721fa673ee9"><code>0766bb2</code></a> Prepare release: 2023.08.19</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/807d73cb1080a1c9b8321a1dcffd84aee73e859a"><code>807d73c</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/364b2611f27e463cd1f879bf348975c01294ffc0"><code>364b261</code></a> Accomodate for the required <code>data-content_root</code> for search</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/0d38bc6cffc528ce3cf742fe2bd20e83c46d7891"><code>0d38bc6</code></a> Simplify retrieval of <code>pygments_dark_style</code> value (<a href="https://redirect.github.com/pradyunsg/furo/issues/699">#699</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/3631ffc4ea2f241b89bbd9b6c9d76e52a4226c56"><code>3631ffc</code></a> Use <code>sphinx.errors.ConfigError</code> (<a href="https://redirect.github.com/pradyunsg/furo/issues/697">#697</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/d2e2448852752ec570313bc1daea3bda56069816"><code>d2e2448</code></a> Remove duplicate HTML builder check (<a href="https://redirect.github.com/pradyunsg/furo/issues/698">#698</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/7b4f1308832e99d8e49c80f24665e938673c1644"><code>7b4f130</code></a> Drop Python 3.7 (<a href="https://redirect.github.com/pradyunsg/furo/issues/701">#701</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/e322b71b10c959cce0af80d3ac6934725ce728bb"><code>e322b71</code></a> Remove pointless assert (<a href="https://redirect.github.com/pradyunsg/furo/issues/702">#702</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/ee2097a797e92f1155a17287d063b3181f137115"><code>ee2097a</code></a> Bump <code>require_sphinx()</code> to Sphinx 6.0 (<a href="https://redirect.github.com/pradyunsg/furo/issues/700">#700</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c1ff10b768aaa2a2e479bbf8d58187e12a2731ac"><code>c1ff10b</code></a> Back to development</li>
  <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2023.07.26...2023.08.19">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `blacken-docs` from 1.15.0 to 1.16.0
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst">blacken-docs's changelog</a>.</em></p>
  <blockquote>
  <h2>1.16.0 (2023-08-16)</h2>
  <ul>
  <li>
  <p>Allow Markdown fence options.</p>
  <p>Thanks to initial work from Matthew Anderson in <code>PR [#246](https://github.com/asottile/blacken-docs/issues/246) &lt;https://github.com/adamchainz/blacken-docs/pull/246&gt;</code>__.</p>
  </li>
  <li>
  <p>Expand Markdown detection to all Python language names from Pygments: <code>py</code>, <code>sage</code>, <code>python3</code>, <code>py3</code>, and <code>numpy</code>.</p>
  </li>
  <li>
  <p>Preserve leading whitespace lines in reStructuredText code blocks.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#217](https://github.com/asottile/blacken-docs/issues/217) &lt;https://github.com/adamchainz/blacken-docs/issues/217&gt;</code>__.</p>
  </li>
  <li>
  <p>Use exit code 2 to indicate errors from Black, whilst exit code 1 remains for “files have been formatted”.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#218](https://github.com/asottile/blacken-docs/issues/218) &lt;https://github.com/adamchainz/blacken-docs/issues/218&gt;</code>__.</p>
  </li>
  <li>
  <p>Support passing the <code>--preview</code> option through to Black, to select the future style.</p>
  </li>
  <li>
  <p>Remove <code>language_version</code> from <code>.pre-commit-hooks.yaml</code>.
  This change allows <code>default_language_version</code> in ``.pre-commit-config.yaml` to take precedence.</p>
  <p>Thanks to Aneesh Agrawal in <code>PR [#258](https://github.com/asottile/blacken-docs/issues/258) &lt;https://github.com/adamchainz/blacken-docs/pull/258&gt;</code>__.</p>
  </li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/960ead214cd1184149d366c6d27ca6c369ce46b6"><code>960ead2</code></a> Version 1.16.0</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/8f0ed18ce69d35e7e631d2b01983ecf8248667a0"><code>8f0ed18</code></a> Support passing --preview through to Black (<a href="https://redirect.github.com/asottile/blacken-docs/issues/273">#273</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/4eb4e4cdbff31cde3d9ffdd7693d5b7dce4dc506"><code>4eb4e4c</code></a> Tweak changelog note</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/6c7450cfa90581b482d71b451b2d007361aa47c1"><code>6c7450c</code></a> Use exit code 2 to indicate errors (<a href="https://redirect.github.com/asottile/blacken-docs/issues/272">#272</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/99dfc8d0b402b9b7b0f0e723fc1d030063249eac"><code>99dfc8d</code></a> Preserve leading whitespace lines in rST (<a href="https://redirect.github.com/asottile/blacken-docs/issues/271">#271</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/94465e83e7253b4caef1e00fcb30b74ced33f08e"><code>94465e8</code></a> Reformat markdown tests with dedent() (<a href="https://redirect.github.com/asottile/blacken-docs/issues/270">#270</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/7cd5f30f0f9e014bda566a1893df3b9c7f9a2c48"><code>7cd5f30</code></a> Use .md in glob example</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/f97e56994178e079ab807cebe54c2044f7b2ae55"><code>f97e569</code></a> Document applying to many files (<a href="https://redirect.github.com/asottile/blacken-docs/issues/269">#269</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/ae612b095b5005eee8c3ab9fe65a248d7654582d"><code>ae612b0</code></a> Expand Markdown detection to all Python language names (<a href="https://redirect.github.com/asottile/blacken-docs/issues/268">#268</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/da9b4557afc9b820c40b8d6bdb8f515c6cdec0f5"><code>da9b455</code></a> Replace NamedTuple with plain class (<a href="https://redirect.github.com/asottile/blacken-docs/issues/267">#267</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> dependency` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name> dependency` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2148.org.readthedocs.build/en/2148/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2148/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YhH-W
title: Start a new `datasette.yaml` configuration file, with settings support
state: closed
created_at: 2023-08-22T16:24:16Z
updated_at: 2023-08-23T01:26:11Z
closed_at: 2023-08-23T01:26:11Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2149
type: pull
body:
  refs #2093 #2143 

  This is the first step to implementing the new `datasette.yaml`/`datasette.json` configuration file. 

  - The old `--config` argument is now back, and is the path to a `datasette.yaml` file. Acts like the `--metadata` flag.
  - The old `settings.json` behavior has been removed.
  - The `"settings"` key inside `datasette.yaml` defines the same `--settings` flags
  - Values passed in `--settings` will over-write values in `datasette.yaml`

  Docs for the Config file is pretty light, not much to add until we add more config to the file.

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2149.org.readthedocs.build/en/2149/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2149/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vF37f
title: form label { width: 15% } is a bad default
state: closed
created_at: 2023-08-23T18:22:27Z
updated_at: 2023-08-23T18:37:18Z
closed_at: 2023-08-23T18:35:48Z
author_association: OWNER
type: issue
state_reason: completed
body:
  See:
  - https://github.com/simonw/datasette-configure-fts/issues/14
  - https://github.com/simonw/datasette-auth-tokens/issues/12

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2150/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Yo7bk
title: Test Datasette on multiple SQLite versions
state: open
created_at: 2023-08-23T22:42:51Z
updated_at: 2023-08-23T22:58:13Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2151
type: pull
body:
  still testing, hope it works!

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2151.org.readthedocs.build/en/2151/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2151/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YsfZ7
title: Bump the python-packages group with 3 updates
state: closed
created_at: 2023-08-24T13:34:44Z
updated_at: 2023-08-28T13:49:39Z
closed_at: 2023-08-28T13:49:37Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2152
type: pull
body:
  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).

  Updates `sphinx` from 7.1.2 to 7.2.3
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.3</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.2</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.1</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.0</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.3 (released Aug 23, 2023)</h1>
  <h2>Dependencies</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11576">#11576</a>: Require sphinxcontrib-serializinghtml 1.1.9.</li>
  </ul>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix regression in <code>autodoc.Documenter.parse_name()</code>.</li>
  <li>Fix regression in JSON serialisation.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11543">#11543</a>: autodoc: Support positional-only parameters in <code>classmethod</code> methods
  when <code>autodoc_preserve_defaults</code> is <code>True</code>.</li>
  <li>Restore support string methods on path objects.
  This is deprecated and will be removed in Sphinx 8.
  Use :py:func<code>os.fspath</code> to convert :py:class:<del><code>pathlib.Path</code> objects to strings,
  or :py:class:</del><code>pathlib.Path</code>'s methods to work with path objects.</li>
  </ul>
  <h1>Release 7.2.2 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix the signature of the <code>StateMachine.insert_input()</code> patch,
  for when calling with keyword arguments.</li>
  <li>Fixed membership testing (<code>in</code>) for the :py:class:<code>str</code> interface
  of the asset classes (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>),
  which several extensions relied upon.</li>
  <li>Fixed a type error in <code>SingleFileHTMLBuilder._get_local_toctree</code>,
  <code>includehidden</code> may be passed as a string or a boolean.</li>
  <li>Fix <code>:noindex:</code> for <code>PyModule</code> and JSModule``.</li>
  </ul>
  <h1>Release 7.2.1 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Restored the the :py:class:<code>str</code> interface of the asset classes
  (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>), which several extensions relied upon.
  This will be removed in Sphinx 9.</li>
  <li>Restored calls to <code>Builder.add_{css,js}_file()</code>,
  which several extensions relied upon.</li>
  <li>Restored the private API <code>TocTree.get_toctree_ancestors()</code>,
  which several extensions relied upon.</li>
  </ul>
  <p>Release 7.2.0 (released Aug 17, 2023)</p>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2f6ea1422b08f9494f34b80c2ff6c96b5f396fdc"><code>2f6ea14</code></a> Bump to 7.2.3 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/511e4070aa429a41eac04e88d96806c8fd0a5cc7"><code>511e407</code></a> Implement <code>bool()</code> for string paths</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/494de7327f23e1b8a09f4e327f6d4cdf4e351013"><code>494de73</code></a> Implement <code>hash()</code> for string paths</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2986aa113c61c23346e4097f1055172a363e66cc"><code>2986aa1</code></a> Override special methods for string paths</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/07b87e9512e88597894db31178c434cf3e3b0c28"><code>07b87e9</code></a> Update CHANGES for 7.2.3</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/6b17dd1b282def42aa868a4d04d56bea00f473ee"><code>6b17dd1</code></a> Support string methods on path objects (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11619">#11619</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/a73fb59a71f205b9bae90ac28f65dd5c1e48ed9b"><code>a73fb59</code></a> Support positional-only parameters in classmethods (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11635">#11635</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/02cb02ccfb3736e9bc95df9e7a774f4799cf5f9f"><code>02cb02c</code></a> Fix invocation of <code>python -m sphinx build</code></li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/6183b6abee561fc71c88fc66416d31a8f8ca009f"><code>6183b6a</code></a> Require sphinxcontrib-serializinghtml 1.1.9 or later</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/1e16f21019833d672e9af8ce8b65fe21a40246b2"><code>1e16f21</code></a> Fix regression in <code>autodoc.Documenter.parse_name</code> (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11613">#11613</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.3">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `furo` from 2023.7.26 to 2023.8.19
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.08.19 -- Xenolithic Xanadu</h2>
  <ul>
  <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li>
  <li>Drop support for Python 3.7.</li>
  <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li>
  <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li>
  </ul>
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <ul>
  <li>Update Python version classifiers.</li>
  <li>Increase the icon size in mobile header.</li>
  <li>Increase admonition title bg opacity.</li>
  <li>Change the default API background to transparent.</li>
  <li>Transition the API background change.</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/0766bb2d6d0392bf90d4e4ac447ae721fa673ee9"><code>0766bb2</code></a> Prepare release: 2023.08.19</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/807d73cb1080a1c9b8321a1dcffd84aee73e859a"><code>807d73c</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/364b2611f27e463cd1f879bf348975c01294ffc0"><code>364b261</code></a> Accomodate for the required <code>data-content_root</code> for search</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/0d38bc6cffc528ce3cf742fe2bd20e83c46d7891"><code>0d38bc6</code></a> Simplify retrieval of <code>pygments_dark_style</code> value (<a href="https://redirect.github.com/pradyunsg/furo/issues/699">#699</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/3631ffc4ea2f241b89bbd9b6c9d76e52a4226c56"><code>3631ffc</code></a> Use <code>sphinx.errors.ConfigError</code> (<a href="https://redirect.github.com/pradyunsg/furo/issues/697">#697</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/d2e2448852752ec570313bc1daea3bda56069816"><code>d2e2448</code></a> Remove duplicate HTML builder check (<a href="https://redirect.github.com/pradyunsg/furo/issues/698">#698</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/7b4f1308832e99d8e49c80f24665e938673c1644"><code>7b4f130</code></a> Drop Python 3.7 (<a href="https://redirect.github.com/pradyunsg/furo/issues/701">#701</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/e322b71b10c959cce0af80d3ac6934725ce728bb"><code>e322b71</code></a> Remove pointless assert (<a href="https://redirect.github.com/pradyunsg/furo/issues/702">#702</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/ee2097a797e92f1155a17287d063b3181f137115"><code>ee2097a</code></a> Bump <code>require_sphinx()</code> to Sphinx 6.0 (<a href="https://redirect.github.com/pradyunsg/furo/issues/700">#700</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c1ff10b768aaa2a2e479bbf8d58187e12a2731ac"><code>c1ff10b</code></a> Back to development</li>
  <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2023.07.26...2023.08.19">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `blacken-docs` from 1.15.0 to 1.16.0
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst">blacken-docs's changelog</a>.</em></p>
  <blockquote>
  <h2>1.16.0 (2023-08-16)</h2>
  <ul>
  <li>
  <p>Allow Markdown fence options.</p>
  <p>Thanks to initial work from Matthew Anderson in <code>PR [#246](https://github.com/asottile/blacken-docs/issues/246) &lt;https://github.com/adamchainz/blacken-docs/pull/246&gt;</code>__.</p>
  </li>
  <li>
  <p>Expand Markdown detection to all Python language names from Pygments: <code>py</code>, <code>sage</code>, <code>python3</code>, <code>py3</code>, and <code>numpy</code>.</p>
  </li>
  <li>
  <p>Preserve leading whitespace lines in reStructuredText code blocks.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#217](https://github.com/asottile/blacken-docs/issues/217) &lt;https://github.com/adamchainz/blacken-docs/issues/217&gt;</code>__.</p>
  </li>
  <li>
  <p>Use exit code 2 to indicate errors from Black, whilst exit code 1 remains for “files have been formatted”.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#218](https://github.com/asottile/blacken-docs/issues/218) &lt;https://github.com/adamchainz/blacken-docs/issues/218&gt;</code>__.</p>
  </li>
  <li>
  <p>Support passing the <code>--preview</code> option through to Black, to select the future style.</p>
  </li>
  <li>
  <p>Remove <code>language_version</code> from <code>.pre-commit-hooks.yaml</code>.
  This change allows <code>default_language_version</code> in ``.pre-commit-config.yaml` to take precedence.</p>
  <p>Thanks to Aneesh Agrawal in <code>PR [#258](https://github.com/asottile/blacken-docs/issues/258) &lt;https://github.com/adamchainz/blacken-docs/pull/258&gt;</code>__.</p>
  </li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/960ead214cd1184149d366c6d27ca6c369ce46b6"><code>960ead2</code></a> Version 1.16.0</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/8f0ed18ce69d35e7e631d2b01983ecf8248667a0"><code>8f0ed18</code></a> Support passing --preview through to Black (<a href="https://redirect.github.com/asottile/blacken-docs/issues/273">#273</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/4eb4e4cdbff31cde3d9ffdd7693d5b7dce4dc506"><code>4eb4e4c</code></a> Tweak changelog note</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/6c7450cfa90581b482d71b451b2d007361aa47c1"><code>6c7450c</code></a> Use exit code 2 to indicate errors (<a href="https://redirect.github.com/asottile/blacken-docs/issues/272">#272</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/99dfc8d0b402b9b7b0f0e723fc1d030063249eac"><code>99dfc8d</code></a> Preserve leading whitespace lines in rST (<a href="https://redirect.github.com/asottile/blacken-docs/issues/271">#271</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/94465e83e7253b4caef1e00fcb30b74ced33f08e"><code>94465e8</code></a> Reformat markdown tests with dedent() (<a href="https://redirect.github.com/asottile/blacken-docs/issues/270">#270</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/7cd5f30f0f9e014bda566a1893df3b9c7f9a2c48"><code>7cd5f30</code></a> Use .md in glob example</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/f97e56994178e079ab807cebe54c2044f7b2ae55"><code>f97e569</code></a> Document applying to many files (<a href="https://redirect.github.com/asottile/blacken-docs/issues/269">#269</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/ae612b095b5005eee8c3ab9fe65a248d7654582d"><code>ae612b0</code></a> Expand Markdown detection to all Python language names (<a href="https://redirect.github.com/asottile/blacken-docs/issues/268">#268</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/da9b4557afc9b820c40b8d6bdb8f515c6cdec0f5"><code>da9b455</code></a> Replace NamedTuple with plain class (<a href="https://redirect.github.com/asottile/blacken-docs/issues/267">#267</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2152.org.readthedocs.build/en/2152/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2152/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vLS_V
title: Datasette --get --actor option
state: closed
created_at: 2023-08-24T14:00:03Z
updated_at: 2023-08-28T20:19:15Z
closed_at: 2023-08-28T20:15:53Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I experimented with a prototype of this here:
  - https://github.com/simonw/datasette/issues/2102#issuecomment-1691037971_

  Which lets me run requests as if they belonged to a specific actor like this:

  ```bash
  datasette fixtures.db --get '/fixtures/facetable.json' --actor '{
      "_r": {
          "r": {
              "fixtures": {
                  "facetable": [
                      "vt"
                  ]
              }
          }
      },
      "a": "user"
  }'
  ```

  Really useful for testing actors an `_r` options. Is this worth adding as a feature?

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2153/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Ys3C5
title: Cascade for restricted token view-table/view-database/view-instance operations
state: closed
created_at: 2023-08-24T14:24:23Z
updated_at: 2023-08-29T16:32:35Z
closed_at: 2023-08-29T16:32:34Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2154
type: pull
body:
  Refs:
  - #2102

  Also includes a prototype implementation of `--actor option` which I'm using for testing this, from:
  - #2153

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2154.org.readthedocs.build/en/2154/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2154/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Yt2eO
title: Fix hupper.start_reloader entry point
state: open
created_at: 2023-08-24T17:14:08Z
updated_at: 2023-09-27T18:44:02Z
author_association: FIRST_TIME_CONTRIBUTOR
pull_request: simonw/datasette/pulls/2155
type: pull
body:
  Update hupper's entry point so that click commands are processed properly.

  Fixes #2123

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2155.org.readthedocs.build/en/2155/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2155/reactions", "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 2, "eyes": 0}


node_id: I_kwDOBm6k_c5vM4zD
title: datasette -s/--setting option for setting nested configuration options
state: open
created_at: 2023-08-24T18:09:27Z
updated_at: 2023-08-28T19:33:05Z
author_association: OWNER
type: issue
body:
  > I've been thinking about what it might look like to allow command-line arguments to be used to define _any_ of the configuration options in `datasette.yml`, as alternative and more convenient syntax.
  >
  > Here's what I've come up with:
  > ```
  > datasette \
  >   -s settings.sql_time_limit_ms 1000 \
  >   -s plugins.datasette-auth-tokens.manage_tokens true \
  >   -s plugins.datasette-auth-tokens.manage_tokens_database tokens \
  >  mydatabase.db tokens.db
  > ```
  > Which would be equivalent to `datasette.yml` containing this:
  > ```yaml
  > plugins:
  >   datasette-auth-tokens:
  >     manage_tokens: true
  >     manage_tokens_database: tokens
  > settings:
  >   sql_time_limit_ms: 1000
  > ```
  More details in https://github.com/simonw/datasette/issues/2143#issuecomment-1690792514
              

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2156/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vNueV
title: Proposal: Make the `_internal` database persistent, customizable, and hidden
state: open
created_at: 2023-08-24T20:54:29Z
updated_at: 2023-08-31T02:45:56Z
author_association: CONTRIBUTOR
type: issue
body:
  The current `_internal` database is used by Datasette core to cache info about databases/tables/columns/foreign keys of databases in a Datasette instance. It's a temporary database created at startup, that can only be seen by the root user. See an [example `_internal` DB here](https://latest.datasette.io/_internal), after [logging in as root](https://latest.datasette.io/login-as-root).

  The current `_internal` database has a few rough edges:

  - It's part of `datasette.databases`, so many plugins have to specifically exclude `_internal` from their queries [examples here](https://github.com/search?q=datasette+hookimpl+%22_internal%22+language%3APython+-path%3Adatasette%2F&ref=opensearch&type=code)
  - It's only used by Datasette core and can't be used by plugins or 3rd parties
  - It's created from scratch at startup and stored in memory. Why is fine, the performance is great, but persistent storage would be nice.

  Additionally, it would be really nice if plugins could use this `_internal` database to store their own configuration, secrets, and settings. For example:

  - `datasette-auth-tokens` [creates a `_datasette_auth_tokens` table](https://github.com/simonw/datasette-auth-tokens/blob/main/datasette_auth_tokens/__init__.py#L15) to store auth token metadata. This could be moved into the `_internal` database to avoid writing to the gues database
  - `datasette-socrata` [creates a `socrata_imports`](https://github.com/simonw/datasette-socrata/blob/1409aa9b4d2fc3aff286b52e73af33b5786d56d0/datasette_socrata/__init__.py#L190-L198) table, which also can be in `_internal`
  - `datasette-upload-csvs` [creates a `_csv_progress_`](https://github.com/simonw/datasette-upload-csvs/blob/main/datasette_upload_csvs/__init__.py#L154) table, which can be in `_internal`
  - `datasette-write-ui` wants to have the ability for users to toggle whether a table appears editable, which can be either in `datasette.yaml` or on-the-fly by storing config in `_internal`


  In general, these are specific features that Datasette plugins would have access to if there was a central internal database they could read/write to:

  - **Dynamic configuration**. Changing the `datasette.yaml` file works, but can be tedious to restart the server every time. Plugins can define their own configuration table in `_internal`, and could read/write to it to store configuration based on user actions (cell menu click, API access, etc.)
  - **Caching**. If a plugin or Datasette Core needs to cache some expensive computation, they can store it inside `_internal` (possibly as a temporary table) instead of managing their own caching solution.
  - **Audit logs**. If a plugin performs some sensitive operations, they can log usage info to `_internal` for others to audit later. 
  - **Long running process status**. Many plugins (`datasette-upload-csvs`, `datasette-litestream`, `datasette-socrata`) perform tasks that run for a really long time, and want to give continue status updates to the user. They can store this info inside` _internal`
  - **Safer authentication**. Passwords and authentication plugins usually store credentials/hashed secrets in configuration files or environment variables, which can be difficult to handle. Now, they can store them in `_internal` 

  ## Proposal

  - We remove `_internal` from [`datasette.databases`](https://docs.datasette.io/en/latest/internals.html#databases) property.
  - We add new `datasette.get_internal_db()` method that returns the `_internal` database, for plugins to use
  - We add a new `--internal internal.db` flag. If provided, then the `_internal` DB will be sourced from that file, and further updates will be persisted to that file (instead of an in-memory database)
  - When creating internal.db, create a new `_datasette_internal` table to mark it a an "datasette internal database"
  - In `datasette serve`, we check for the existence of the `_datasette_internal` table. If it exists, we assume the user provided that file in error and raise an error. This is to limit the chance that someone accidentally publishes their internal database to the internet. We could optionally add a `--unsafe-allow-internal` flag (or database plugin) that allows someone to do this if they really want to.


  ## New features unlocked with this

  These features don't really need a standardized `_internal` table per-say (plugins could currently configure their own long-time storage features if they really wanted to), but it would make it much simpler to create these kinds of features with a persistent application database.

  - **`datasette-comments`** : A plugin for commenting on rows or specific values in a database. Comment contents + threads + email notification info can be stored in `_internal`
  - **Bookmarks**: "Bookmarking" an SQL query could be stored in `_internal`, or a URL link shortener
  - **Webhooks**: If a plugin wants to either consume a webhook or create a new one, they can store hashed credentials/API endpoints in `_internal`

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2157/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YvQSi
title: add brand option to metadata.json.
state: open
created_at: 2023-08-24T22:37:41Z
updated_at: 2023-08-24T22:37:57Z
author_association: FIRST_TIME_CONTRIBUTOR
pull_request: simonw/datasette/pulls/2158
type: pull
body:
  This adds a brand link to the top navbar if 'brand' key is populated in metadata.json. The link will be either '#' or use the contents of 'brand_url' in metadata.json for href.

  I was able to get this done on my own site by replacing `templates/_crumbs.html` with a custom version, but I thought it would be nice to incorporate this in the tool directly.

  ![image](https://github.com/simonw/datasette/assets/52261150/fdfe9bb5-fee4-466c-8074-6132071d94e6)


  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2158.org.readthedocs.build/en/2158/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2158/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5YyF-C
title: Implement Dark Mode colour scheme
state: open
created_at: 2023-08-25T10:46:23Z
updated_at: 2023-08-25T10:46:35Z
author_association: FIRST_TIME_CONTRIBUTOR
pull_request: simonw/datasette/pulls/2159
type: pull
body:
  Closes #2095.


  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2159.org.readthedocs.build/en/2159/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2159/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5vYk_Y
title: `table.get(column=value)` option for retrieving things not by their primary key
state: open
created_at: 2023-08-28T00:41:23Z
updated_at: 2023-08-28T00:41:54Z
author_association: OWNER
type: issue
body:
  This came up working on this feature:
  - https://github.com/simonw/llm/pull/186

  I have a table with this schema:
  ```sql
  CREATE TABLE [collections] (
     [id] INTEGER PRIMARY KEY,
     [name] TEXT,
     [model] TEXT
  );
  CREATE UNIQUE INDEX [idx_collections_name]
      ON [collections] ([name]);
  ```
  So the primary key is an integer (because it's going to have a huge number of rows foreign key related to it, and I don't want to store a larger text value thousands of times), but there is a unique constraint on the `name` - that would be the primary key column if not for all of those foreign keys.

  Problem is, fetching the collection by name is actually pretty inconvenient.

  Fetch by numeric ID:

  ```python
  try:
      table["collections"].get(1)
  except NotFoundError:
      # It doesn't exist
  ```
  Fetching by name:
  ```python
  def get_collection(db, collection):
      rows = db["collections"].rows_where("name = ?", [collection])
      try:
          return next(rows)
      except StopIteration:
          raise NotFoundError("Collection not found: {}".format(collection))
  ```
  It would be neat if, for columns where we know that we should always get 0 or one result, we could do this instead:
  ```python
  try:
      collection = table["collections"].get(name="entries")
  except NotFoundError:
      # It doesn't exist
  ```
  The existing `.get()` method doesn't have any non-positional arguments, so using `**kwargs` like that should work:

  https://github.com/simonw/sqlite-utils/blob/1260bdc7bfe31c36c272572c6389125f8de6ef71/sqlite_utils/db.py#L1495

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/588/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Y8AN0
title: Bump sphinx, furo, blacken-docs dependencies
state: closed
created_at: 2023-08-28T13:49:31Z
updated_at: 2023-08-29T00:38:33Z
closed_at: 2023-08-29T00:38:32Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2160
type: pull
body:
  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [blacken-docs](https://github.com/asottile/blacken-docs).

  Updates `sphinx` from 7.1.2 to 7.2.4
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.4</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.3</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.2</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.1</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  <h2>Sphinx 7.2.0</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.4 (released Aug 28, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11618">#11618</a>: Fix a regression in the MoveModuleTargets transform,
  introduced in <a href="https://redirect.github.com/sphinx-doc/sphinx/issues/10478">#10478</a> (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/9662">#9662</a>).</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11649">#11649</a>: linkcheck: Resolve hanging tests for timezones west of London
  and incorrect conversion from UTC to offsets from the UNIX epoch.
  Patch by Dmitry Shachnev and Adam Turner.</li>
  </ul>
  <h1>Release 7.2.3 (released Aug 23, 2023)</h1>
  <h2>Dependencies</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11576">#11576</a>: Require sphinxcontrib-serializinghtml 1.1.9.</li>
  </ul>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix regression in <code>autodoc.Documenter.parse_name()</code>.</li>
  <li>Fix regression in JSON serialisation.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11543">#11543</a>: autodoc: Support positional-only parameters in <code>classmethod</code> methods
  when <code>autodoc_preserve_defaults</code> is <code>True</code>.</li>
  <li>Restore support string methods on path objects.
  This is deprecated and will be removed in Sphinx 8.
  Use :py:func:<code>os.fspath</code> to convert :py:class:<code>~pathlib.Path</code> objects to strings,
  or :py:class:<code>~pathlib.Path</code>'s methods to work with path objects.</li>
  </ul>
  <h1>Release 7.2.2 (released Aug 17, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li>Fix the signature of the <code>StateMachine.insert_input()</code> patch,
  for when calling with keyword arguments.</li>
  <li>Fixed membership testing (<code>in</code>) for the :py:class:<code>str</code> interface
  of the asset classes (<code>_CascadingStyleSheet</code> and <code>_JavaScript</code>),
  which several extensions relied upon.</li>
  <li>Fixed a type error in <code>SingleFileHTMLBuilder._get_local_toctree</code>,
  <code>includehidden</code> may be passed as a string or a boolean.</li>
  <li>Fix <code>:noindex:</code> for <code>PyModule</code> and <code>JSModule</code>.</li>
  </ul>
  <h1>Release 7.2.1 (released Aug 17, 2023)</h1>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/3256f1f22092a3e9c2925472f6f0b41e4f09e902"><code>3256f1f</code></a> Bump to 7.2.4 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2f025a4b226610a170d008a24eeba4f90719fa76"><code>2f025a4</code></a> linkcheck: Fix conversion from UTC time to the UNIX epoch (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11649">#11649</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/1567281287f780d83d5c1b1202a7e551fd0b3998"><code>1567281</code></a> autodoc: Fix UnboundLocalError in <code>filter_members</code> (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11651">#11651</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/5e88b9f88665dd8782b9feb381b499ae580cfa1a"><code>5e88b9f</code></a> Fix the MoveModuleTargets transform (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11647">#11647</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/694fcee13d4298ca39ff08837c28b12b2485fbfd"><code>694fcee</code></a> Fix markup in CHANGES (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11639">#11639</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/c503c90090efb54eab81621dde73e4c57e1af1e6"><code>c503c90</code></a> Improve <code>pathlib</code> type annotations (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11646">#11646</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/bf339b123e9f01bfc62663849563d52a7099701a"><code>bf339b1</code></a> Bump version</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2f6ea1422b08f9494f34b80c2ff6c96b5f396fdc"><code>2f6ea14</code></a> Bump to 7.2.3 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/511e4070aa429a41eac04e88d96806c8fd0a5cc7"><code>511e407</code></a> Implement <code>bool()</code> for string paths</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/494de7327f23e1b8a09f4e327f6d4cdf4e351013"><code>494de73</code></a> Implement <code>hash()</code> for string paths</li>
  <li>Additional commits viewable in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.1.2...v7.2.4">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `furo` from 2023.7.26 to 2023.8.19
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.08.19 -- Xenolithic Xanadu</h2>
  <ul>
  <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li>
  <li>Drop support for Python 3.7.</li>
  <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li>
  <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li>
  </ul>
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <ul>
  <li>Update Python version classifiers.</li>
  <li>Increase the icon size in mobile header.</li>
  <li>Increase admonition title bg opacity.</li>
  <li>Change the default API background to transparent.</li>
  <li>Transition the API background change.</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/0766bb2d6d0392bf90d4e4ac447ae721fa673ee9"><code>0766bb2</code></a> Prepare release: 2023.08.19</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/807d73cb1080a1c9b8321a1dcffd84aee73e859a"><code>807d73c</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/364b2611f27e463cd1f879bf348975c01294ffc0"><code>364b261</code></a> Accomodate for the required <code>data-content_root</code> for search</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/0d38bc6cffc528ce3cf742fe2bd20e83c46d7891"><code>0d38bc6</code></a> Simplify retrieval of <code>pygments_dark_style</code> value (<a href="https://redirect.github.com/pradyunsg/furo/issues/699">#699</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/3631ffc4ea2f241b89bbd9b6c9d76e52a4226c56"><code>3631ffc</code></a> Use <code>sphinx.errors.ConfigError</code> (<a href="https://redirect.github.com/pradyunsg/furo/issues/697">#697</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/d2e2448852752ec570313bc1daea3bda56069816"><code>d2e2448</code></a> Remove duplicate HTML builder check (<a href="https://redirect.github.com/pradyunsg/furo/issues/698">#698</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/7b4f1308832e99d8e49c80f24665e938673c1644"><code>7b4f130</code></a> Drop Python 3.7 (<a href="https://redirect.github.com/pradyunsg/furo/issues/701">#701</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/e322b71b10c959cce0af80d3ac6934725ce728bb"><code>e322b71</code></a> Remove pointless assert (<a href="https://redirect.github.com/pradyunsg/furo/issues/702">#702</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/ee2097a797e92f1155a17287d063b3181f137115"><code>ee2097a</code></a> Bump <code>require_sphinx()</code> to Sphinx 6.0 (<a href="https://redirect.github.com/pradyunsg/furo/issues/700">#700</a>)</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c1ff10b768aaa2a2e479bbf8d58187e12a2731ac"><code>c1ff10b</code></a> Back to development</li>
  <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2023.07.26...2023.08.19">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `blacken-docs` from 1.15.0 to 1.16.0
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/adamchainz/blacken-docs/blob/main/CHANGELOG.rst">blacken-docs's changelog</a>.</em></p>
  <blockquote>
  <h2>1.16.0 (2023-08-16)</h2>
  <ul>
  <li>
  <p>Allow Markdown fence options.</p>
  <p>Thanks to initial work from Matthew Anderson in <code>PR [#246](https://github.com/asottile/blacken-docs/issues/246) &lt;https://github.com/adamchainz/blacken-docs/pull/246&gt;</code>__.</p>
  </li>
  <li>
  <p>Expand Markdown detection to all Python language names from Pygments: <code>py</code>, <code>sage</code>, <code>python3</code>, <code>py3</code>, and <code>numpy</code>.</p>
  </li>
  <li>
  <p>Preserve leading whitespace lines in reStructuredText code blocks.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#217](https://github.com/asottile/blacken-docs/issues/217) &lt;https://github.com/adamchainz/blacken-docs/issues/217&gt;</code>__.</p>
  </li>
  <li>
  <p>Use exit code 2 to indicate errors from Black, whilst exit code 1 remains for “files have been formatted”.</p>
  <p>Thanks to Julianus Pfeuffer for the report in <code>Issue [#218](https://github.com/asottile/blacken-docs/issues/218) &lt;https://github.com/adamchainz/blacken-docs/issues/218&gt;</code>__.</p>
  </li>
  <li>
  <p>Support passing the <code>--preview</code> option through to Black, to select the future style.</p>
  </li>
  <li>
  <p>Remove <code>language_version</code> from <code>.pre-commit-hooks.yaml</code>.
  This change allows <code>default_language_version</code> in ``.pre-commit-config.yaml` to take precedence.</p>
  <p>Thanks to Aneesh Agrawal in <code>PR [#258](https://github.com/asottile/blacken-docs/issues/258) &lt;https://github.com/adamchainz/blacken-docs/pull/258&gt;</code>__.</p>
  </li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/960ead214cd1184149d366c6d27ca6c369ce46b6"><code>960ead2</code></a> Version 1.16.0</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/8f0ed18ce69d35e7e631d2b01983ecf8248667a0"><code>8f0ed18</code></a> Support passing --preview through to Black (<a href="https://redirect.github.com/asottile/blacken-docs/issues/273">#273</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/4eb4e4cdbff31cde3d9ffdd7693d5b7dce4dc506"><code>4eb4e4c</code></a> Tweak changelog note</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/6c7450cfa90581b482d71b451b2d007361aa47c1"><code>6c7450c</code></a> Use exit code 2 to indicate errors (<a href="https://redirect.github.com/asottile/blacken-docs/issues/272">#272</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/99dfc8d0b402b9b7b0f0e723fc1d030063249eac"><code>99dfc8d</code></a> Preserve leading whitespace lines in rST (<a href="https://redirect.github.com/asottile/blacken-docs/issues/271">#271</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/94465e83e7253b4caef1e00fcb30b74ced33f08e"><code>94465e8</code></a> Reformat markdown tests with dedent() (<a href="https://redirect.github.com/asottile/blacken-docs/issues/270">#270</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/7cd5f30f0f9e014bda566a1893df3b9c7f9a2c48"><code>7cd5f30</code></a> Use .md in glob example</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/f97e56994178e079ab807cebe54c2044f7b2ae55"><code>f97e569</code></a> Document applying to many files (<a href="https://redirect.github.com/asottile/blacken-docs/issues/269">#269</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/ae612b095b5005eee8c3ab9fe65a248d7654582d"><code>ae612b0</code></a> Expand Markdown detection to all Python language names (<a href="https://redirect.github.com/asottile/blacken-docs/issues/268">#268</a>)</li>
  <li><a href="https://github.com/adamchainz/blacken-docs/commit/da9b4557afc9b820c40b8d6bdb8f515c6cdec0f5"><code>da9b455</code></a> Replace NamedTuple with plain class (<a href="https://redirect.github.com/asottile/blacken-docs/issues/267">#267</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2160.org.readthedocs.build/en/2160/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2160/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Y90K9
title: -s/--setting x y gets merged into datasette.yml, refs #2143, #2156
state: closed
created_at: 2023-08-28T19:30:42Z
updated_at: 2023-08-28T20:06:15Z
closed_at: 2023-08-28T20:06:14Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2161
type: pull
body:
  This change updates the `-s/--setting` option to `datasette serve` to allow it to be used to set arbitrarily complex nested settings in a way that is compatible with the new `-c datasette.yml` work happening in:
  - #2143

  It will enable things like this:
  ```
  datasette data.db --setting plugins.datasette-ripgrep.path "/home/simon/code"
  ```
  For the moment though it just affects [settings](https://docs.datasette.io/en/1.0a4/settings.html) - so you can do this:
  ```
  datasette data.db --setting settings.sql_time_limit_ms 3500
  ```
  I've also implemented a backwards compatibility mechanism, so if you use it this way (the old way):
  ```
  datasette data.db --setting sql_time_limit_ms 3500
  ```
  It will notice that the setting you passed is one of Datasette's core settings, and will treat that as if you said `settings.sql_time_limit_ms` instead.

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2161.org.readthedocs.build/en/2161/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2161/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Y-7Em
title: Add new `--internal internal.db` option, deprecate legacy `_internal` database
state: closed
created_at: 2023-08-29T00:05:07Z
updated_at: 2023-08-29T03:24:23Z
closed_at: 2023-08-29T03:24:23Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2162
type: pull
body:
  refs #2157 

  This PR adds a new `--internal` option to datasette serve. If provided, it is the path to a persistent internal database that Datasette core and Datasette plugins can use to store data, as discussed in the proposal issue. 

  This PR also removes and deprecates the previous in-memory `_internal` database. Those tables now appear in the `internal` database, with `core_` prefixes (ex `tables` in `_internal` is now `core_tables` in `internal`).


  ## A note on the new `core_` tables
  However, one important notes about those new `core_` tables: If a `--internal` DB is passed in, that means those `core_` tables will persist across multiple Datasette instances. This wasn't the case before, since `_internal` was always an in-memory database created from scratch.

  I tried to put those `core_` tables as `TEMP` tables - after all, there's always one 1 `internal` DB connection at a time, so I figured it would work. But, since we use the `Database()` wrapper for the internal DB, it has two separate connections: a default read-only connection and a write connection that is created when a write operation occurs. Which meant the `TEMP` tables would be created by the write connection, but not available in the read-only connection. 

  So I had a brillant idea: Attach an in-memory named database with `cache=shared`, and create those tables there! 

  ```sql
  ATTACH DATABASE 'file:datasette_internal_core?mode=memory&cache=shared' AS core;
  ```

  We'd run this on both the read-only connection and the write-only connection. That way, those tables would stay in memory, they'd communicate with the `cache=shared` feature, and we'd be good to go.


  However, I couldn't find an easy way to run a `ATTACH DATABASE` command on the read-only query. 

  Using `Database()` as a wrapper for the internal DB is pretty limiting - it's meant for Datasette "data" databases, where we want multiple readers and possibly 1 write connection at a time. But the internal database doesn't really require that kind of support - I think we could get away with a single read/write connection, but it seemed like too big of a rabbithole to go through now. 


  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2162.org.readthedocs.build/en/2162/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2162/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOD079W85vk3kH
title: ImportError: cannot import name 'formatargspec' from 'inspect'
state: closed
created_at: 2023-08-29T15:36:31Z
updated_at: 2023-08-31T03:18:07Z
closed_at: 2023-08-31T03:18:06Z
author_association: NONE
type: issue
state_reason: completed
body:
  I get the following error when running "pip3 install dogsheep-photos"
  "  from inspect import ismethod, isclass, formatargspec
        ImportError: cannot import name 'formatargspec' from 'inspect' (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/inspect.py). Did you mean: 'formatargvalues'?"
      
  Python 3.12.0rc1
  sqlite 3.43.0
  datasette, version 0.64.3

reactions:
  {"url": "https://api.github.com/repos/dogsheep/dogsheep-photos/issues/40/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vlRyi
title: Rename core_X to catalog_X in the internals
state: closed
created_at: 2023-08-29T16:45:00Z
updated_at: 2023-08-29T17:01:31Z
closed_at: 2023-08-29T17:01:31Z
author_association: OWNER
type: issue
state_reason: completed
body:
  Discussed with Alex this morning. We think the American spelling is fine here (it's shorter than `catalogue`) and that it's a slightly less lazy name than `core_`.

  Follows:
  - https://github.com/simonw/datasette/issues/2157

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2163/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vtt0M
title: Ability to only load a specific list of plugins
state: closed
created_at: 2023-08-30T19:33:41Z
updated_at: 2023-09-08T04:35:46Z
closed_at: 2023-08-30T22:12:27Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I'm going to try and get this working through an environment variable, so that you can start Datasette and it will only load a subset of plugins including those that use the `register_commands()` hook.

  Initial research on this:
  - https://github.com/pytest-dev/pluggy/issues/422

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2164/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5ZLMSe
title: DATASETTE_LOAD_PLUGINS environment variable for loading specific plugins
state: closed
created_at: 2023-08-30T20:33:30Z
updated_at: 2023-08-30T22:12:25Z
closed_at: 2023-08-30T22:12:25Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2165
type: pull
body:
  - #2164

  TODO:

  - [x] Automated tests
  - [ ] Documentation
  - [x] Make sure `DATASETTE_LOAD_PLUGINS=''` works for loading zero plugins

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2165/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5ZPO5y
title: Bump the python-packages group with 1 update
state: closed
created_at: 2023-08-31T13:19:57Z
updated_at: 2023-09-06T16:34:32Z
closed_at: 2023-09-06T16:34:31Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2166
type: pull
body:
  Bumps the python-packages group with 1 update: [sphinx](https://github.com/sphinx-doc/sphinx).

  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.5</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.5 (released Aug 30, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11645">#11645</a>: Fix a regression preventing autodoc from importing modules within
  packages that make use of <code>if typing.TYPE_CHECKING:</code> to guard circular
  imports needed by type checkers.
  Patch by Matt Wozniski.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11634">#11634</a>: Fixed inheritance diagram relative link resolution
  for sibling files in a subdirectory.
  Patch by Albert Shih.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11659">#11659</a>: Allow <code>?config=...</code> in :confval:<code>mathjax_path</code>.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11654">#11654</a>: autodoc: Fail with a more descriptive error message
  when an object claims to be an instance of <code>type</code>,
  but is not a class.
  Patch by James Braza.</li>
  <li>11620: Cease emitting :event:<code>source-read</code> events for files read via
  the :dudir:<code>include</code> directive.</li>
  <li>11620: Add a new :event:<code>include-read</code> for observing and transforming
  the content of included files via the :dudir:<code>include</code> directive.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11627">#11627</a>: Restore support for copyright lines of the form <code>YYYY</code>
  when <code>SOURCE_DATE_EPOCH</code> is set.</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/fcc38997f1d9b728bb4ffc64fc362c7763a4ee25"><code>fcc3899</code></a> Bump to 7.2.5 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2a631f97ef7f4b0edc2470c9cc2b7d809dd75a87"><code>2a631f9</code></a> Restore support for YYYY copyright lines</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/2730cc3353b06f16786d697c61c8b847a91ddd30"><code>2730cc3</code></a> Remove double spaces in CHANGES</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ff18318613db56d0000db47e5c8f0140556cef0c"><code>ff18318</code></a> Add an <code>'include-read'</code> event (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11657">#11657</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/74329d9c51c16be54e1f3dece07461f67cfb8ab0"><code>74329d9</code></a> Fail better in <code>ExceptionDocumenter.can_document_member</code> (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11660">#11660</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/7d046a862f06631367984b87c1e8c2acb518de4f"><code>7d046a8</code></a> Allow <code>?config=...</code> in <code>mathjax_path</code> (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11659">#11659</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/4692208fde90f5a651f303c0550bcf2b7a8a049c"><code>4692208</code></a> Fix two relative link bugs in inheritance diagrams (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11634">#11634</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/ca0fc7aa86cb8acfb4445aab17666a836abaee43"><code>ca0fc7a</code></a> Add git .mailmap file</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/8248be31dbd6f235b9393f39ff16fa9e67dec67c"><code>8248be3</code></a> autodoc: Reset <code>sys.modules</code> on partial import failure (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11645">#11645</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/e494baa9dd3f43ceeab29454f6b433456339da78"><code>e494baa</code></a> Recommend correct replacement names for deprecated APIs (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11655">#11655</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.2.4...v7.2.5">compare view</a></li>
  </ul>
  </details>
  <br />


  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sphinx&package-manager=pip&previous-version=7.2.4&new-version=7.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2166.org.readthedocs.build/en/2166/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2166/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5vzYGv
title: Document return type of await ds.permission_allowed()
state: open
created_at: 2023-08-31T15:14:23Z
updated_at: 2023-08-31T15:14:23Z
author_association: OWNER
type: issue
body:
  The return type isn't documented here: https://github.com/simonw/datasette/blob/4c3ef033110407f3b3dbce501659d523724985e0/docs/internals.rst#L327-L350

  On inspecting the code I'm not 100% sure if it's possible for this. method to return `None`, or if it can only return `True` or `False`. Need to confirm that.

  https://github.com/simonw/datasette/blob/4c3ef033110407f3b3dbce501659d523724985e0/datasette/app.py#L822C15-L853

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2167/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5v1uJ4
title: Consider a request/response wrapping hook slightly higher level than asgi_wrapper()
state: open
created_at: 2023-08-31T21:42:04Z
updated_at: 2023-09-10T17:54:08Z
author_association: OWNER
type: issue
body:
  There's a long justification for why this might be needed here:
  - https://github.com/simonw/datasette-auth-tokens/issues/10#issuecomment-1701820001

  Short version: it would be neat if it was possible to stash some data on the `request` object such that a later plugin/middleware-type-thing could use that to influence the final returned response - similar to the kinds of things you can do with Django middleware.

  The `asgi_wrapper()` mechanism doesn't have access to the request or response objects - it gets `scope` and can mess around with `receive` and `send`, but those are pretty low-level primitives.

  Since Datasette has well-defined `request` and `response` objects now it might be nice to have a middleware layer that can manipulate those directly.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2168/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5v17Uu
title: execute-sql on a database should imply view-database/view-permission
state: closed
created_at: 2023-08-31T22:45:56Z
updated_at: 2023-08-31T22:46:28Z
closed_at: 2023-08-31T22:46:28Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I noticed that a token with `execute-sql` permission alone did not work, because it was not allowed to view the instance of the database.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2169/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5wAnZY
title: Mechanism for de-registering registered SQL functions
state: open
created_at: 2023-09-03T19:32:39Z
updated_at: 2023-09-03T19:36:34Z
author_association: OWNER
type: issue
body:
  I used a custom SQL function in a migration script and then realized that it should be de-registered before the end of the script to avoid leaking into the calling code.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/589/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5wAokd
title: Ability to tell if a Database is an in-memory one
state: open
created_at: 2023-09-03T19:50:15Z
updated_at: 2023-09-03T19:50:36Z
author_association: OWNER
type: issue
body:
  Currently the constructor accepts `memory=True` or `memory_name=...` and uses those to create a connection, but does not record what those values were:

  https://github.com/simonw/sqlite-utils/blob/1260bdc7bfe31c36c272572c6389125f8de6ef71/sqlite_utils/db.py#L307-L349

  This makes it hard to tell if a database object is to an in-memory or a file-based database, which is sometimes useful to know.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/590/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOJHON9s5ZhYny
title: fix: fix the problem of Chinese character garbling
state: open
created_at: 2023-09-04T23:48:28Z
updated_at: 2023-09-04T23:48:28Z
author_association: FIRST_TIME_CONTRIBUTOR
pull_request: dogsheep/apple-notes-to-sqlite/pulls/14
type: pull
body:
  1. The code uses two different ways of writing encoding formats, `mac_roman` and `macroman`. It is uncertain whether there are any typo errors.
  2. When there are Chinese characters in the content, exporting it results in garbled code. Changing it to `utf8` can fix the issue.

reactions:
  {"url": "https://api.github.com/repos/dogsheep/apple-notes-to-sqlite/issues/14/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5ZociX
title: click-default-group>=1.2.3
state: closed
created_at: 2023-09-06T02:33:28Z
updated_at: 2023-09-06T02:50:10Z
closed_at: 2023-09-06T02:50:10Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2173
type: pull
body:
  Now available as a wheel:
  - https://github.com/click-contrib/click-default-group/issues/21

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2173.org.readthedocs.build/en/2173/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2173/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5ZszDF
title: Use $DATASETTE_INTERNAL in absence of --internal
state: open
created_at: 2023-09-06T16:07:15Z
updated_at: 2023-09-08T00:46:13Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2174
type: pull
body:
  #refs 2157, specifically [this comment](https://github.com/simonw/datasette/issues/2157#issuecomment-1700291967)

  Passing in `--internal my_internal.db` over and over again can get repetitive. 

  This PR adds a new configurable env variable `DATASETTE_INTERNAL_DB_PATH`. If it's defined, then it takes place as the path to the internal database. Users can still overwrite this behavior by passing in their own `--internal internal.db` flag.

  In draft mode for now, needs tests and documentation. 

  Side note: Maybe we can have a sections in the docs that lists all the "configuration environment variables" that Datasette respects? I did a quick grep and found:

  - `DATASETTE_LOAD_PLUGINS`
  - `DATASETTE_SECRETS`


  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2174.org.readthedocs.build/en/2174/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2174/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Zszqk
title: Test against Python 3.12 preview
state: closed
created_at: 2023-09-06T16:09:05Z
updated_at: 2023-09-06T16:16:28Z
closed_at: 2023-09-06T16:16:27Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2175
type: pull
body:
  https://dev.to/hugovk/help-test-python-312-beta-1508/

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2175.org.readthedocs.build/en/2175/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2175/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5Zs0KB
title: Test against Python 3.12 preview
state: closed
created_at: 2023-09-06T16:10:00Z
updated_at: 2023-11-04T00:58:03Z
closed_at: 2023-11-04T00:58:02Z
author_association: OWNER
pull_request: simonw/sqlite-utils/pulls/591
type: pull
body:
  https://dev.to/hugovk/help-test-python-312-beta-1508/

  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--591.org.readthedocs.build/en/591/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/591/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0}


node_id: I_kwDOBm6k_c5wUcsw
title: Move schema tables from _internal to _catalog
state: open
created_at: 2023-09-06T16:58:33Z
updated_at: 2023-09-06T17:04:30Z
author_association: OWNER
body:
  This came up in discussion over:
  - https://github.com/simonw/datasette/pull/2174

type: issue
reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2177/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDODFE5qs5ZtYMc
title: use poetry for packages, asdf for versioning, and gh actions for ci
state: open
created_at: 2023-09-06T17:59:16Z
updated_at: 2023-09-06T17:59:16Z
author_association: FIRST_TIME_CONTRIBUTOR
pull_request: dogsheep/google-takeout-to-sqlite/pulls/13
type: pull
body:
  - build: use poetry for package management, asdf for python version
  - build: cleanup poetry config, add keywords, ignore dist
  - ci: migrate circleci to gh actions
  - fix: dup method definition

reactions:
  {"url": "https://api.github.com/repos/dogsheep/google-takeout-to-sqlite/issues/13/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5wb2zi
title: Don't show foreign key links to tables the user cannot access
state: closed
created_at: 2023-09-07T17:56:41Z
updated_at: 2023-09-07T23:28:27Z
closed_at: 2023-09-07T23:28:27Z
author_association: OWNER
type: issue
state_reason: completed
body:
  Spotted this problem while working on this plugin:
  - https://github.com/simonw/datasette-public

  It's possible to make a table public to any users - but then you may end up with situations like this:

  <img width="1095" alt="CleanShot 2023-09-07 at 10 55 02@2x" src="https://github.com/simonw/datasette/assets/9599/514a00be-f399-4b08-aa5e-f07d603b5ffe">

  That table is public, but the foreign key links go to tables that are NOT public.

  We're also leaking the names of the values in those private tables here, which we shouldn't do. So this is a tiny bit of an information leak.

  Since this only affects people who have configured a table to be public that has foreign keys to a table that is private I don't think this is worth issuing a vulnerability report about - I very much doubt anyone is running Datasette configured in a way that could result in problems because of this.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2178/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5wc_w6
title: Flaky test: test_hidden_sqlite_stat1_table
state: closed
created_at: 2023-09-07T22:48:43Z
updated_at: 2023-09-07T22:51:19Z
closed_at: 2023-09-07T22:51:19Z
author_association: OWNER
type: issue
state_reason: completed
body:
  This test here: https://github.com/simonw/datasette/blob/fbcb103c0cb6668018ace539a01a6a1f156e8d6a/tests/test_api.py#L1011-L1020

  It failed for me like this:

  `E       AssertionError: assert [('normal', False), ('sqlite_stat1', True), ('sqlite_stat4', True)] in ([('normal', False), ('sqlite_stat1', True)],)`

  Looks like some builds of SQLite include a `sqlite_stat4` table.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2179/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5wddkl
title: `table.transform()` should preserve `rowid` values
state: closed
created_at: 2023-09-08T00:42:38Z
updated_at: 2023-09-10T17:46:41Z
closed_at: 2023-09-09T00:45:32Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I just spotted a bug when using https://datasette.io/plugins/datasette-configure-fts and https://datasette.io/plugins/datasette-edit-schema at the same time.

  Steps to reproduce:

  - Configure FTS for a table, then run a test search
  - Edit the schema for that table and change the order of columns
  - Run the test search again

  I got the wrong search results, which I think is because the `_fts` table pointed to the first table by `rowid` but those `rowid` values were entirely rewritten as a consequence of running `table.transform()` on the table.

  Reconfiguring FTS on the table fixed the problem.

  I think `table.transform()` should be able to preserve `rowid` values.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/592/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5Z1H1d
title: .transform() now preserves rowid values, refs #592
state: closed
created_at: 2023-09-08T01:02:28Z
updated_at: 2023-09-10T17:44:59Z
closed_at: 2023-09-09T00:45:30Z
author_association: OWNER
pull_request: simonw/sqlite-utils/pulls/593
type: pull
body:
  Refs:
  - #592

  - [x] Tests against weird shaped tables

  I need to test that this works against:

  - `rowid` tables
  - Tables that have a column called `rowid` even though they are not rowid tables


  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--593.org.readthedocs.build/en/593/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/593/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5wdiW8
title: Plugin hook: `actors_from_ids()`
state: closed
created_at: 2023-09-08T01:16:41Z
updated_at: 2023-09-10T17:44:14Z
closed_at: 2023-09-08T04:28:03Z
author_association: OWNER
type: issue
state_reason: completed
body:
  In building Datasette Cloud we realized that a bunch of the features we are building need a way of resolving an actor ID to the actual actor, in order to display something more interesting than just an integer ID.

  Social plugins in particular need this - comments by X, CSV uploaded by X, that kind of thing.

  I think the solution is a new plugin hook: `actors_from_ids(datasette, ids)` which can return a list of actor dictionaries.

  The default implementation can return `[{"id": "..."}]` for the IDs passed to it.

  Pluggy has a `firstresult=True` option which is relevant here, since this is the first plugin hook we will have implemented where only one plugin should provide an answer.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2180/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5Z1N2L
title: actors_from_ids plugin hook and datasette.actors_from_ids() method
state: closed
created_at: 2023-09-08T01:51:07Z
updated_at: 2023-09-08T04:24:00Z
closed_at: 2023-09-08T04:23:59Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2181
type: pull
body:
  Refs:
  - #2180

  This plugin hook is feature complete - including documentation and tests.

  I'm not going to land it in Datasette `main` until we've used it at least once though, which should happen promptly in development for [Datasette Cloud](https://www.datasette.cloud/).

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2181.org.readthedocs.build/en/2181/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2181/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOC8SPRc5wj-Bj
title: Run `rebuild_fts` after building the index
state: open
created_at: 2023-09-08T23:17:45Z
updated_at: 2023-09-08T23:17:45Z
author_association: MEMBER
type: issue
body:
  In:
  - https://github.com/simonw/datasette.io/issues/152#issuecomment-1712323347

  This turned out to be the fix:

  ```bash
  dogsheep-beta index dogsheep-index.db templates/dogsheep-beta.yml
  sqlite-utils rebuild-fts dogsheep-index.db
  ```

reactions:
  {"url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/38/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5aBx3g
title: Bump the python-packages group with 2 updates
state: closed
created_at: 2023-09-11T14:01:25Z
updated_at: 2023-09-14T13:27:30Z
closed_at: 2023-09-14T13:27:28Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2182
type: pull
body:
  Bumps the python-packages group with 2 updates: [furo](https://github.com/pradyunsg/furo) and [black](https://github.com/psf/black).

  Updates `furo` from 2023.8.19 to 2023.9.10
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.09.10 -- Zesty Zaffre</h2>
  <ul>
  <li>Make asset hash injection idempotent, fixing Sphinx 6 compatibility.</li>
  <li>Fix the check for HTML builders, fixing non-HTML Read the Docs builds.</li>
  </ul>
  <h2>2023.08.19 -- Xenolithic Xanadu</h2>
  <ul>
  <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li>
  <li>Drop support for Python 3.7.</li>
  <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li>
  <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li>
  </ul>
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/2718ca42930f7c8c11bc96341e0d3db6f532b08d"><code>2718ca4</code></a> Prepare release: 2023.09.10</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c22c99d931decfa4641e400e428606bc6184af56"><code>c22c99d</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c37e84961d9ffbc77ab7be268081d1b3497f0311"><code>c37e849</code></a> Quote a not-runtime-generic type annotation</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/9cfdf44784dc90085549490ff1eddd2afc37c1d6"><code>9cfdf44</code></a> Rework infrastructure for linting</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/5abeb9fc962aee61eda02e0c75e872004635e9d5"><code>5abeb9f</code></a> Fix the check for HTML builders</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/ee2ab5459ddb0a32c3467b88c9c628611eb55073"><code>ee2ab54</code></a> Tweak how tests are run with nox</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/cdae2366c340695ba724ca8438a4cd1e605c8848"><code>cdae236</code></a> Test against Sphinx minor versions in CI</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/9e40071eb8c4c3e38845b57c4f5242bef2a44af2"><code>9e40071</code></a> Make asset hash injection idempotent</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/aab86f4624b6ef38a151440be5624746d41882b1"><code>aab86f4</code></a> Revert &quot;Exclude incompatible Sphinx releases (<a href="https://redirect.github.com/pradyunsg/furo/issues/711">#711</a>)&quot;</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/4dd6eec9e306b5fd0624ec8d1d90c6ad416c5182"><code>4dd6eec</code></a> Exclude incompatible Sphinx releases (<a href="https://redirect.github.com/pradyunsg/furo/issues/711">#711</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2023.08.19...2023.09.10">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `black` from 23.7.0 to 23.9.1
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
  <blockquote>
  <h2>23.9.1</h2>
  <p>Due to various issues, the previous release (23.9.0) did not include compiled mypyc
  wheels, which make Black significantly faster. These issues have now been fixed, and
  this release should come with compiled wheels once again.</p>
  <p>There will be no wheels for Python 3.12 due to a bug in mypyc. We will provide 3.12
  wheels in a future release as soon as the mypyc bug is fixed.</p>
  <h3>Packaging</h3>
  <ul>
  <li>Upgrade to mypy 1.5.1 (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Store raw tuples instead of NamedTuples in Black's cache, improving performance and
  decreasing the size of the cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  </ul>
  <h2>23.9.0</h2>
  <h3>Preview style</h3>
  <ul>
  <li>More concise formatting for dummy implementations (<a href="https://redirect.github.com/psf/black/issues/3796">#3796</a>)</li>
  <li>In stub files, add a blank line between a statement with a body (e.g an
  <code>if sys.version_info &gt; (3, x):</code>) and a function definition on the same level (<a href="https://redirect.github.com/psf/black/issues/3862">#3862</a>)</li>
  <li>Fix a bug whereby spaces were removed from walrus operators within subscript(<a href="https://redirect.github.com/psf/black/issues/3823">#3823</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Black now applies exclusion and ignore logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/3846">#3846</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Avoid importing <code>IPython</code> if notebook cells do not contain magics (<a href="https://redirect.github.com/psf/black/issues/3782">#3782</a>)</li>
  <li>Improve caching by comparing file hashes as fallback for mtime and size (<a href="https://redirect.github.com/psf/black/issues/3821">#3821</a>)</li>
  </ul>
  <h3><em>Blackd</em></h3>
  <ul>
  <li>Fix an issue in <code>blackd</code> with single character input (<a href="https://redirect.github.com/psf/black/issues/3558">#3558</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black now has an
  <a href="https://github.com/psf/black-pre-commit-mirror">official pre-commit mirror</a>. Swapping
  <code>https://github.com/psf/black</code> to <code>https://github.com/psf/black-pre-commit-mirror</code> in
  your <code>.pre-commit-config.yaml</code> will make Black about 2x faster (<a href="https://redirect.github.com/psf/black/issues/3828">#3828</a>)</li>
  <li>The <code>.black.env</code> folder specified by <code>ENV_PATH</code> will now be removed on the completion
  of the GitHub Action (<a href="https://redirect.github.com/psf/black/issues/3759">#3759</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
  <blockquote>
  <h2>23.9.1</h2>
  <p>Due to various issues, the previous release (23.9.0) did not include compiled mypyc
  wheels, which make Black significantly faster. These issues have now been fixed, and
  this release should come with compiled wheels once again.</p>
  <p>There will be no wheels for Python 3.12 due to a bug in mypyc. We will provide 3.12
  wheels in a future release as soon as the mypyc bug is fixed.</p>
  <h3>Packaging</h3>
  <ul>
  <li>Upgrade to mypy 1.5.1 (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Store raw tuples instead of NamedTuples in Black's cache, improving performance and
  decreasing the size of the cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  </ul>
  <h2>23.9.0</h2>
  <h3>Preview style</h3>
  <ul>
  <li>More concise formatting for dummy implementations (<a href="https://redirect.github.com/psf/black/issues/3796">#3796</a>)</li>
  <li>In stub files, add a blank line between a statement with a body (e.g an
  <code>if sys.version_info &gt; (3, x):</code>) and a function definition on the same level (<a href="https://redirect.github.com/psf/black/issues/3862">#3862</a>)</li>
  <li>Fix a bug whereby spaces were removed from walrus operators within subscript(<a href="https://redirect.github.com/psf/black/issues/3823">#3823</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Black now applies exclusion and ignore logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/3846">#3846</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Avoid importing <code>IPython</code> if notebook cells do not contain magics (<a href="https://redirect.github.com/psf/black/issues/3782">#3782</a>)</li>
  <li>Improve caching by comparing file hashes as fallback for mtime and size (<a href="https://redirect.github.com/psf/black/issues/3821">#3821</a>)</li>
  </ul>
  <h3><em>Blackd</em></h3>
  <ul>
  <li>Fix an issue in <code>blackd</code> with single character input (<a href="https://redirect.github.com/psf/black/issues/3558">#3558</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black now has an
  <a href="https://github.com/psf/black-pre-commit-mirror">official pre-commit mirror</a>. Swapping
  <code>https://github.com/psf/black</code> to <code>https://github.com/psf/black-pre-commit-mirror</code> in
  your <code>.pre-commit-config.yaml</code> will make Black about 2x faster (<a href="https://redirect.github.com/psf/black/issues/3828">#3828</a>)</li>
  <li>The <code>.black.env</code> folder specified by <code>ENV_PATH</code> will now be removed on the completion
  of the GitHub Action (<a href="https://redirect.github.com/psf/black/issues/3759">#3759</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/psf/black/commit/e87737140f32d3cd7c44ede75f02dcd58e55820e"><code>e877371</code></a> Prepare release 23.9.1 (<a href="https://redirect.github.com/psf/black/issues/3878">#3878</a>)</li>
  <li><a href="https://github.com/psf/black/commit/62dca32dc55a850f39d78ba8b9c21cc4261a2ddf"><code>62dca32</code></a> mypyc builds on PRs, skip mypyc wheels for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3870">#3870</a>)</li>
  <li><a href="https://github.com/psf/black/commit/751583a1dfc691423d96d7711a4c8d9cfe3ee9c8"><code>751583a</code></a> Pickle raw tuples in FileData cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  <li><a href="https://github.com/psf/black/commit/f7917453c99f8183ffd0397affcccb2c37594771"><code>f791745</code></a> Re-export black.Mode (<a href="https://redirect.github.com/psf/black/issues/3875">#3875</a>)</li>
  <li><a href="https://github.com/psf/black/commit/0b62b9c9a44a995e44d64ecf7cc08d8d7037642d"><code>0b62b9c</code></a> Ignore aiohttp DeprecationWarning for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3876">#3876</a>)</li>
  <li><a href="https://github.com/psf/black/commit/c83ad6c077e7bb281cfd3fbdd89bbeb4c980e563"><code>c83ad6c</code></a> Upgrade to Furo 2023.9.10 to fix docs build (<a href="https://redirect.github.com/psf/black/issues/3873">#3873</a>)</li>
  <li><a href="https://github.com/psf/black/commit/4eebfd1a7a4aa2652cfc674cf301d1f2f48098aa"><code>4eebfd1</code></a> Add mypyc test marks to new tests that patch (<a href="https://redirect.github.com/psf/black/issues/3871">#3871</a>)</li>
  <li><a href="https://github.com/psf/black/commit/add161b367a0d5a3cc395ec8e045f7b965edaef8"><code>add161b</code></a> Bump RTD Python version from 3.8 to 3.11 (<a href="https://redirect.github.com/psf/black/issues/3868">#3868</a>)</li>
  <li><a href="https://github.com/psf/black/commit/4e93f2aa01606154dc6af6e494b9f2b7e4c8c7fa"><code>4e93f2a</code></a> Add classifier for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3866">#3866</a>)</li>
  <li><a href="https://github.com/psf/black/commit/716fa08090b6a51e4c72dd0a14b6c45f7da4a9d0"><code>716fa08</code></a> Upgrade mypy (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.7.0...23.9.1">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2182.org.readthedocs.build/en/2182/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2182/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5aD33C
title: `datasette.yaml` plugin support
state: closed
created_at: 2023-09-11T20:26:04Z
updated_at: 2023-09-13T21:06:25Z
closed_at: 2023-09-13T21:06:25Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2183
type: pull
body:
  Part of #2093

  In #2149 , we ported over `"settings.json"` into the new `datasette.yaml` config file, with a top-level `"settings"` key. This PR ports over plugin configuration into top-level `"plugins"` key, as well as nested database/table plugin config.

  From now on, no plugin-related configuration is allowed in `metadata.yaml`, and must be in `datasette.yaml` in this new format. This is a pretty significant breaking change. Thankfully, you should be able to copy-paste your legacy plugin key/values into the new `datasette.yaml` format.

  An example of what `datasette.yaml` would look like with this new plugin config:

  ```yaml

  plugins:
    datasette-my-plugin:
      config_key: value

  databases:
    fixtures:
        plugins: 
          datasette-my-plugin:
            config_key: fixtures-db-value
      tables:
        students:
          plugins:
            datasette-my-plugin:
              config_key: fixtures-students-table-value

  ```

  As an additional benefit, this now works with the new `-s` flag:

  ```bash
  datasette --memory -s 'plugins.datasette-my-plugin.config_key' new_value
  ```


  Marked as a "Draft" right now until I add better documentation. We also should have a plan for the next alpha release to document and publicize this change, especially for plugin authors (since their docs will have to change to say `datasette.yaml` instead of `metadata.yaml`

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2183.org.readthedocs.build/en/2183/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2183/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5wv8D7
title: Represent compound foreign keys in table.foreign_keys output
state: open
created_at: 2023-09-12T03:48:24Z
updated_at: 2023-09-12T03:51:13Z
author_association: OWNER
type: issue
body:
  Given this schema:
  ```sql
  CREATE TABLE departments (
      campus_name TEXT NOT NULL,
      dept_code TEXT NOT NULL,
      dept_name TEXT,
      PRIMARY KEY (campus_name, dept_code)
  );
  CREATE TABLE courses (
      course_code TEXT PRIMARY KEY,
      course_name TEXT,
      campus_name TEXT NOT NULL,
      dept_code TEXT NOT NULL,
      FOREIGN KEY (campus_name, dept_code) REFERENCES departments(campus_name, dept_code)
  );
  ```
  The output of `db["courses"].foreign_keys` right now is:
  ```
  [ForeignKey(table='courses', column='campus_name', other_table='departments', other_column='campus_name'),
   ForeignKey(table='courses', column='dept_code', other_table='departments', other_column='dept_code')]
  ```
  Which suggests two normal foreign keys, not one compound foreign key.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/594/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5w93n3
title: Design decision - should configuration be exposed at /-/config ?
state: open
created_at: 2023-09-13T21:07:08Z
updated_at: 2023-09-13T21:07:38Z
author_association: OWNER
type: issue
body:
  > This made me think. That `{"$env": "ENV_VAR"}` hack was introduced back here:
  >
  > - https://github.com/simonw/datasette/issues/538
  >
  > The problem it was solving was that metadata was visible to everyone with access to the instance at `/-/metadata` but plugins clearly needed a way to set secret settings.
  >
  > Now that this stuff is moving to config, we have some decisions to make:
  >
  > 1. Add `/-/config` to let people see the configuration of their instance, and keep the `$env` trick for secret settings.
  > 2. Say all configuration aside from metadata is secret and make `$env` optional or ditch it entirely.
  > 3. Allow plugins to announce which of their configuration options are secret so we can automatically redact them from `/-/config`
  >
  > I've found `/-/metadata` extraordinarily useful as a user of Datasette - it really helps me understand exactly what's going on if I run into any problems with a plugin, if I can quickly check what the settings look like.
  >
  > So I'm leaning towards option 1 or 3.

  _Originally posted by @simonw in https://github.com/simonw/datasette/pull/2183#discussion_r1325076924_

  Also refs:
  - #2093

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2184/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5aWACP
title: Bump the python-packages group with 3 updates
state: closed
created_at: 2023-09-14T13:27:40Z
updated_at: 2023-09-20T22:11:25Z
closed_at: 2023-09-20T22:11:24Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2185
type: pull
body:
  Bumps the python-packages group with 3 updates: [sphinx](https://github.com/sphinx-doc/sphinx), [furo](https://github.com/pradyunsg/furo) and [black](https://github.com/psf/black).

  Updates `sphinx` from 7.2.5 to 7.2.6
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/releases">sphinx's releases</a>.</em></p>
  <blockquote>
  <h2>Sphinx 7.2.6</h2>
  <p>Changelog: <a href="https://www.sphinx-doc.org/en/master/changes.html">https://www.sphinx-doc.org/en/master/changes.html</a></p>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst">sphinx's changelog</a>.</em></p>
  <blockquote>
  <h1>Release 7.2.6 (released Sep 13, 2023)</h1>
  <h2>Bugs fixed</h2>
  <ul>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11679">#11679</a>: Add the :envvar:<code>!SPHINX_AUTODOC_RELOAD_MODULES</code> environment variable,
  which if set reloads modules when using autodoc with <code>TYPE_CHECKING = True</code>.
  Patch by Matt Wozniski and Adam Turner.</li>
  <li><a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11679">#11679</a>: Use :py:func:<code>importlib.reload</code> to reload modules in autodoc.
  Patch by Matt Wozniski and Adam Turner.</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/cf7d2759af0852d67288e58d823d51fe860749ca"><code>cf7d275</code></a> Bump to 7.2.6 final</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/43d69755df0088fd0ec099c0893da059f50175e4"><code>43d6975</code></a> Leverage <code>importlib.reload</code> for reloading modules (<a href="https://redirect.github.com/sphinx-doc/sphinx/issues/11679">#11679</a>)</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/13da5d7b2fda0da58137534e8fcdb0da9c88e55f"><code>13da5d7</code></a> Inline makecmd in make mode</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/3d0110a95a5260cc5056322eb8c2ae7f031a6667"><code>3d0110a</code></a> Enable test_cython on Python 3.12</li>
  <li><a href="https://github.com/sphinx-doc/sphinx/commit/22759fb9457bd9f1b01003daa47d7a2e78b6303c"><code>22759fb</code></a> Bump version</li>
  <li>See full diff in <a href="https://github.com/sphinx-doc/sphinx/compare/v7.2.5...v7.2.6">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `furo` from 2023.8.19 to 2023.9.10
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p>
  <blockquote>
  <h1>Changelog</h1>
  <!-- raw HTML omitted -->
  <h2>2023.09.10 -- Zesty Zaffre</h2>
  <ul>
  <li>Make asset hash injection idempotent, fixing Sphinx 6 compatibility.</li>
  <li>Fix the check for HTML builders, fixing non-HTML Read the Docs builds.</li>
  </ul>
  <h2>2023.08.19 -- Xenolithic Xanadu</h2>
  <ul>
  <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li>
  <li>Drop support for Python 3.7.</li>
  <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li>
  <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li>
  </ul>
  <h2>2023.08.17 -- Wonderous White</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li>
  </ul>
  <h2>2023.07.26 -- Vigilant Volt</h2>
  <ul>
  <li>Fix compatiblity with Sphinx 7.1.</li>
  <li>Improve how content overflow is handled.</li>
  <li>Improve how literal blocks containing inline code are handled.</li>
  </ul>
  <h2>2023.05.20 -- Unassuming Ultramarine</h2>
  <ul>
  <li>✨ Add support for Sphinx 7.</li>
  <li>Drop support for Sphinx 5.</li>
  <li>Improve the screen-reader label for sidebar collapse.</li>
  <li>Make it easier to create derived themes from Furo.</li>
  <li>Bump all JS dependencies (NodeJS and npm packages).</li>
  </ul>
  <h2>2023.03.27 -- Tasty Tangerine</h2>
  <ul>
  <li>Regenerate with newer version of sphinx-theme-builder, to fix RECORD hashes.</li>
  <li>Add missing class to Font Awesome examples</li>
  </ul>
  <h2>2023.03.23 -- Sassy Saffron</h2>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/pradyunsg/furo/commit/2718ca42930f7c8c11bc96341e0d3db6f532b08d"><code>2718ca4</code></a> Prepare release: 2023.09.10</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c22c99d931decfa4641e400e428606bc6184af56"><code>c22c99d</code></a> Update changelog</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/c37e84961d9ffbc77ab7be268081d1b3497f0311"><code>c37e849</code></a> Quote a not-runtime-generic type annotation</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/9cfdf44784dc90085549490ff1eddd2afc37c1d6"><code>9cfdf44</code></a> Rework infrastructure for linting</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/5abeb9fc962aee61eda02e0c75e872004635e9d5"><code>5abeb9f</code></a> Fix the check for HTML builders</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/ee2ab5459ddb0a32c3467b88c9c628611eb55073"><code>ee2ab54</code></a> Tweak how tests are run with nox</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/cdae2366c340695ba724ca8438a4cd1e605c8848"><code>cdae236</code></a> Test against Sphinx minor versions in CI</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/9e40071eb8c4c3e38845b57c4f5242bef2a44af2"><code>9e40071</code></a> Make asset hash injection idempotent</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/aab86f4624b6ef38a151440be5624746d41882b1"><code>aab86f4</code></a> Revert &quot;Exclude incompatible Sphinx releases (<a href="https://redirect.github.com/pradyunsg/furo/issues/711">#711</a>)&quot;</li>
  <li><a href="https://github.com/pradyunsg/furo/commit/4dd6eec9e306b5fd0624ec8d1d90c6ad416c5182"><code>4dd6eec</code></a> Exclude incompatible Sphinx releases (<a href="https://redirect.github.com/pradyunsg/furo/issues/711">#711</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2023.08.19...2023.09.10">compare view</a></li>
  </ul>
  </details>
  <br />

  Updates `black` from 23.7.0 to 23.9.1
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
  <blockquote>
  <h2>23.9.1</h2>
  <p>Due to various issues, the previous release (23.9.0) did not include compiled mypyc
  wheels, which make Black significantly faster. These issues have now been fixed, and
  this release should come with compiled wheels once again.</p>
  <p>There will be no wheels for Python 3.12 due to a bug in mypyc. We will provide 3.12
  wheels in a future release as soon as the mypyc bug is fixed.</p>
  <h3>Packaging</h3>
  <ul>
  <li>Upgrade to mypy 1.5.1 (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Store raw tuples instead of NamedTuples in Black's cache, improving performance and
  decreasing the size of the cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  </ul>
  <h2>23.9.0</h2>
  <h3>Preview style</h3>
  <ul>
  <li>More concise formatting for dummy implementations (<a href="https://redirect.github.com/psf/black/issues/3796">#3796</a>)</li>
  <li>In stub files, add a blank line between a statement with a body (e.g an
  <code>if sys.version_info &gt; (3, x):</code>) and a function definition on the same level (<a href="https://redirect.github.com/psf/black/issues/3862">#3862</a>)</li>
  <li>Fix a bug whereby spaces were removed from walrus operators within subscript(<a href="https://redirect.github.com/psf/black/issues/3823">#3823</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Black now applies exclusion and ignore logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/3846">#3846</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Avoid importing <code>IPython</code> if notebook cells do not contain magics (<a href="https://redirect.github.com/psf/black/issues/3782">#3782</a>)</li>
  <li>Improve caching by comparing file hashes as fallback for mtime and size (<a href="https://redirect.github.com/psf/black/issues/3821">#3821</a>)</li>
  </ul>
  <h3><em>Blackd</em></h3>
  <ul>
  <li>Fix an issue in <code>blackd</code> with single character input (<a href="https://redirect.github.com/psf/black/issues/3558">#3558</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black now has an
  <a href="https://github.com/psf/black-pre-commit-mirror">official pre-commit mirror</a>. Swapping
  <code>https://github.com/psf/black</code> to <code>https://github.com/psf/black-pre-commit-mirror</code> in
  your <code>.pre-commit-config.yaml</code> will make Black about 2x faster (<a href="https://redirect.github.com/psf/black/issues/3828">#3828</a>)</li>
  <li>The <code>.black.env</code> folder specified by <code>ENV_PATH</code> will now be removed on the completion
  of the GitHub Action (<a href="https://redirect.github.com/psf/black/issues/3759">#3759</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
  <blockquote>
  <h2>23.9.1</h2>
  <p>Due to various issues, the previous release (23.9.0) did not include compiled mypyc
  wheels, which make Black significantly faster. These issues have now been fixed, and
  this release should come with compiled wheels once again.</p>
  <p>There will be no wheels for Python 3.12 due to a bug in mypyc. We will provide 3.12
  wheels in a future release as soon as the mypyc bug is fixed.</p>
  <h3>Packaging</h3>
  <ul>
  <li>Upgrade to mypy 1.5.1 (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Store raw tuples instead of NamedTuples in Black's cache, improving performance and
  decreasing the size of the cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  </ul>
  <h2>23.9.0</h2>
  <h3>Preview style</h3>
  <ul>
  <li>More concise formatting for dummy implementations (<a href="https://redirect.github.com/psf/black/issues/3796">#3796</a>)</li>
  <li>In stub files, add a blank line between a statement with a body (e.g an
  <code>if sys.version_info &gt; (3, x):</code>) and a function definition on the same level (<a href="https://redirect.github.com/psf/black/issues/3862">#3862</a>)</li>
  <li>Fix a bug whereby spaces were removed from walrus operators within subscript(<a href="https://redirect.github.com/psf/black/issues/3823">#3823</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Black now applies exclusion and ignore logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/3846">#3846</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Avoid importing <code>IPython</code> if notebook cells do not contain magics (<a href="https://redirect.github.com/psf/black/issues/3782">#3782</a>)</li>
  <li>Improve caching by comparing file hashes as fallback for mtime and size (<a href="https://redirect.github.com/psf/black/issues/3821">#3821</a>)</li>
  </ul>
  <h3><em>Blackd</em></h3>
  <ul>
  <li>Fix an issue in <code>blackd</code> with single character input (<a href="https://redirect.github.com/psf/black/issues/3558">#3558</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black now has an
  <a href="https://github.com/psf/black-pre-commit-mirror">official pre-commit mirror</a>. Swapping
  <code>https://github.com/psf/black</code> to <code>https://github.com/psf/black-pre-commit-mirror</code> in
  your <code>.pre-commit-config.yaml</code> will make Black about 2x faster (<a href="https://redirect.github.com/psf/black/issues/3828">#3828</a>)</li>
  <li>The <code>.black.env</code> folder specified by <code>ENV_PATH</code> will now be removed on the completion
  of the GitHub Action (<a href="https://redirect.github.com/psf/black/issues/3759">#3759</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/psf/black/commit/e87737140f32d3cd7c44ede75f02dcd58e55820e"><code>e877371</code></a> Prepare release 23.9.1 (<a href="https://redirect.github.com/psf/black/issues/3878">#3878</a>)</li>
  <li><a href="https://github.com/psf/black/commit/62dca32dc55a850f39d78ba8b9c21cc4261a2ddf"><code>62dca32</code></a> mypyc builds on PRs, skip mypyc wheels for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3870">#3870</a>)</li>
  <li><a href="https://github.com/psf/black/commit/751583a1dfc691423d96d7711a4c8d9cfe3ee9c8"><code>751583a</code></a> Pickle raw tuples in FileData cache (<a href="https://redirect.github.com/psf/black/issues/3877">#3877</a>)</li>
  <li><a href="https://github.com/psf/black/commit/f7917453c99f8183ffd0397affcccb2c37594771"><code>f791745</code></a> Re-export black.Mode (<a href="https://redirect.github.com/psf/black/issues/3875">#3875</a>)</li>
  <li><a href="https://github.com/psf/black/commit/0b62b9c9a44a995e44d64ecf7cc08d8d7037642d"><code>0b62b9c</code></a> Ignore aiohttp DeprecationWarning for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3876">#3876</a>)</li>
  <li><a href="https://github.com/psf/black/commit/c83ad6c077e7bb281cfd3fbdd89bbeb4c980e563"><code>c83ad6c</code></a> Upgrade to Furo 2023.9.10 to fix docs build (<a href="https://redirect.github.com/psf/black/issues/3873">#3873</a>)</li>
  <li><a href="https://github.com/psf/black/commit/4eebfd1a7a4aa2652cfc674cf301d1f2f48098aa"><code>4eebfd1</code></a> Add mypyc test marks to new tests that patch (<a href="https://redirect.github.com/psf/black/issues/3871">#3871</a>)</li>
  <li><a href="https://github.com/psf/black/commit/add161b367a0d5a3cc395ec8e045f7b965edaef8"><code>add161b</code></a> Bump RTD Python version from 3.8 to 3.11 (<a href="https://redirect.github.com/psf/black/issues/3868">#3868</a>)</li>
  <li><a href="https://github.com/psf/black/commit/4e93f2aa01606154dc6af6e494b9f2b7e4c8c7fa"><code>4e93f2a</code></a> Add classifier for 3.12 (<a href="https://redirect.github.com/psf/black/issues/3866">#3866</a>)</li>
  <li><a href="https://github.com/psf/black/commit/716fa08090b6a51e4c72dd0a14b6c45f7da4a9d0"><code>716fa08</code></a> Upgrade mypy (<a href="https://redirect.github.com/psf/black/issues/3864">#3864</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.7.0...23.9.1">compare view</a></li>
  </ul>
  </details>
  <br />


  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2185.org.readthedocs.build/en/2185/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2185/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xL1do
title: Mechanism for register_output_renderer hooks to access full count
state: open
created_at: 2023-09-15T18:57:54Z
updated_at: 2023-09-15T19:27:59Z
author_association: OWNER
type: issue
body:
  The cause of this bug:
  - https://github.com/simonw/datasette-export-notebook/issues/17

  Is that `datasette-export-notebook` was consulting `data["filtered_table_rows_count"]` in the render output plugin function in order to show the total number of rows that would be exported.

  That field is no longer available by default - the `"count"` field is only available if `?_extra=count` was passed.

  It would be useful if plugins like this could access the total count on demand, should they need to.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2186/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xNS3O
title: Datasette for serving JSON only
state: open
created_at: 2023-09-16T05:48:29Z
updated_at: 2023-09-16T05:48:29Z
author_association: NONE
type: issue
body:
  Hi, is there any way to use datasette for serving json only without displaying webpage? I've tried to search about this in documentation but didn't get any information

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2187/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xQBjL
title: Plugin Hooks for "compile to SQL" languages
state: open
created_at: 2023-09-18T01:37:15Z
updated_at: 2023-09-18T06:58:53Z
author_association: CONTRIBUTOR
type: issue
body:
  There's a ton of tools/languages that compile to SQL, which may be nice in Datasette. Some examples:

  - Logica https://logica.dev
  - PRQL https://prql-lang.org
  - Malloy, but not sure if it works with SQLite? https://github.com/malloydata/malloy

  It would be cool if plugins could extend Datasette to use these languages, in both the code editor and API usage.

  A few things I'd imagine a `datasette-prql` or `datasette-logica` plugin would do:

  - `prql=` instead of `sql=`
  - Code editor support (syntax highlighting, autocomplete)
  - Hide/show SQL

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2188/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xVU7b
title: Server hang on parallel execution of queries to named in-memory databases
state: closed
created_at: 2023-09-18T17:23:18Z
updated_at: 2023-09-21T22:26:21Z
closed_at: 2023-09-21T22:26:21Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I've started to encounter a bug where queries to tables inside named in-memory databases sometimes trigger server hangs.

  I'm still trying to figure out what's going on here - on one occasion I managed to Ctrl+C the server and saw an exception that mentioned a thread lock, but usually hitting Ctrl+C does nothing and I have to `kill -9` the PID instead.

  This is all running on my M2 Mac.

  I've seen the bug in the Datasette 1.0 alphas and in Datasette 0.64.3 - but reverting to 0.61 appeared to fix it.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2189/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5amULw
title: Raise an exception if a "plugins" block exists in metadata.json
state: closed
created_at: 2023-09-18T18:08:56Z
updated_at: 2023-10-12T16:20:51Z
closed_at: 2023-10-12T16:20:51Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2190
type: pull
body:
  refs #2183 #2093

  From [this comment](https://github.com/simonw/datasette/pull/2183#issuecomment-1714699724) in #2183: If a `"plugins"` block appears in `metadata.json`, it means that a user hasn't migrated over their plugin configuration from `metadata.json` to `datasette.yaml`, which is a breaking change in Datasette 1.0. 

  This PR will ensure that an error is raised whenever that happens.

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2190.org.readthedocs.build/en/2190/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2190/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5anSg5
state: closed
created_at: 2023-09-18T21:21:16Z
updated_at: 2023-10-12T16:16:38Z
closed_at: 2023-10-12T16:16:38Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2191
type: pull
title:
  Move `permissions`,  `allow` blocks, canned queries and more out of `metadata.yaml` and into `datasette.yaml`

body:
  The PR moves the following fields from `metadata.yaml` to `datasette.yaml`:

  ```
  permissions
  allow
  allow_sql
  queries
  extra_css_urls
  extra_js_urls
  ```

  This is a significant breaking change that users will need to upgrade their `metadata.yaml` files for. But the format/locations are similar to the previous version, so it shouldn't be too difficult to upgrade.

  One note: I'm still working on the Configuration docs, specifically the "reference" section. Though it's pretty small, the rest of read to review

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2191/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5aumyn
title: Stop using parallel SQL queries for tables
state: closed
created_at: 2023-09-20T01:28:43Z
updated_at: 2023-09-20T22:10:56Z
closed_at: 2023-09-20T22:10:55Z
author_association: OWNER
pull_request: simonw/datasette/pulls/2192
type: pull
body:
  Refs:
  - #2189

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2192.org.readthedocs.build/en/2192/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2192/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5xrs8L
title: Cascading DELETE not working with Table.delete(pk)
state: closed
created_at: 2023-09-21T15:46:41Z
updated_at: 2023-09-25T09:38:57Z
closed_at: 2023-09-25T09:38:13Z
author_association: NONE
type: issue
state_reason: completed
body:
  Hi !
  I noticed that when I am trying to use the delete method of the Table object,
  the record get properly deleted from the table, but the cascading delete triggers on foreign keys do not activate.

  `self.db["contact"].delete(contact_id)`

  I tried querying the database directly via DB Browser and the triggers work without any issue.
  Looked up the source code and behind the scene this method is just querying the database normally so I'm not exactly sure where this behavior comes from.

  Thank you in advance for your time ! 

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/595/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xtIJd
title: "Test DATASETTE_LOAD_PLUGINS" test shows errors but did not fail the CI run
state: closed
created_at: 2023-09-21T19:49:34Z
updated_at: 2023-09-21T21:56:43Z
closed_at: 2023-09-21T21:56:43Z
author_association: OWNER
type: issue
state_reason: completed
body:
  > That passed on 3.8 but should have failed: https://github.com/simonw/datasette/actions/runs/6266341481/job/17017099801 - the "Test DATASETTE_LOAD_PLUGINS" test shows errors but did not fail the CI run.

  _Originally posted by @simonw in https://github.com/simonw/datasette/issues/2057#issuecomment-1730201226_
              

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2193/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xtR6C
title: Deploy failing with "plugins/alternative_route.py: Not a directory"
state: closed
created_at: 2023-09-21T20:17:49Z
updated_at: 2023-09-21T22:08:19Z
closed_at: 2023-09-21T22:08:19Z
author_association: OWNER
type: issue
state_reason: completed
body:
  https://github.com/simonw/datasette/actions/runs/6266449018/job/17017460074

  <img width="826" alt="CleanShot 2023-09-21 at 13 17 12@2x" src="https://github.com/simonw/datasette/assets/9599/9f58f39b-4cca-455f-bc6d-ecab14e841a5">

  This is a bit of a mystery, I don't think I've changed anything recently that could have broken this.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2194/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5xtjEK
title: `datasette publish` needs support for the new config/metadata split
state: open
created_at: 2023-09-21T21:08:12Z
updated_at: 2023-09-21T22:57:48Z
author_association: OWNER
type: issue
body:
  > ... which raises the challenge that `datasette publish` doesn't yet know what to do with a config file!

  _Originally posted by @simonw in https://github.com/simonw/datasette/issues/2194#issuecomment-1730259871_
              

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2195/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5x3Gbv
title: Discord invite link returns 401
state: closed
created_at: 2023-09-24T15:16:54Z
updated_at: 2023-10-13T00:07:08Z
closed_at: 2023-10-12T21:54:54Z
author_association: NONE
type: issue
state_reason: completed
body:
  I found the link to the datasette discord channel via [this query](https://github.com/search?q=repo%3Asimonw%2Fdatasette%20discord&type=code).

  The following video should be self explanatory:

  https://github.com/simonw/datasette/assets/1892194/8cd33e88-bcaa-41f3-9818-ab4d589c3f02


  Link for reference: https://discord.com/invite/ktd74dm5mw

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2196/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5bifPC
title: Fixes mapping for time fields related to mysql, closes #522
state: closed
created_at: 2023-09-29T13:41:48Z
updated_at: 2023-11-04T00:49:50Z
closed_at: 2023-11-04T00:49:50Z
author_association: CONTRIBUTOR
pull_request: simonw/sqlite-utils/pulls/596
type: pull
body:
  Adds `COLUMN_TYPE_MAPPING` for `TIME` fields that are mapped as `datetime.timedelta` for MySQL and json represantation for `datetime.timedelta` in order to fix #522

  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--596.org.readthedocs.build/en/596/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/596/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM5ydzxL
title: sqlite-utils insert-files should be able to convert fields
state: open
created_at: 2023-09-30T22:20:47Z
updated_at: 2023-09-30T22:20:47Z
author_association: NONE
type: issue
body:
  Currently using both `insert-files` and `convert` is needed in order to create sqlar files, it would be more convenient if it could be done with just one command.

  ```shell
  ~
  ❯ cat test.py
  import os

  class Example:
      def __init__(self, arg1, arg2):
          self.arg1 = arg1

  ~
  ❯ sqlite-utils insert-files test.sqlar sqlar test.py -c name:name -c data:content -c mode:mode -c mtime:mtime -c sz:size --pk=name
    [####################################]  100%

  ~
  ❯ sqlite-utils convert test.sqlar sqlar data "zlib.compress(value)" --import=zlib --where "name = 'test.py'"
  [####################################]  100%

  ~
  ❯ cat test.py | sqlite-utils convert test.sqlar sqlar data "zlib.compress(sys.stdin.buffer.read())" --import=zlib --import=sys --where "name = 'test.py'" # Alternative way
    [####################################]  100%

  ~
  ❯ sqlite3 test.sqlar "SELECT hex(data) FROM sqlar WHERE name = 'test.py';" | python3 -c "import sys, zlib; sys.stdout.buffer.write(zlib.decompress(bytes.fromhex(sys.stdin.read())))"
  import os

  class Example:
      def __init__(self, arg1, arg2):
          self.arg1 = arg1

  ~
  ❯ rm test.py

  ~
  ❯ sqlar -l test.sqlar
  test.py

  ~
  ❯ sqlar -x test.sqlar

  ~
  ❯ cat test.py
  import os

  class Example:
      def __init__(self, arg1, arg2):
          self.arg1 = arg1

  ```

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/597/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5b7Z_y
title: Fixed issue #433 - CLI eats cursor
state: closed
created_at: 2023-10-04T18:06:58Z
updated_at: 2023-11-04T00:46:55Z
closed_at: 2023-11-04T00:40:30Z
author_association: CONTRIBUTOR
pull_request: simonw/sqlite-utils/pulls/598
type: pull
body:
  The issue is that underlying iterator is not fully consumed within the body of the `with file_progress()` block. Instead, that block creates generator expressions like `docs = (dict(zip(headers, row)) for row in reader)`

  These iterables are consumed later, outside the `with file_progress()` block, which consumes the underlying iterator, and in turn updates the progress bar.

  This means that the `ProgressBar.__exit__` method gets called before the last time the `ProgressBar.update` method gets called. The result is that the code to make the cursor invisible (inside the `update()` method) is called after the cleanup code to make it visible (in the `__exit__` method).

  The fix is to move consumption of the `docs` iterators within the progress bar block. (

  (An additional fix, to make ProgressBar more robust against this kind of misuse, would to make it refusing to update after its `__exit__` method had been called, just like files cannot be `read()` after they are closed. That requires a in the click library).

  Note that Github diff obscures the simplicity of this diff, it's just indenting a block of code.


  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--598.org.readthedocs.build/en/598/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/598/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0}


node_id: I_kwDOBm6k_c5zCZc7
title: click-default-group-wheel dependency conflict
state: closed
created_at: 2023-10-06T11:49:20Z
updated_at: 2023-10-12T21:53:17Z
closed_at: 2023-10-12T21:53:17Z
author_association: NONE
type: issue
state_reason: completed
body:
  I upgraded my dependencies, then ran into this problem running `datasette inspect`:

  > env/lib/python3.9/site-packages/datasette/cli.py", line 6, in <module>
  >     from click_default_group import DefaultGroup
  > ModuleNotFoundError: No module named 'click_default_group'

  Turns out the released version of datasette still depends on `click-default-group-wheel`, so `click-default-group` doesn't get installed/recognized:

  ```
  $ virtualenv venv
  $ source venv/bin/activate
  $ pip install datasette
  $ pip list | grep click-default-group
  click-default-group       1.2.4
  click-default-group-wheel 1.2.3
  $ python -c "from click_default_group import DefaultGroup"
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named 'click_default_group'
  $ pip install --force-reinstall click-default-group
  ...
  ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
  This behaviour is the source of the following dependency conflicts.
  datasette 0.64.4 requires click-default-group-wheel>=1.2.2, which is not installed.
  Successfully installed click-8.1.7 click-default-group-1.2.4
  ```

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2197/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5zJNbO
title: --load-extension=spatialite not working with Windows
state: open
created_at: 2023-10-08T12:50:22Z
updated_at: 2023-10-08T12:50:22Z
author_association: NONE
type: issue
body:
  Using each of
  `python -m datasette counties.db -m metadata.yml --load-extension=SpatiaLite`

  and 

  `python -m datasette counties.db --load-extension="C:\Windows\System32\mod_spatialite.dll"`

  and

  `python -m datasette counties.db --load-extension=C:\Windows\System32\mod_spatialite.dll`

  I got the error:

  ```
    File "C:\Users\m3n7es\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\datasette\database.py", line 209, in in_thread
      self.ds._prepare_connection(conn, self.name)
    File "C:\Users\m3n7es\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\datasette\app.py", line 596, in _prepare_connection
      conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])
  sqlite3.OperationalError: The specified module could not be found.

  ```

  I finally tried modifying the code in app.py to read:

  ```
      def _prepare_connection(self, conn, database):
          conn.row_factory = sqlite3.Row
          conn.text_factory = lambda x: str(x, "utf-8", "replace")
          if self.sqlite_extensions:
              conn.enable_load_extension(True)
              for extension in self.sqlite_extensions:
                  # "extension" is either a string path to the extension
                  # or a 2-item tuple that specifies which entrypoint to load.
                  #if isinstance(extension, tuple):
                  #    path, entrypoint = extension
                  #    conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])
                  #else:
                  conn.execute("SELECT load_extension('C:\Windows\System32\mod_spatialite.dll')")

  ```
  At which point the counties example worked. 

  Is there a correct way to install/use the extension on Windows? My method will cause issues if there's a second extension to be used.

  On an unrelated note, my next step is to figure out how to write a query across the two loaded databases supplied from the command line:
  `python -m datasette rm_toucans_23_10_07.db counties.db -m metadata.yml --load-extension=SpatiaLite`

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2198/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5zp1Sy
title: Detailed upgrade instructions for metadata.yaml -> datasette.yaml
state: open
created_at: 2023-10-12T16:21:25Z
updated_at: 2023-10-12T22:08:42Z
author_association: OWNER
type: issue
body:
  > `Exception: Datasette no longer accepts plugin configuration in --metadata. Move your "plugins" configuration blocks to a separate file - we suggest calling that datasette..json - and start Datasette with datasette -c datasette..json. See https://docs.datasette.io/en/latest/configuration.html for more details.`
  >
  > I think we should link directly to documentation that tells people how to perform this upgrade.

  _Originally posted by @simonw in https://github.com/simonw/datasette/issues/2190#issuecomment-1759947021_
              

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2199/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOEhK-wc5z08kD
title: time data '2014-11-21T11:44:12.000Z' does not match format '%Y%m%dT%H%M%SZ'
state: open
created_at: 2023-10-14T13:24:39Z
updated_at: 2023-10-14T13:24:39Z
author_association: NONE
type: issue
body:
  ```
  evernote-to-sqlite enex evernote.db ./我的笔记.enex
  Importing from ENEX  [#####-------------------------------]   14%
  Traceback (most recent call last):
    File "/usr/local/bin/evernote-to-sqlite", line 8, in <module>
      sys.exit(cli())
               ^^^^^
    File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
      return self.main(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
      rv = self.invoke(ctx)
           ^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
      return ctx.invoke(self.callback, **ctx.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
      return __callback(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/evernote_to_sqlite/cli.py", line 31, in enex
      save_note(db, note)
    File "/usr/local/lib/python3.11/site-packages/evernote_to_sqlite/utils.py", line 46, in save_note
      "created": convert_datetime(created),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/evernote_to_sqlite/utils.py", line 111, in convert_datetime
      return datetime.datetime.strptime(s, "%Y%m%dT%H%M%SZ").isoformat()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py", line 568, in _strptime_datetime
      tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/_strptime.py", line 349, in _strptime
      raise ValueError("time data %r does not match format %r" %
  ValueError: time data '2014-11-21T11:44:12.000Z' does not match format '%Y%m%dT%H%M%SZ'
  ```

  enex is exported by evernote mac client 

reactions:
  {"url": "https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/16/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5dJF8z
title: Bump the python-packages group with 1 update
state: closed
created_at: 2023-10-18T13:25:55Z
updated_at: 2023-10-24T13:40:29Z
closed_at: 2023-10-24T13:40:26Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2200
type: pull
body:
  Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).

  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
  <blockquote>
  <h2>23.10.0</h2>
  <h3>Stable style</h3>
  <ul>
  <li>Fix comments getting removed from inside parenthesized strings (<a href="https://redirect.github.com/psf/black/issues/3909">#3909</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix long lines with power operators getting split before the line length (<a href="https://redirect.github.com/psf/black/issues/3942">#3942</a>)</li>
  <li>Long type hints are now wrapped in parentheses and properly indented when split across
  multiple lines (<a href="https://redirect.github.com/psf/black/issues/3899">#3899</a>)</li>
  <li>Magic trailing commas are now respected in return types. (<a href="https://redirect.github.com/psf/black/issues/3916">#3916</a>)</li>
  <li>Require one empty line after module-level docstrings. (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>)</li>
  <li>Treat raw triple-quoted strings as docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Fix cache versioning logic when <code>BLACK_CACHE_DIR</code> is set (<a href="https://redirect.github.com/psf/black/issues/3937">#3937</a>)</li>
  </ul>
  <h3>Parser</h3>
  <ul>
  <li>Fix bug where attributes named <code>type</code> were not acccepted inside <code>match</code> statements
  (<a href="https://redirect.github.com/psf/black/issues/3950">#3950</a>)</li>
  <li>Add support for PEP 695 type aliases containing lambdas and other unusual expressions
  (<a href="https://redirect.github.com/psf/black/issues/3949">#3949</a>)</li>
  </ul>
  <h3>Output</h3>
  <ul>
  <li>Black no longer attempts to provide special errors for attempting to format Python 2
  code (<a href="https://redirect.github.com/psf/black/issues/3933">#3933</a>)</li>
  <li>Black will more consistently print stacktraces on internal errors in verbose mode
  (<a href="https://redirect.github.com/psf/black/issues/3938">#3938</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>The action output displayed in the job summary is now wrapped in Markdown (<a href="https://redirect.github.com/psf/black/issues/3914">#3914</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
  <blockquote>
  <h2>23.10.0</h2>
  <h3>Stable style</h3>
  <ul>
  <li>Fix comments getting removed from inside parenthesized strings (<a href="https://redirect.github.com/psf/black/issues/3909">#3909</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix long lines with power operators getting split before the line length (<a href="https://redirect.github.com/psf/black/issues/3942">#3942</a>)</li>
  <li>Long type hints are now wrapped in parentheses and properly indented when split across
  multiple lines (<a href="https://redirect.github.com/psf/black/issues/3899">#3899</a>)</li>
  <li>Magic trailing commas are now respected in return types. (<a href="https://redirect.github.com/psf/black/issues/3916">#3916</a>)</li>
  <li>Require one empty line after module-level docstrings. (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>)</li>
  <li>Treat raw triple-quoted strings as docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Fix cache versioning logic when <code>BLACK_CACHE_DIR</code> is set (<a href="https://redirect.github.com/psf/black/issues/3937">#3937</a>)</li>
  </ul>
  <h3>Parser</h3>
  <ul>
  <li>Fix bug where attributes named <code>type</code> were not acccepted inside <code>match</code> statements
  (<a href="https://redirect.github.com/psf/black/issues/3950">#3950</a>)</li>
  <li>Add support for PEP 695 type aliases containing lambdas and other unusual expressions
  (<a href="https://redirect.github.com/psf/black/issues/3949">#3949</a>)</li>
  </ul>
  <h3>Output</h3>
  <ul>
  <li>Black no longer attempts to provide special errors for attempting to format Python 2
  code (<a href="https://redirect.github.com/psf/black/issues/3933">#3933</a>)</li>
  <li>Black will more consistently print stacktraces on internal errors in verbose mode
  (<a href="https://redirect.github.com/psf/black/issues/3938">#3938</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>The action output displayed in the job summary is now wrapped in Markdown (<a href="https://redirect.github.com/psf/black/issues/3914">#3914</a>)</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/psf/black/commit/9edba85f71d50d12996ef7bda576426362016171"><code>9edba85</code></a> Prepare release 23.10.0 (<a href="https://redirect.github.com/psf/black/issues/3951">#3951</a>)</li>
  <li><a href="https://github.com/psf/black/commit/bb588073ab286a9f1f8d839ab2cebe13011dd22c"><code>bb58807</code></a> Fix parser bug where &quot;type&quot; was misinterpreted as a keyword inside a match (#...</li>
  <li><a href="https://github.com/psf/black/commit/722735d20ebdc66c0da0e0df7658293455694500"><code>722735d</code></a> Fix grammar for type alias support (<a href="https://redirect.github.com/psf/black/issues/3949">#3949</a>)</li>
  <li><a href="https://github.com/psf/black/commit/abe57e3d92727f1b26c717fad3978159b987fe79"><code>abe57e3</code></a> Treat raw strings like other docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
  <li><a href="https://github.com/psf/black/commit/1648ac51806d092c95cb9bb2e4a5bffda6095bc1"><code>1648ac5</code></a> Fix long lines with power operator(s) getting splitted before line length (<a href="https://redirect.github.com/psf/black/issues/3">#3</a>...</li>
  <li><a href="https://github.com/psf/black/commit/6f84f652850dca8a1b578581e2fbb2cb95e791cc"><code>6f84f65</code></a> Migrate mypy config to pyproject.toml (<a href="https://redirect.github.com/psf/black/issues/3936">#3936</a>)</li>
  <li><a href="https://github.com/psf/black/commit/3bb92146f59804a6ead47d5f2d0fdc47daa6b698"><code>3bb9214</code></a> CI Test: Deprecating 'Healthcheck.all()' from Hypothesis in fuzz.py (<a href="https://redirect.github.com/psf/black/issues/3945">#3945</a>)</li>
  <li><a href="https://github.com/psf/black/commit/935f303a0a7b794e722c7df00c906be285884874"><code>935f303</code></a> Fix test that was not being run (<a href="https://redirect.github.com/psf/black/issues/3939">#3939</a>)</li>
  <li><a href="https://github.com/psf/black/commit/b7717c3f1e73d6b847e2534a2cebbb657b96caf8"><code>b7717c3</code></a> Standardise newlines after module-level docstrings (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>)</li>
  <li><a href="https://github.com/psf/black/commit/7aa37ea0adf864baf3ef3dfbcfaf5ff1ff780250"><code>7aa37ea</code></a> Report all stacktraces in verbose mode (<a href="https://redirect.github.com/psf/black/issues/3938">#3938</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.9.1...23.10.0">compare view</a></li>
  </ul>
  </details>
  <br />


  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=black&package-manager=pip&previous-version=23.9.1&new-version=23.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2200.org.readthedocs.build/en/2200/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2200/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c50kUBu
title: Discord invite link is invalid
state: open
created_at: 2023-10-21T21:50:05Z
updated_at: 2023-10-21T21:50:05Z
author_association: NONE
type: issue
body:
  https://datasette.io/discord leads to https://discord.com/invite/ktd74dm5mw and returns the following:

  <img width="448" alt="CleanShot 2023-10-21 at 14 49 45@2x" src="https://github.com/simonw/datasette/assets/11708906/a126cbf6-0a4d-41b8-9986-7567d40d453f">

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2201/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5dpF-F
title: Bump the python-packages group with 1 update
state: closed
created_at: 2023-10-24T13:40:21Z
updated_at: 2023-11-08T13:19:03Z
closed_at: 2023-11-08T13:19:01Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2202
type: pull
body:
  Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).

  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
  <blockquote>
  <h2>23.10.1</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Maintanence release to get a fix out for GitHub Action edge case (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix merging implicit multiline strings that have inline comments (<a href="https://redirect.github.com/psf/black/issues/3956">#3956</a>)</li>
  <li>Allow empty first line after block open before a comment or compound statement (<a href="https://redirect.github.com/psf/black/issues/3967">#3967</a>)</li>
  </ul>
  <h3>Packaging</h3>
  <ul>
  <li>Change Dockerfile to hatch + compile black (<a href="https://redirect.github.com/psf/black/issues/3965">#3965</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>The summary output for GitHub workflows is now suppressible using the <code>summary</code>
  parameter. (<a href="https://redirect.github.com/psf/black/issues/3958">#3958</a>)</li>
  <li>Fix the action failing when Black check doesn't pass (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <h3>Documentation</h3>
  <ul>
  <li>It is known Windows documentation CI is broken
  <a href="https://redirect.github.com/psf/black/issues/3968">psf/black#3968</a></li>
  </ul>
  <h2>23.10.0</h2>
  <h3>Stable style</h3>
  <ul>
  <li>Fix comments getting removed from inside parenthesized strings (<a href="https://redirect.github.com/psf/black/issues/3909">#3909</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix long lines with power operators getting split before the line length (<a href="https://redirect.github.com/psf/black/issues/3942">#3942</a>)</li>
  <li>Long type hints are now wrapped in parentheses and properly indented when split across
  multiple lines (<a href="https://redirect.github.com/psf/black/issues/3899">#3899</a>)</li>
  <li>Magic trailing commas are now respected in return types. (<a href="https://redirect.github.com/psf/black/issues/3916">#3916</a>)</li>
  <li>Require one empty line after module-level docstrings. (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>)</li>
  <li>Treat raw triple-quoted strings as docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Fix cache versioning logic when <code>BLACK_CACHE_DIR</code> is set (<a href="https://redirect.github.com/psf/black/issues/3937">#3937</a>)</li>
  </ul>
  <h3>Parser</h3>
  <ul>
  <li>Fix bug where attributes named <code>type</code> were not acccepted inside <code>match</code> statements
  (<a href="https://redirect.github.com/psf/black/issues/3950">#3950</a>)</li>
  <li>Add support for PEP 695 type aliases containing lambdas and other unusual expressions
  (<a href="https://redirect.github.com/psf/black/issues/3949">#3949</a>)</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
  <blockquote>
  <h2>23.10.1</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Maintanence release to get a fix out for GitHub Action edge case (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix merging implicit multiline strings that have inline comments (<a href="https://redirect.github.com/psf/black/issues/3956">#3956</a>)</li>
  <li>Allow empty first line after block open before a comment or compound statement (<a href="https://redirect.github.com/psf/black/issues/3967">#3967</a>)</li>
  </ul>
  <h3>Packaging</h3>
  <ul>
  <li>Change Dockerfile to hatch + compile black (<a href="https://redirect.github.com/psf/black/issues/3965">#3965</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>The summary output for GitHub workflows is now suppressible using the <code>summary</code>
  parameter. (<a href="https://redirect.github.com/psf/black/issues/3958">#3958</a>)</li>
  <li>Fix the action failing when Black check doesn't pass (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <h3>Documentation</h3>
  <ul>
  <li>It is known Windows documentation CI is broken
  <a href="https://redirect.github.com/psf/black/issues/3968">psf/black#3968</a></li>
  </ul>
  <h2>23.10.0</h2>
  <h3>Stable style</h3>
  <ul>
  <li>Fix comments getting removed from inside parenthesized strings (<a href="https://redirect.github.com/psf/black/issues/3909">#3909</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Fix long lines with power operators getting split before the line length (<a href="https://redirect.github.com/psf/black/issues/3942">#3942</a>)</li>
  <li>Long type hints are now wrapped in parentheses and properly indented when split across
  multiple lines (<a href="https://redirect.github.com/psf/black/issues/3899">#3899</a>)</li>
  <li>Magic trailing commas are now respected in return types. (<a href="https://redirect.github.com/psf/black/issues/3916">#3916</a>)</li>
  <li>Require one empty line after module-level docstrings. (<a href="https://redirect.github.com/psf/black/issues/3932">#3932</a>)</li>
  <li>Treat raw triple-quoted strings as docstrings (<a href="https://redirect.github.com/psf/black/issues/3947">#3947</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Fix cache versioning logic when <code>BLACK_CACHE_DIR</code> is set (<a href="https://redirect.github.com/psf/black/issues/3937">#3937</a>)</li>
  </ul>
  <h3>Parser</h3>
  <ul>
  <li>Fix bug where attributes named <code>type</code> were not accepted inside <code>match</code> statements
  (<a href="https://redirect.github.com/psf/black/issues/3950">#3950</a>)</li>
  <li>Add support for PEP 695 type aliases containing lambdas and other unusual expressions</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/psf/black/commit/744d23b34800c06e10272149b70752396e90eeb8"><code>744d23b</code></a> Prepare release 23.10.1 (<a href="https://redirect.github.com/psf/black/issues/3969">#3969</a>)</li>
  <li><a href="https://github.com/psf/black/commit/8de4be516879302afce542ac80a6a43ced807759"><code>8de4be5</code></a> Fix CI failing (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  <li><a href="https://github.com/psf/black/commit/c0adca321dc0d97a704de8ed0353e5b894a6a912"><code>c0adca3</code></a> docs: specifies the use of the .git-blame-ignore-revs file (<a href="https://redirect.github.com/psf/black/issues/3961">#3961</a>)</li>
  <li><a href="https://github.com/psf/black/commit/a7643fac8d97c15640a2b1a79f68b3dc771aebfb"><code>a7643fa</code></a> Add summary parameter to action (<a href="https://redirect.github.com/psf/black/issues/3958">#3958</a>)</li>
  <li><a href="https://github.com/psf/black/commit/d291c2338c3c1feee4f3f26985c0964ec1b7eb9f"><code>d291c23</code></a> Move Docker image to hatch + compile (<a href="https://redirect.github.com/psf/black/issues/3965">#3965</a>)</li>
  <li><a href="https://github.com/psf/black/commit/7f1c578b89b2c256a6ce3b70fc1b970b3ffa3349"><code>7f1c578</code></a> Bump peter-evans/create-or-update-comment from 3.0.2 to 3.1.0 (<a href="https://redirect.github.com/psf/black/issues/3966">#3966</a>)</li>
  <li><a href="https://github.com/psf/black/commit/2db5ab0a7b3b321e4cec70964239ee88087cd810"><code>2db5ab0</code></a> Allow empty line after block open before a comment or compound statement (<a href="https://redirect.github.com/psf/black/issues/3967">#3967</a>)</li>
  <li><a href="https://github.com/psf/black/commit/0a37888e79059018eef9293a724b14da59d3377a"><code>0a37888</code></a> Fix typos in CHANGES.md (<a href="https://redirect.github.com/psf/black/issues/3963">#3963</a>)</li>
  <li><a href="https://github.com/psf/black/commit/882d8795c6ff65c02f2657e596391748d1b6b7f5"><code>882d879</code></a> Fix merging implicit multiline strings that have inline comments (<a href="https://redirect.github.com/psf/black/issues/3956">#3956</a>)</li>
  <li><a href="https://github.com/psf/black/commit/9edba85f71d50d12996ef7bda576426362016171"><code>9edba85</code></a> Prepare release 23.10.0 (<a href="https://redirect.github.com/psf/black/issues/3951">#3951</a>)</li>
  <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.9.1...23.10.1">compare view</a></li>
  </ul>
  </details>
  <br />


  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=black&package-manager=pip&previous-version=23.9.1&new-version=23.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2202.org.readthedocs.build/en/2202/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2202/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM511mrO
title: Cannot find spatialite on arm64 linux
state: closed
created_at: 2023-11-03T22:05:51Z
updated_at: 2023-11-04T01:06:31Z
closed_at: 2023-11-04T00:33:28Z
author_association: CONTRIBUTOR
type: issue
state_reason: completed
body:
  Initially, I found an issue in `datasette` where it wouldn’t find `spatialite` when running on my Radxa Rock 5B - an RK3588 powered SBC, running the arm64 build of Debian Bullseye. I confirmed the same behaviour on my Raspberry Pi 4 - a BCM2711 powered SBC, running the arm64 build of Debian Bookworm.

  ```
  $ datasette --load-extension=spatialite example.db
  Error: Could not find SpatiaLite extension
  ```

  I did some digging and realised the issue originates in this project. Even with the `libsqlite3-mod-spatialite` package installed, `pytest` skips all of the GIS tests in the project.

  ```
  $ apt list --installed | grep spatial
  […]
  libsqlite3-mod-spatialite/stable,now 5.0.1-3 arm64 [installed]

  $ ls -l /usr/lib/*/*spatial*
  lrwxrwxrwx 1 root root      23 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so -> mod_spatialite.so.7.1.0
  lrwxrwxrwx 1 root root      23 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so.7 -> mod_spatialite.so.7.1.0
  -rw-r--r-- 1 root root 7348584 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so.7.1.0
  ```

  ```
  $ pytest
  tests/test_get.py ......                                                 [ 73%]
  tests/test_gis.py ssssssssssss                                           [ 75%]
  tests/test_hypothesis.py ....                                            [ 75%]
  ```

  I tracked the issue down to the [`find_sqlite()` function in the `utils.py`](https://github.com/simonw/sqlite-utils/blob/622c3a5a7dd53a09c029e2af40c2643fe7579340/sqlite_utils/utils.py#L60) file. The [`SPATIALITE_PATHS`](https://github.com/simonw/sqlite-utils/blob/main/sqlite_utils/utils.py#L34-L39) array doesn’t have an entry for the location of this module on arm64 linux.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/599/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5elFZf
title: Add spatialite arm64 linux path
state: closed
created_at: 2023-11-03T22:23:26Z
updated_at: 2023-11-04T00:34:33Z
closed_at: 2023-11-04T00:31:49Z
author_association: CONTRIBUTOR
pull_request: simonw/sqlite-utils/pulls/600
type: pull
body:
  According to both [Debian](https://packages.debian.org/bookworm/arm64/libsqlite3-mod-spatialite/filelist) and [Ubuntu](https://packages.ubuntu.com/mantic/arm64/libsqlite3-mod-spatialite/filelist), the correct “target triple” for arm64 is `aarch64-linux-gnu`, so we should be looking in `/usr/lib/aarch64-linux-gnu` for `mod_spatialite.so`.

  I can confirm that on both of my Debian arm64 SBCs, `libsqlite3-mod-spatialite` installs to that path.

  ```
  $ ls -l /usr/lib/*/*spatial*
  lrwxrwxrwx 1 root root      23 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so -> mod_spatialite.so.7.1.0
  lrwxrwxrwx 1 root root      23 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so.7 -> mod_spatialite.so.7.1.0
  -rw-r--r-- 1 root root 7348584 Dec  1  2022 /usr/lib/aarch64-linux-gnu/mod_spatialite.so.7.1.0
  ```

  This is a set of before and after snippets of pytest’s output for this PR.

  ### Before

  ```
  $ pytest
  tests/test_get.py ......                                                 [ 73%]
  tests/test_gis.py ssssssssssss                                           [ 75%]
  tests/test_hypothesis.py ....                                            [ 75%]
  ```

  ### After

  ```
  $ pytest
  tests/test_get.py ......                                                 [ 73%]
  tests/test_gis.py ............                                           [ 75%]
  tests/test_hypothesis.py ....                                            [ 75%]
  ```


  Issue: #599

  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--600.org.readthedocs.build/en/600/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/600/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM512QA5
title: Move plugin directory into documentation
state: open
created_at: 2023-11-04T04:07:52Z
updated_at: 2023-11-04T04:07:52Z
author_association: OWNER
type: issue
body:
  https://github.com/simonw/sqlite-utils-plugins should be in the official documentation.

  I can use the same pattern as https://llm.datasette.io/en/stable/plugins/directory.html

  https://til.simonwillison.net/readthedocs/stable-docs

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/601/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c514bRo
title: custom plugin not seen as sql function
state: open
created_at: 2023-11-05T10:30:19Z
updated_at: 2023-11-05T10:30:19Z
author_association: NONE
type: issue
body:
  Hi, I'm not sure if this is the right repo for this issue.

  I'm using datasette with the parquet (to read a duckdb), and jellyfish plugins. Both work perfectly.

  Now I need to create a simple plugin that uses the python rouge package and returns a similarity score (similarly to how the jellyfish plugin works).
  If I create a custom plugin, even the example hello_world one, copied directly from the tutorial, I get the following error:
  ```duckdb.duckdb.CatalogException: Catalog Error: Scalar Function with name hello_world does not exist!```

  Since the jellyfish plugin doesn't do anything more complex, I'm wondering if there is some other kind of issue with my setup.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2203/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c515jsf
title: request.post_body() can only be called once
state: open
created_at: 2023-11-05T23:22:03Z
updated_at: 2023-11-05T23:23:23Z
author_association: OWNER
type: issue
body:
  This code here:

  https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/utils/asgi.py#L127-L135

  It consumes the messages, which means if you try to call it a second time you won't be able to get at the body.

  This is efficient - we don't end up with a `request` object property with potentially megabytes of content that we never look at again - but it's inconvenient for cases like middleware or functions where we don't know if the body has been consumed yet or not.

  Potential solution: set `request._body` the first time it is called, and return that on subsequent calls.

  Potential optimization: only do this for bodies that are shorter than a certain threshold - maybe 1MB - and raise an exception if you attempt to call `post_body()` multiple times against one of those larger bodies.

  I'm a bit nervous about that option though, since it could result in errors that don't show up in testing but do show up in production.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2204/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c515j9k
title: request.post_vars() method obliterates form keys with multiple values
state: open
created_at: 2023-11-05T23:25:08Z
updated_at: 2023-11-06T04:10:34Z
author_association: OWNER
type: issue
body:
  https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/utils/asgi.py#L137-L139

  In GET requests you can do `?foo=1&foo=2` - you can do the same in POST requests, but the `dict()` call here eliminates those duplicates.

  You can't even try calling `post_body()` and implement your own custom parsing because of:
  - #2204

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2205/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM517xbD
title: `sqlite-utils transform` removes the `AUTOINCREMENT` keyword
state: open
created_at: 2023-11-06T08:48:43Z
updated_at: 2023-11-06T08:48:43Z
author_association: NONE
type: issue
body:
  ### Context

  We ran into this bug randomly, noticing that deleted `ROWID` would get reused after migrating the DB. Using `transform` to change any column in the table will also unexpectedly strip away the `AUTOINCREMENT` keyword from the primary key definition, even if it was not the transformation target.

  ### Reproducible example

  **Original database**

  ```sql
  $ sqlite3 test.db << EOF
  CREATE TABLE mytable (
      col1 INTEGER PRIMARY KEY AUTOINCREMENT,
      col2 TEXT NOT NULL
  )
  EOF

  $ sqlite3 test.db ".schema mytable"
  CREATE TABLE mytable (
      col1 INTEGER PRIMARY KEY AUTOINCREMENT,
      col2 TEXT NOT NULL
  );
  ```

  **Modified database after sqlite-utils**

  ```sql
  $ sqlite-utils transform test.db mytable --rename col2 renamedcol2

  $ sqlite3 test.db "SELECT sql FROM sqlite_master WHERE name = 'mytable';"
  CREATE TABLE IF NOT EXISTS "mytable" (
     [col1] INTEGER PRIMARY KEY,
     [renamedcol2] TEXT NOT NULL
  );
  ```

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/602/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5e7WH7
title: Bump the python-packages group with 1 update
state: open
created_at: 2023-11-08T13:18:56Z
updated_at: 2023-12-08T13:46:24Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2206
type: pull
body:
  Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).

  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p>
  <blockquote>
  <h2>23.11.0</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Support formatting ranges of lines with the new <code>--line-ranges</code> command-line option
  (<a href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
  </ul>
  <h3>Stable style</h3>
  <ul>
  <li>Fix crash on formatting bytes strings that look like docstrings (<a href="https://redirect.github.com/psf/black/issues/4003">#4003</a>)</li>
  <li>Fix crash when whitespace followed a backslash before newline in a docstring (<a href="https://redirect.github.com/psf/black/issues/4008">#4008</a>)</li>
  <li>Fix standalone comments inside complex blocks crashing Black (<a href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
  <li>Fix crash on formatting code like <code>await (a ** b)</code> (<a href="https://redirect.github.com/psf/black/issues/3994">#3994</a>)</li>
  <li>No longer treat leading f-strings as docstrings. This matches Python's behaviour and
  fixes a crash (<a href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Multiline dicts and lists that are the sole argument to a function are now
  indented less (<a href="https://redirect.github.com/psf/black/issues/3964">#3964</a>)</li>
  <li>Multiline unpacked dicts and lists as the sole argument to a function are now also
  indented less (<a href="https://redirect.github.com/psf/black/issues/3992">#3992</a>)</li>
  <li>In f-string debug expressions, quote types that are visible in the final string
  are now preserved (<a href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
  <li>Fix a bug where long <code>case</code> blocks were not split into multiple lines. Also enable
  general trailing comma rules on <code>case</code> blocks (<a href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
  <li>Keep requiring two empty lines between module-level docstring and first function or
  class definition (<a href="https://redirect.github.com/psf/black/issues/4028">#4028</a>)</li>
  <li>Add support for single-line format skip with other comments on the same line (<a href="https://redirect.github.com/psf/black/issues/3959">#3959</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Consistently apply force exclusion logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
  <li>Fix a bug in the matching of absolute path names in <code>--include</code> (<a href="https://redirect.github.com/psf/black/issues/3976">#3976</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Fix mypyc builds on arm64 on macOS (<a href="https://redirect.github.com/psf/black/issues/4017">#4017</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black's pre-commit integration will now run only on git hooks appropriate for a code
  formatter (<a href="https://redirect.github.com/psf/black/issues/3940">#3940</a>)</li>
  </ul>
  <h2>23.10.1</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Maintanence release to get a fix out for GitHub Action edge case (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p>
  <blockquote>
  <h2>23.11.0</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Support formatting ranges of lines with the new <code>--line-ranges</code> command-line option
  (<a href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
  </ul>
  <h3>Stable style</h3>
  <ul>
  <li>Fix crash on formatting bytes strings that look like docstrings (<a href="https://redirect.github.com/psf/black/issues/4003">#4003</a>)</li>
  <li>Fix crash when whitespace followed a backslash before newline in a docstring (<a href="https://redirect.github.com/psf/black/issues/4008">#4008</a>)</li>
  <li>Fix standalone comments inside complex blocks crashing Black (<a href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
  <li>Fix crash on formatting code like <code>await (a ** b)</code> (<a href="https://redirect.github.com/psf/black/issues/3994">#3994</a>)</li>
  <li>No longer treat leading f-strings as docstrings. This matches Python's behaviour and
  fixes a crash (<a href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
  </ul>
  <h3>Preview style</h3>
  <ul>
  <li>Multiline dicts and lists that are the sole argument to a function are now indented
  less (<a href="https://redirect.github.com/psf/black/issues/3964">#3964</a>)</li>
  <li>Multiline unpacked dicts and lists as the sole argument to a function are now also
  indented less (<a href="https://redirect.github.com/psf/black/issues/3992">#3992</a>)</li>
  <li>In f-string debug expressions, quote types that are visible in the final string are
  now preserved (<a href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
  <li>Fix a bug where long <code>case</code> blocks were not split into multiple lines. Also enable
  general trailing comma rules on <code>case</code> blocks (<a href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
  <li>Keep requiring two empty lines between module-level docstring and first function or
  class definition (<a href="https://redirect.github.com/psf/black/issues/4028">#4028</a>)</li>
  <li>Add support for single-line format skip with other comments on the same line (<a href="https://redirect.github.com/psf/black/issues/3959">#3959</a>)</li>
  </ul>
  <h3>Configuration</h3>
  <ul>
  <li>Consistently apply force exclusion logic before resolving symlinks (<a href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
  <li>Fix a bug in the matching of absolute path names in <code>--include</code> (<a href="https://redirect.github.com/psf/black/issues/3976">#3976</a>)</li>
  </ul>
  <h3>Performance</h3>
  <ul>
  <li>Fix mypyc builds on arm64 on macOS (<a href="https://redirect.github.com/psf/black/issues/4017">#4017</a>)</li>
  </ul>
  <h3>Integrations</h3>
  <ul>
  <li>Black's pre-commit integration will now run only on git hooks appropriate for a code
  formatter (<a href="https://redirect.github.com/psf/black/issues/3940">#3940</a>)</li>
  </ul>
  <h2>23.10.1</h2>
  <h3>Highlights</h3>
  <ul>
  <li>Maintenance release to get a fix out for GitHub Action edge case (<a href="https://redirect.github.com/psf/black/issues/3957">#3957</a>)</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="https://github.com/psf/black/commit/2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c"><code>2a1c67e</code></a> Prepare release 23.11.0 (<a href="https://redirect.github.com/psf/black/issues/4032">#4032</a>)</li>
  <li><a href="https://github.com/psf/black/commit/72e7a2e43eef2aa0c83652bb6725eb004a2a69f3"><code>72e7a2e</code></a> Remove redundant condition from <code>has_magic_trailing_comma</code> (<a href="https://redirect.github.com/psf/black/issues/4023">#4023</a>)</li>
  <li><a href="https://github.com/psf/black/commit/1a7d9c2f58de1ffcbbe6d133f60f283601ba3f54"><code>1a7d9c2</code></a> Preserve visible quote types for f-string debug expressions (<a href="https://redirect.github.com/psf/black/issues/4005">#4005</a>)</li>
  <li><a href="https://github.com/psf/black/commit/f4c7be5445c87d9af5eba3d12faea62d2635e3d8"><code>f4c7be5</code></a> docs: fix minor typo (<a href="https://redirect.github.com/psf/black/issues/4030">#4030</a>)</li>
  <li><a href="https://github.com/psf/black/commit/2e4fac9d87615e904a49e46a9cab2293e0b13126"><code>2e4fac9</code></a> Apply force exclude logic before symlink resolution (<a href="https://redirect.github.com/psf/black/issues/4015">#4015</a>)</li>
  <li><a href="https://github.com/psf/black/commit/66008fda5dc07f5626e5f5d0dcefc476a9c12ab8"><code>66008fd</code></a> [563] Fix standalone comments inside complex blocks crashing Black (<a href="https://redirect.github.com/psf/black/issues/4016">#4016</a>)</li>
  <li><a href="https://github.com/psf/black/commit/50ed6221d97b265025abaa66116a7b185f2df5e2"><code>50ed622</code></a> Fix long case blocks not split into multiple lines (<a href="https://redirect.github.com/psf/black/issues/4024">#4024</a>)</li>
  <li><a href="https://github.com/psf/black/commit/46be1f8e54ac9a7d67723c0fa28c7bec13a0a2bf"><code>46be1f8</code></a> Support formatting specified lines (<a href="https://redirect.github.com/psf/black/issues/4020">#4020</a>)</li>
  <li><a href="https://github.com/psf/black/commit/ecbd9e8cf71f13068c7e6803a534e00363114c91"><code>ecbd9e8</code></a> Fix crash with f-string docstrings (<a href="https://redirect.github.com/psf/black/issues/4019">#4019</a>)</li>
  <li><a href="https://github.com/psf/black/commit/e808e61db8c7a8f9c7fd4b2fff2281141f6b2517"><code>e808e61</code></a> Preview: Keep requiring two empty lines between module-level docstring and fi...</li>
  <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/23.9.1...23.11.0">compare view</a></li>
  </ul>
  </details>
  <br />


  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=black&package-manager=pip&previous-version=23.9.1&new-version=23.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
  - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


  </details>

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2206.org.readthedocs.build/en/2206/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2206/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM52hn1j
title: Pyhton 3.12 Bug report
state: open
created_at: 2023-11-10T22:57:48Z
updated_at: 2023-12-08T05:10:31Z
author_association: NONE
type: issue
body:
  I start with new python3 verison 3.12.0
  Also have the error where connect DataBase

  ```
  Traceback (most recent call last):
    File "/home/t/Development/python/FKPJ/ClinicSYS/run.py", line 1, in <module>
      import re, os, io, json, sqlite_utils, requests, pytz, logging
    File "/home/t/.local/lib/python3.12/site-packages/sqlite_utils/__init__.py", line 1, in <module>
      from .db import Database
    File "/home/t/.local/lib/python3.12/site-packages/sqlite_utils/db.py", line 277, in <module>
      class Database:
    File "/home/t/.local/lib/python3.12/site-packages/sqlite_utils/db.py", line 306, in Database
      filename_or_conn: Optional[Union[str, pathlib.Path, sqlite3.Connection]] = None,
                                                          ^^^^^^^^^^^^^^^^^^
  ```
  This bug come from `sqlite-utils` since's v3.33.
  Anyone get the same ?

  As well now of the resolved plan just keep the sqlite-utils version in python3.12 with v3.32.1 [tested]
  but where are the sqlite3.Connection problem.... 

  This won't happen on python version down to 3.11[tested]
  Just the python3.12.0, I have test this error are come from the sqlite3 connection
  The error say from `sqlite_utils` and with the sqlite3 Connection, what can I do.

  Let fix together.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/603/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c525uvg
title: ModuleNotFoundError: No module named 'click_default_group
state: open
created_at: 2023-11-15T14:04:32Z
updated_at: 2023-11-15T14:04:32Z
author_association: NONE
type: issue
body:
  No matter what I do, I'm getting this error:

  ```
  $ datasette
  Traceback (most recent call last):
    File "/Users/honza/Library/Caches/pypoetry/virtualenvs/juniorguru-Lgaxwd2n-py3.11/bin/datasette", line 5, in <module>
      from datasette.cli import cli
    File "/Users/honza/Library/Caches/pypoetry/virtualenvs/juniorguru-Lgaxwd2n-py3.11/lib/python3.11/site-packages/datasette/cli.py", line 6, in <module>
      from click_default_group import DefaultGroup
  ModuleNotFoundError: No module named 'click_default_group'
  ```

  I have datasette in my dependencies like this:

  ```toml
  [tool.poetry.group.dev.dependencies]
  datasette = {version = "1.0a7", allow-prereleases = true}
  ```

  I had the latest regular version (not pre-release) there originally, but the result was the same:

  ```toml
  [tool.poetry.group.dev.dependencies]
  datasette = "0.64.5"
  ```

  Full pyproject.toml is at https://github.com/honzajavorek/junior.guru/ Previously datasette worked for me, but I guess something had to upgrade and now I can't even launch it.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2207/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c525xsj
title: No suggested facets when a column named 'value' is included
state: open
created_at: 2023-11-15T14:11:17Z
updated_at: 2023-11-15T14:18:59Z
author_association: CONTRIBUTOR
type: issue
body:
  When a column named 'value' is included there are no suggested facets is shown as the query uses an alias of 'value'.

  https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/facets.py#L168-L174

  Currently the following is shown (from https://latest.datasette.io/fixtures/facetable)

  ![image](https://github.com/simonw/datasette/assets/198537/a919509a-ea88-461b-b25b-8b776720c7c5)

  When I add a column named 'value' only the JSON facets are processed.

  ![image](https://github.com/simonw/datasette/assets/198537/092bd0b3-4c20-434e-88f8-47e2b8994a1d)

  I think that not using aliases could be a solution (except if someone wants to use a column named `count(*)` though this seems to be unlikely). I'll open a PR with that.

  There is also a TODO with a similar question in the same file. I have not looked into that yet.

  https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/facets.py#L512

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2208/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOBm6k_c5fhgOS
title: Fix query for suggested facets with column named value
state: open
created_at: 2023-11-15T14:13:30Z
updated_at: 2023-11-15T15:31:12Z
author_association: CONTRIBUTOR
pull_request: simonw/datasette/pulls/2209
type: pull
body:
  See discussion in https://github.com/simonw/datasette/issues/2208

  <!-- readthedocs-preview datasette start -->
  ----
  :books: Documentation preview :books:: https://datasette--2209.org.readthedocs.build/en/2209/

  <!-- readthedocs-preview datasette end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2209/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: PR_kwDOCGYnMM5f2OZC
title: Add more STRICT table support
state: closed
created_at: 2023-11-19T19:38:53Z
updated_at: 2023-12-08T05:17:20Z
closed_at: 2023-12-08T05:05:27Z
author_association: CONTRIBUTOR
pull_request: simonw/sqlite-utils/pulls/604
type: pull
body:
  - https://github.com/simonw/sqlite-utils/issues/344#issuecomment-982014776

  Make `table.transform()` preserve STRICT mode.

  <!-- readthedocs-preview sqlite-utils start -->
  ----
  :books: Documentation preview :books:: https://sqlite-utils--604.org.readthedocs.build/en/604/

  <!-- readthedocs-preview sqlite-utils end -->

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/604/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM53rgdP
state: closed
created_at: 2023-11-23T10:19:46Z
updated_at: 2023-12-08T05:07:54Z
closed_at: 2023-12-08T05:07:54Z
author_association: NONE
type: issue
state_reason: completed
title:
  Insert fails with `Error: Python int too large to convert to SQLite INTEGER`; can we use `NUMERIC` here?

body:
  I'm currently working on a new feature for Hypothesis, where we can dump a tidy jsonlines table of all the test cases we tried - including arguments, outcomes, timings, coverage, etc.  Exploring this seems like a perfect cases for `sqlite-utils` and `datasette`, but I pretty quickly ran into an integer overflow problem and don't want to recommend that experience to my users.

  I originally went to report this as a bug... and then found https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895581038 almost exactly matched my repro 😅 

  https://github.com/simonw/sqlite-utils/issues/110#issuecomment-626391063 suggests that using `NUMERIC` would avoid this overflow error, although "If the TEXT value is a well-formed integer literal that is too large to fit in a 64-bit signed integer, it is converted to REAL." suggests that this would come at the cost of rounding to the nearest float value.  Maybe I should just convert large integers to float before writing out my json?

  After a bit more hacking, "manually cast large integers to float" seems like a decent solution for my particular case, but having written it up I thought I might as well post this issue anyway - I hope it's useful feedback, and won't mind at all if you close as wontfix if it's not.

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/605/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c54Y99o
title: Unreachable exception handlers for `sqlite3.OperationalError`
state: open
created_at: 2023-12-01T00:50:22Z
updated_at: 2023-12-01T00:50:22Z
author_association: NONE
type: issue
body:
  There are several places where `sqlite3.OperationalError` is caught as part of an exception handler which catches multiple exceptions, but is then caught again immediately afterwards by a dedicated exception handler.

  Because the exception will be caught by the first handler, the logic in the second handler is unreachable and will never be executed.  If this is intended behavior, the second handler can be removed.  If this is not intended, and the second handler should be the one that catches this exception, then `sqlite3.OperationalError` should be removed from the tuple of exceptions in the first handler.

  This issue was found via a CodeQL query on the repository, and I've listed the occurrences found by the query below.  There may be other instances of this issue in the code that were not surfaced by the query.  I'd be happy to share the query if others would like to view or run it.

  One example:

  https://github.com/simonw/datasette/blob/452a587e236ef642cbc6ae345b58767ea8420cb5/datasette/views/database.py#L534-L537

  Other instances:

  https://github.com/simonw/datasette/blob/main/datasette/views/base.py#L266-L270
  https://github.com/simonw/datasette/blob/main/datasette/views/base.py#L452-L456

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2211/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c54lWdn
title: Can't filter with numbers
state: open
created_at: 2023-12-04T05:26:29Z
updated_at: 2023-12-04T05:26:29Z
author_association: NONE
type: issue
body:
  I have a schema that uses numbers for a column (actually it's a boolean 1 or 0 but SQLite doesn't have Boolean).
  I can't seem to get the facet to work or even filtering on this column.

  My guess is that Datasette is "stringifying" the number and it's not matching?
  Example: https://debian-sqlelf.fly.dev/debian/elf_symbols?_sort_desc=name&_facet=exported&exported=0

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2212/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c5463mi
title: feature request: gzip compression of database downloads
state: open
created_at: 2023-12-06T14:35:03Z
updated_at: 2023-12-06T15:05:46Z
author_association: CONTRIBUTOR
type: issue
body:
  At the bottom of database pages, datasette gives users the opportunity to download the underlying sqlite database. It would be great if that could be served gzip compressed. 

  this is similar to #1213, but for me, i don't need datasette to compress html and json because my CDN layer does it for me, however, cloudflare at least, will not compress a mimetype of "application"

  (see list of mimetype: https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/)

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2213/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOCGYnMM548opJ
title: str and int as aliases for text and integer
state: closed
created_at: 2023-12-06T18:35:49Z
updated_at: 2023-12-06T19:44:04Z
closed_at: 2023-12-06T18:49:32Z
author_association: OWNER
type: issue
state_reason: completed
body:
  I keep making this mistake:
  ```bash
  sqlite-utils add-column content.db assets _since int
  ```
  ```
  Usage: sqlite-utils add-column [OPTIONS] PATH TABLE COL_NAME [[integer|float|b
                                 lob|text|INTEGER|FLOAT|BLOB|TEXT]]
  Try 'sqlite-utils add-column -h' for help.

  Error: Invalid value for '[[integer|float|blob|text|INTEGER|FLOAT|BLOB|TEXT]]':
    'int' is not one of 'integer', 'float', 'blob', 'text', 'INTEGER', 'FLOAT', 'BLOB', 'TEXT'.
  ```

reactions:
  {"url": "https://api.github.com/repos/simonw/sqlite-utils/issues/606/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


node_id: I_kwDOBm6k_c54_fC9
title: CSV export fails for some `text` foreign key references
state: open
created_at: 2023-12-07T05:04:34Z
updated_at: 2023-12-07T07:36:34Z
author_association: NONE
type: issue
body:
  I'm starting this issue without a clear reproduction in case someone else has seen this behavior, and to use the issue as a notebook for research. 

  I'm using Datasette with the [SWITRS](https://iswitrs.chp.ca.gov/) data set, which is a California Highway Patrol collection of traffic incident data from the past decade or so. I receive data from them in CSV and want to work with it in Datasette, then export it to CSV for mapping in Felt.com.

  Their data makes extensive use of codes for incident column data (`1` for `Monday` and so on), some of it integer codes and some of it letter/text codes. The text codes are sometimes blank or `-`. During import, I'm creating lookup tables for foreign key references to make the Datasette UI presentation of the data easier to read.

  If I import the data and set up the integer foreign keys, everything works fine, but if I set up the text foreign keys, CSV export starts to fail. 

  The foreign key configuration is as follows:

  ```
  # Some tables use integer ids, like sensible tables do. Let's import them first
  # since we favor them.

  for TABLE in DAY_OF_WEEK CHP_SHIFT POPULATION SPECIAL_COND BEAT_TYPE COLLISION_SEVERITY
  do
  	sqlite-utils create-table records.db $TABLE id integer name text --pk=id
  	sqlite-utils insert records.db $TABLE lookup-tables/$TABLE.csv --csv
  	sqlite-utils add-foreign-key records.db collisions $TABLE $TABLE id
  	sqlite-utils create-index records.db collisions $TABLE
  done

  # *Other* tables use letter keys, like they were raised by WOLVES. Let's put them
  # at the end of the import queue.

  for TABLE in WEATHER_1 WEATHER_2 LOCATION_TYPE RAMP_INTERSECTION SIDE_OF_HWY \
  PRIMARY_COLL_FACTOR PCF_CODE_OF_VIOL PCF_VIOL_CATEGORY TYPE_OF_COLLISION MVIW \
  PED_ACTION ROAD_SURFACE ROAD_COND_1 ROAD_COND_2 LIGHTING CONTROL_DEVICE \
  STWD_VEHTYPE_AT_FAULT CHP_VEHTYPE_AT_FAULT PRIMARY_RAMP SECONDARY_RAMP
  do
  	sqlite-utils create-table records.db $TABLE key text name text --pk=key
  	sqlite-utils insert records.db $TABLE lookup-tables/$TABLE.csv --csv
  	sqlite-utils add-foreign-key records.db collisions $TABLE $TABLE key
  	sqlite-utils create-index records.db collisions $TABLE
  done
  ```

  You can see the full code and import script here: https://github.com/radical-bike-lobby/switrs-db

  If I run this code and then hit the CSV export link in the Datasette interface (the simple link or the "advanced" dialog), export fails after a small number of CSV rows are written. I am not seeing any detailed error messages but this appears in the logging output:

  ```
  INFO:     127.0.0.1:57885 - "GET /records/collisions.csv?_facet=PRIMARY_RD&PRIMARY_RD=ASHBY+AV&_labels=on&_size=max HTTP/1.1" 200 OK
  Caught this error: 

  ```

  (No other output follows `error:` other than a blank line.)

  I've stared at the rows directly after the error occurs and can't yet see what is causing the problem. I'm going to set up a development environment and see if I get any more detailed error output, and then stare more at some problematic lines to see if I can get a simple reproduction.

reactions:
  {"url": "https://api.github.com/repos/simonw/datasette/issues/2214/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}


