{"html_url": "https://github.com/simonw/datasette/issues/655#issuecomment-683449837", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/655", "id": 683449837, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0OTgzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:51:38Z", "updated_at": "2020-08-30T17:51:38Z", "author_association": "OWNER", "body": "I think was fixed by #948", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 542553350, "label": "Copy and paste doesn't work reliably on iPhone for SQL editor"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683445114", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683445114, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0NTExNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:06:39Z", "updated_at": "2020-08-30T17:06:39Z", "author_association": "OWNER", "body": "Minifying using `npx`:\r\n```\r\nnpx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js\r\nnpx uglify-js codemirror-5.57.0-sql.js -o codemirror-5.57.0-sql.min.js\r\nnpx clean-css-cli codemirror-5.57.0.css -o codemirror-5.57.0.min.css\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683445704", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683445704, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0NTcwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:11:58Z", "updated_at": "2020-08-30T17:33:30Z", "author_association": "OWNER", "body": "One catch: this stripped the license information from the top of the JS.\r\n\r\nI fixed this by editing the license to be a single `/* ... */` block comment instead of multiple `//` lines and running this:\r\n\r\n npx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js --comments '/LICENSE/'\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683448569", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683448569, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0ODU2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:39:09Z", "updated_at": "2020-08-30T18:34:34Z", "author_association": "OWNER", "body": "So the steps needed are:\r\n\r\n- Download and extract latest CodeMirror zip file\r\n- Rename `lib/codemirror.js` to `codemirror-5.57.0.js`\r\n- Rename `lib/codemirror.css` to `codemirror-5.57.0.css`\r\n- Rename `mode/sql/sql.js` to `codemirror-5.57.0-sql.js`\r\n- Edit both JS files to make the top comment a `/* */` block\r\n- Minify JavaScript files like this:\r\n - `npx uglify-js codemirror-5.57.0.js -o codemirror-5.57.0.min.js --comments '/LICENSE/'`\r\n - `npx uglify-js codemirror-5.57.0-sql.js -o codemirror-5.57.0-sql.min.js --comments '/LICENSE/'`\r\n- Check that the LICENSE comment did indeed survive minification\r\n- Minify CSS file like this:\r\n - `npx clean-css-cli codemirror-5.57.0.css -o codemirror-5.57.0.min.css`\r\n- Edit the `_codemirror.html` template to reference the new files\r\n- `git rm` the old files, `git add` the new files", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683448635", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683448635, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0ODYzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:39:54Z", "updated_at": "2020-08-30T17:39:54Z", "author_association": "OWNER", "body": "I'll wait for this to deploy to https://latest.datasette.io/ and then test it in various desktop and mobile browsers.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683449804", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683449804, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ0OTgwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T17:51:18Z", "updated_at": "2020-08-30T17:51:18Z", "author_association": "OWNER", "body": "Copy and paste on mobile safari seems to work now. #655 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/948#issuecomment-683452613", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/948", "id": 683452613, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzQ1MjYxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T18:16:28Z", "updated_at": "2020-08-30T18:16:28Z", "author_association": "OWNER", "body": "I added documentation on how to upgrade CodeMirror for the future here: https://docs.datasette.io/en/latest/contributing.html#upgrading-codemirror", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 684925907, "label": "Upgrade CodeMirror"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/957#issuecomment-683355993", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/957", "id": 683355993, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzM1NTk5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T00:02:11Z", "updated_at": "2020-08-30T00:04:18Z", "author_association": "OWNER", "body": "I tried doing this and got this error:\r\n```\r\n(datasette) datasette % pytest\r\n==================================================================== test session starts =====================================================================\r\nplatform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1\r\nrootdir: /Users/simon/Dropbox/Development/datasette, configfile: pytest.ini\r\nplugins: asyncio-0.14.0, timeout-1.4.2\r\ncollected 1 item / 23 errors \r\n\r\n=========================================================================== ERRORS ===========================================================================\r\n_____________________________________________________________ ERROR collecting tests/test_api.py _____________________________________________________________\r\nImportError while importing test module '/Users/simon/Dropbox/Development/datasette/tests/test_api.py'.\r\nHint: make sure your test modules/packages have valid Python names.\r\nTraceback:\r\n/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py:127: in import_module\r\n return _bootstrap._gcd_import(name[level:], package, level)\r\ntests/test_api.py:1: in \r\n from datasette.plugins import DEFAULT_PLUGINS\r\ndatasette/__init__.py:2: in \r\n from .app import Datasette\r\ndatasette/app.py:30: in \r\n from .views.base import DatasetteError, ureg\r\ndatasette/views/base.py:12: in \r\n from datasette.plugins import pm\r\ndatasette/plugins.py:26: in \r\n mod = importlib.import_module(plugin)\r\n/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py:127: in import_module\r\n return _bootstrap._gcd_import(name[level:], package, level)\r\ndatasette/publish/heroku.py:2: in \r\n from datasette import hookimpl\r\nE ImportError: cannot import name 'hookimpl' from partially initialized module 'datasette' (most likely due to a circular import) (/Users/simon/Dropbox/Development/datasette/datasette/__init__.py)\r\n```\r\nThat's with `datasette/__init__.py` looking like this:\r\n```python\r\nfrom datasette.version import __version_info__, __version__ # noqa\r\nfrom .app import Datasette\r\nfrom .utils.asgi import Forbidden, NotFound, Response\r\nfrom .utils import actor_matches_allow, QueryInterrupted\r\nfrom .hookspecs import hookimpl # noqa\r\nfrom .hookspecs import hookspec # noqa\r\n\r\n\r\n__all__ = [\r\n \"actor_matches_allow\",\r\n \"hookimpl\",\r\n \"hookspec\",\r\n \"QueryInterrupted\",\r\n \"Forbidden\",\r\n \"NotFound\",\r\n \"Response\",\r\n \"Datasette\",\r\n]\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 688622148, "label": "Simplify imports of common classes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/957#issuecomment-683356440", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/957", "id": 683356440, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzM1NjQ0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T00:08:18Z", "updated_at": "2020-08-30T00:10:26Z", "author_association": "OWNER", "body": "Annoyingly this seems to be the line that causes the circular import:\r\n```python\r\nfrom .utils.asgi import Forbidden, NotFound, Response\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 688622148, "label": "Simplify imports of common classes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/957#issuecomment-683357092", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/957", "id": 683357092, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzM1NzA5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-30T00:15:51Z", "updated_at": "2020-08-30T00:16:02Z", "author_association": "OWNER", "body": "Weirdly even removing this single `datasette` import from `utils/asgi.py` didn't fix the circular import:\r\n\r\nhttps://github.com/simonw/datasette/blob/44cf424a94a85b74552075272660bb96a7432661/datasette/utils/asgi.py#L1-L3", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 688622148, "label": "Simplify imports of common classes"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/145#issuecomment-683382252", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/145", "id": 683382252, "node_id": "MDEyOklzc3VlQ29tbWVudDY4MzM4MjI1Mg==", "user": {"value": 96218, "label": "simonwiles"}, "created_at": "2020-08-30T06:27:25Z", "updated_at": "2020-08-30T06:27:52Z", "author_association": "CONTRIBUTOR", "body": "Note: had to adjust the test above because trying to exhaust a `SQLITE_MAX_VARIABLE_NUMBER` of 250000 in 99 records requires 2526 columns, and trips the ` \"Rows can have a maximum of {} columns\".format(SQLITE_MAX_VARS)` check even before it trips the default `SQLITE_MAX_COLUMN` value (2000).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 688659182, "label": "Bug when first record contains fewer columns than subsequent records"}, "performed_via_github_app": null}