Skip to content

fix: tilde encode database name in expanded foreign key links#2476

Merged
simonw merged 2 commits intosimonw:mainfrom
phroa:patch-1
Apr 17, 2025
Merged

fix: tilde encode database name in expanded foreign key links#2476
simonw merged 2 commits intosimonw:mainfrom
phroa:patch-1

Conversation

@phroa
Copy link
Contributor

@phroa phroa commented Apr 12, 2025

Hey, thanks for making this awesome program. I'm just starting out with it.

For entirely self-inflicted reasons I have a database with a special character in the name and it works decently well except for autogenerated foreign key links; the links do not perform tilde encoding and thus don't work.

I'm not sure I have the best dev environment set up right now - tests don't run right. Hopefully there's CI on the PR.
(Windows, python3.13, pip install '.[test]'...)

failing tests...
ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[canned_read-False] - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_insert_error - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[add_name_specify_id-True] - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_on_success_message_sql - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_canned_query_form_csrf_hidden_field[add_name-True] - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_error_in_on_success_message_sql - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_utils_check_callable.py::test_check_callable[str-True-False] - ExceptionGroup: errors while tearing down <Session  exitstatus=<ExitCode.OK: 0> testsfailed=19 testscollected=1461>...
ERROR tests/test_utils.py::test_named_parameters[True-select 1 + :one + :two-expected2] - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_table_html.py::test_binary_data_display_in_table - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...
ERROR tests/test_canned_queries.py::test_custom_params - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\...

Before:

image

image


After:

image

image


📚 Documentation preview 📚: https://datasette--2476.org.readthedocs.build/en/2476/

@simonw simonw merged commit d5c6e50 into simonw:main Apr 17, 2025
19 checks passed
simonw added a commit that referenced this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants