home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where author_association = "OWNER", "created_at" is on date 2019-11-12 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, body, created_at (date), updated_at (date)

issue 7

  • Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) 4
  • The ".upsert()" method is misnamed 3
  • Experiment: run Jinja in async mode 1
  • upgrade to uvicorn-0.9 to be Python-3.8 friendly 1
  • bump uvicorn to 0.9.0 to be Python-3.8 friendly 1
  • Unit tests should fail under Python 3.8 1
  • "datasette publish" commands should deploy with Python 3.8 1

user 1

  • simonw · 12 ✖

author_association 1

  • OWNER · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
553171414 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171414 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MTQxNA== simonw 9599 2019-11-12T23:52:35Z 2019-11-12T23:52:35Z OWNER

If I do implement the correct definition of .upsert() I think I'll use this pattern, since it works in versions of SQLite prior to 3.24: sql INSERT OR IGNORE INTO book(id) VALUES(1001); UPDATE book SET name = 'Programming' WHERE id = 1001;

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  
553171011 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553171011 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MTAxMQ== simonw 9599 2019-11-12T23:50:52Z 2019-11-12T23:50:52Z OWNER

Fixing this is going to be a real pain. There's lots of code out there that uses sqlite-utils with the expectation that upsert() behaves as it currently does.

Maybe I need to introduce new terms for both of these different patterns and deprecate the existing .upsert() and .upsert_all() since their behaviour can't be changed?

Or maybe I fix this and ship sqlite-utils 2.0 with a breaking change?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  
553170650 https://github.com/simonw/sqlite-utils/issues/66#issuecomment-553170650 https://api.github.com/repos/simonw/sqlite-utils/issues/66 MDEyOklzc3VlQ29tbWVudDU1MzE3MDY1MA== simonw 9599 2019-11-12T23:49:29Z 2019-11-12T23:49:29Z OWNER

This relates to this bug: https://github.com/dogsheep/github-to-sqlite/pull/8#issuecomment-549233778

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
The ".upsert()" method is misnamed 521868864  
552745890 https://github.com/simonw/datasette/issues/622#issuecomment-552745890 https://api.github.com/repos/simonw/datasette/issues/622 MDEyOklzc3VlQ29tbWVudDU1Mjc0NTg5MA== simonw 9599 2019-11-12T05:52:49Z 2019-11-12T05:52:49Z OWNER

Released in Datasette 0.31.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) 520715188  
552739324 https://github.com/simonw/datasette/issues/629#issuecomment-552739324 https://api.github.com/repos/simonw/datasette/issues/629 MDEyOklzc3VlQ29tbWVudDU1MjczOTMyNA== simonw 9599 2019-11-12T05:23:22Z 2019-11-12T05:23:22Z OWNER

This change needs to wait until datasette 0.31 has been published to PyPI, because the Docker containers produced by datasette publish run pip install datasette and they need to be able to retrieve a version from PyPI that works with 3.8.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"datasette publish" commands should deploy with Python 3.8 521335335  
552735296 https://github.com/simonw/datasette/pull/404#issuecomment-552735296 https://api.github.com/repos/simonw/datasette/issues/404 MDEyOklzc3VlQ29tbWVudDU1MjczNTI5Ng== simonw 9599 2019-11-12T05:02:13Z 2019-11-12T05:02:13Z OWNER

Closing this because it was written against Sanic. #628 tracks future work on this topic.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Experiment: run Jinja in async mode 403499298  
552732500 https://github.com/simonw/datasette/issues/594#issuecomment-552732500 https://api.github.com/repos/simonw/datasette/issues/594 MDEyOklzc3VlQ29tbWVudDU1MjczMjUwMA== simonw 9599 2019-11-12T04:47:04Z 2019-11-12T04:47:04Z OWNER

Closing this in favour of #627 which upgrades to uvicorn 0.10.4

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
upgrade to uvicorn-0.9 to be Python-3.8 friendly 506297048  
552732445 https://github.com/simonw/datasette/pull/595#issuecomment-552732445 https://api.github.com/repos/simonw/datasette/issues/595 MDEyOklzc3VlQ29tbWVudDU1MjczMjQ0NQ== simonw 9599 2019-11-12T04:46:48Z 2019-11-12T04:46:48Z OWNER

