Skip to content

Commit 013f03c

Browse files
committed
Update packaging.
* Convert from ReST to Markdown. * Add explicit content type for Markdown description. * Stop jamming the entire LICENSE file in the `license` field and instead use `BSD`.
1 parent c51472c commit 013f03c

File tree

5 files changed

+71
-66
lines changed

5 files changed

+71
-66
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 2.0.0 - December 17, 2019
44

5-
- Stop testing Python 2.6, 3.2, 3.3, 3.5.
5+
- Stop testing Python 2.6, 3.2, 3.3, 3.4.
66
- Stop testing Django < 1.11
77
- Start testing Python 3.7, 3.8
88
- Start testing Django 2.2, 3.0

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include README.rst LICENSE tests.py
1+
include README.md LICENSE tests.py

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# dj-inmemorystorage
2+
3+
[![image](https://travis-ci.org/waveaccounting/dj-inmemorystorage.png?branch=master)](https://travis-ci.org/waveaccounting/dj-inmemorystorage)
4+
5+
An in-memory data storage backend for Django.
6+
7+
Compatible with Django's [storage
8+
API](https://docs.djangoproject.com/en/dev/ref/files/storage/).
9+
10+
# Supported Versions
11+
12+
- Python 2.7 with Django 1.11
13+
- Python 3.5/3.6/3.7 with Django 1.11+
14+
- Python 3.8 with Django 2.2+
15+
16+
In general, we follow [Python's supported
17+
versions](https://devguide.python.org/#status-of-python-branches) and
18+
[Django's supported
19+
versions](https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django).
20+
Any major change in version support will be released as a new major
21+
version.
22+
23+
# Usage
24+
25+
In your test settings file, add
26+
27+
``` python
28+
DEFAULT_FILE_STORAGE = 'inmemorystorage.InMemoryStorage'
29+
```
30+
31+
By default, the `InMemoryStorage` backend is non-persistant, meaning
32+
that writes to it from one section of your code will not be present when
33+
reading from another section of your code, unless both are sharing the
34+
same instance of the storage backend.
35+
36+
If you need your storage to persist, you can add the following to your
37+
settings.
38+
39+
``` python
40+
INMEMORYSTORAGE_PERSIST = True
41+
```
42+
43+
# Differences
44+
45+
This library is based on
46+
[django-inmemorystorage](https://github.com/codysoyland/django-inmemorystorage)
47+
by Cody Soyland, with
48+
[modifications](https://github.com/SeanHayes/django-inmemorystorage)
49+
made by Seán Hayes with support for the `url` method, with [additional
50+
support](https://github.com/Vostopia/django-inmemorystorage) from Tore
51+
Birkeland for writing to the file.
52+
53+
Wave's modifications include packaging, and test modifications such that
54+
`python setup.py test` works. This version also bumps the version to
55+
`1.0.0` and renames it to dj-inmemorystorage such that it doesn't
56+
conflict on PyPI.
57+
58+
The biggest difference is that this package works with Django 1.4 now
59+
(previously only 1.5+). It also supports Python 2.6/2.7 with Django
60+
1.4+, Python 3.2/3.3/3.4 with Django 1.5+ and Python 3.5/3.6 with Django
61+
1.7+.
62+
63+
# Contributing
64+
65+
1. Ensure that you open a pull request
66+
2. All feature additions/bug fixes MUST include tests

README.rst

Lines changed: 0 additions & 62 deletions
This file was deleted.

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
description="A non-persistent in-memory data storage backend for Django.",
1212
version="2.0.0",
1313
url="https://github.com/waveaccounting/dj-inmemorystorage",
14-
license=open('LICENSE').read(),
15-
long_description=open('README.rst').read(),
14+
license='BSD',
15+
long_description=open('README.md').read(),
16+
long_description_content_type='text/markdown',
1617
author='Cody Soyland, Seán Hayes, Tore Birkeland, Nick Presta',
1718
author_email='[email protected]',
1819
packages=[

0 commit comments

Comments
 (0)