Simon Charette

Results 171 comments of Simon Charette

Thanks for the workaround @melancholy. We hit this issue when using the mutli-threaded Django development server (the default `manage.py runserver`) and sometimes hitting one of these blank assertion errors that...

`freezegun` can be used for this purpose and works like a charm with `fakeredis` because the later uses the stdlib `datetime` module to determine if keys are expired. Feels like...

@bmerry `DataBase.time` is retrieved from `time.time()` on command processing https://github.com/jamesls/fakeredis/blob/e04fc6e24baaaceb582e95a3d61b63d34a9e634d/fakeredis/_server.py#L818-L820 This method is mocked by `freezegun` which means tests such as https://github.com/jamesls/fakeredis/blob/dcf0c8933fff7b3e0f08879a9905dea4f67ca750/test/test_fakeredis.py#L3994-L4001 Could be rewritten as ```python @freeze_time(as_kwarg='frozen_time') def test_expireat_should_expire_key_by_timestamp(r,...

In the case of internal usages of `time.sleep` https://github.com/jamesls/fakeredis/blob/dcf0c8933fff7b3e0f08879a9905dea4f67ca750/fakeredis/_server.py#L2592 They can be mocked with `mock.patch('time.sleep', frozen_time.tick)`. There even seems to be a solution for `asyncio.sleep` https://github.com/spulec/freezegun/issues/290

Still happens with tilda 1.3.1 on Ubuntu 16.04 LTS. It doesn't happen when tilda is hidden so I always make sure to hide it before pressing Super D to show...

I'm not sure how SQL Server treats query params but `.features.max_query_params` probably needs to be set to 2000 as well.

@beruic I'm referring to this flag https://github.com/django/django/blob/41e73de39df31c4b13d65462bfeedde6924226d8/django/db/backends/base/features.py#L91-L92

Ok so here's the deal. From my understanding there's no way to perform a `IN (id0, ..., idN)` in a single query on SQL Server (or any backend with such...

@apollo13 thanks for the rebase. I'm currently working on addressing the `as_postgresql` and `Text(str)` quirks by having `JSONField.get_db_prep_value` make use of `psycopg.types.json.Jsonb` instead and it's showing great results (down to...

@timgraham if you want this to work properly for CockroachDB you'd likely want to override `Value.as_cockroachdb` to add explicit casts based of `self.output_field` so annotating `Value("1")` turns into `('%s::text', '1')`....