Closing this in favour of #627 which upgrades to uvicorn 0.10.4

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
bump uvicorn to 0.9.0 to be Python-3.8 friendly 506300941  
552731544 https://github.com/simonw/datasette/issues/622#issuecomment-552731544 https://api.github.com/repos/simonw/datasette/issues/622 MDEyOklzc3VlQ29tbWVudDU1MjczMTU0NA== simonw 9599 2019-11-12T04:41:48Z 2019-11-12T04:41:48Z OWNER

Here's where Python 3.5 started failing: https://travis-ci.org/simonw/datasette/builds/610682852

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) 520715188  
552730304 https://github.com/simonw/datasette/issues/622#issuecomment-552730304 https://api.github.com/repos/simonw/datasette/issues/622 MDEyOklzc3VlQ29tbWVudDU1MjczMDMwNA== simonw 9599 2019-11-12T04:34:55Z 2019-11-12T04:34:55Z OWNER

Confirmed: upgrading to uvicorn~=0.10.4 fixed it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) 520715188  
552729978 https://github.com/simonw/datasette/issues/622#issuecomment-552729978 https://api.github.com/repos/simonw/datasette/issues/622 MDEyOklzc3VlQ29tbWVudDU1MjcyOTk3OA== simonw 9599 2019-11-12T04:33:00Z 2019-11-12T04:33:00Z OWNER

Here's the error I'm getting with Python 3.8 at the moment: ~/Dropbox/Development/datasette $ venv-py3.8.0/bin/datasette --memory -p 8055 Serve! files=() (immutables=()) on port 8055 Traceback (most recent call last): File "venv-py3.8.0/bin/datasette", line 11, in <module> load_entry_point('datasette', 'console_scripts', 'datasette')() File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/Users/simonw/Dropbox/Development/datasette/datasette/cli.py", line 365, in serve uvicorn.run(ds.app(), host=host, port=port, log_level="info") File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py", line 279, in run server.run() File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py", line 305, in run self.config.setup_event_loop() File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/config.py", line 218, in setup_event_loop loop_setup() File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/loops/auto.py", line 3, in auto_loop_setup import uvloop File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvloop/__init__.py", line 7, in <module> from .loop import Loop as __BaseLoop # NOQA File "uvloop/includes/stdlib.pxi", line 114, in init uvloop.loop AttributeError: module 'sys' has no attribute 'set_coroutine_wrapper' I'm pretty confident upgrading uvicorn (and uvloop with it) will fix this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) 520715188  
552729658 https://github.com/simonw/datasette/issues/626#issuecomment-552729658 https://api.github.com/repos/simonw/datasette/issues/626 MDEyOklzc3VlQ29tbWVudDU1MjcyOTY1OA== simonw 9599 2019-11-12T04:31:13Z 2019-11-12T04:31:13Z OWNER

I'm giving up on this. I spent a bunch of time trying to get it to work and couldn't.

My final attempt was inspired by https://github.com/encode/uvicorn/blob/e821fd1ff5653f989d500d41fa6ba070858f6843/tests/test_main.py#L10-L32

Here's the code that didn't work: ``` def test_asgi_app(app_client): from uvicorn.config import Config from uvicorn.main import Server

class CustomServer(Server):
    def install_signal_handlers(self):
        pass

def run_server():
    asyncio.set_event_loop(asyncio.new_event_loop())
    print("ooh new loop")
    config = Config(app=app_client.asgi_app, limit_max_requests=1, port=8642)
    config.load()
    server = CustomServer(config=config)
    server.run()

with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
    future = executor.submit(run_server)
    future.result()
    while not server.started:
        print(server.__dict__)
        time.sleep(0.01)
    assert 200 == urllib.request.urlopen("http://localhost:8642/").status
    # This line will raise if there's an exception:
    future.result()

`` I gotRuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-1_0'`

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Unit tests should fail under Python 3.8 521282013  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 587.856ms · About: github-to-sqlite