Skip to content

Commit

Permalink
Removed labels of Python 2 in cachalot doc
Browse files Browse the repository at this point in the history
* Removed a lot of type casting
  • Loading branch information
Andrew-Chen-Wang committed Jun 11, 2020
1 parent 59b6fc5 commit 490956f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions cachalot/api.py
Expand Up @@ -35,7 +35,7 @@ def _get_tables(tables_or_models):
else table_or_model._meta.db_table)


def invalidate(tables_or_models, cache_alias: str = None, db_alias: str = None) -> None:
def invalidate(tables_or_models=None, cache_alias=None, db_alias=None):
"""
Clears what was cached by django-cachalot implying one or more SQL tables
or models from ``tables_or_models``.
Expand Down Expand Up @@ -71,7 +71,7 @@ def invalidate(tables_or_models, cache_alias: str = None, db_alias: str = None)
post_invalidation.send(table, db_alias=db_alias)


def get_last_invalidation(tables_or_models, cache_alias: str = None, db_alias: str = None) -> float:
def get_last_invalidation(tables_or_models=None, cache_alias=None, db_alias=None):
"""
Returns the timestamp of the most recent invalidation of the given
``tables_or_models``. If ``tables_or_models`` is not specified,
Expand All @@ -91,7 +91,7 @@ def get_last_invalidation(tables_or_models, cache_alias: str = None, db_alias: s
:returns: The timestamp of the most recent invalidation
:rtype: float
"""
last_invalidation: float = 0.0
last_invalidation = 0.0
for cache_alias, db_alias, tables in _cache_db_tables_iterator(
list(_get_tables(tables_or_models)), cache_alias, db_alias):
get_table_cache_key = cachalot_settings.CACHALOT_TABLE_KEYGEN
Expand Down
10 changes: 5 additions & 5 deletions docs/quickstart.rst
Expand Up @@ -4,15 +4,15 @@ Quick start
Requirements
............

- Django 1.11, 2.0-2.2, or 3.0
- Python 2.7, 3.4-3.8
- Django 2.0-2.2, or 3.0
- Python 3.5-3.8
- a cache configured as ``'default'`` with one of these backends:

- `django-redis <https://github.com/niwinz/django-redis>`_
- `memcached <https://docs.djangoproject.com/en/2.0/topics/cache/#memcached>`_
- `memcached <https://docs.djangoproject.com/en/dev/topics/cache/#memcached>`_
(using either python-memcached or pylibmc)
- `filebased <https://docs.djangoproject.com/en/2.0/topics/cache/#filesystem-caching>`_
- `locmem <https://docs.djangoproject.com/en/2.0/topics/cache/#local-memory-caching>`_
- `filebased <https://docs.djangoproject.com/en/dev/topics/cache/#filesystem-caching>`_
- `locmem <https://docs.djangoproject.com/en/dev/topics/cache/#local-memory-caching>`_
(but it’s not shared between processes, see :ref:`locmem limits <Locmem>`)

- one of these databases:
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Expand Up @@ -26,16 +26,15 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Internet :: WWW/HTTP',
],
license='BSD',
Expand Down

0 comments on commit 490956f

Please sign in to comment.