Skip to content

Commit

Permalink
Merge pull request #1 from jgoret/master
Browse files Browse the repository at this point in the history
Python 3 compatibility
  • Loading branch information
pfw authored Dec 16, 2018
2 parents c5451ab + 153d789 commit 58fc4de
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
sudo: false
language: python

python:
- "2.6"
- "2.7"
- "pypy"
- "3.3"
- "3.4"

install:
- pip install pytest-cov
- pip install -e .

script:
- py.test --cov=flask_zodb tests.py

after_success:
- pip install coveralls
- coveralls
3 changes: 3 additions & 0 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Flask-ZODB

![Flask-ZODB][logo]

[![Build Status](https://travis-ci.org/Kyah/flask-zodb.svg)](https://travis-ci.org/Kyah/flask-zodb)
[![Coverage Status](https://coveralls.io/repos/Kyah/flask-zodb/badge.svg?branch=master&service=github)](https://coveralls.io/github/Kyah/flask-zodb?branch=master)


Simple extension for integrating the ZODB in Flask applications.

Expand Down
12 changes: 10 additions & 2 deletions flask_zodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
import transaction
import zodburi

from UserDict import IterableUserDict
try:
from collections import UserDict
except ImportError:
from UserDict import IterableUserDict as UserDict

from ZODB.DB import DB
from contextlib import contextmanager, closing
from werkzeug.utils import cached_property
Expand All @@ -12,11 +16,15 @@
from persistent.list import PersistentList as List
from persistent.mapping import PersistentMapping as Dict

try:
basestring
except NameError:
basestring = str

__all__ = ['ZODB', 'Object', 'List', 'Dict', 'BTree']


class ZODB(IterableUserDict):
class ZODB(UserDict):
"""Extension object. Behaves as the root object of the storage during
requests, i.e. a `~persistent.mapping.PersistentMapping`.
Expand Down
6 changes: 0 additions & 6 deletions tox.ini

This file was deleted.

0 comments on commit 58fc4de

Please sign in to comment.