Skip to content

Commit f854cf4

Browse files
author
Graham Higgins
committed
Update dependencies
1 parent 726bbeb commit f854cf4

File tree

5 files changed

+36
-15
lines changed

5 files changed

+36
-15
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ python:
1313
- "2.7"
1414
- "3.2"
1515
- "3.3"
16+
- "3.4"
1617
install:
1718
- if [[ ${TRAVIS_PYTHON_VERSION} == '2.5' ]]; then pip install simplejson==2.0.9; fi
1819
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then pip install -r requirements-py2.txt --use-mirrors; fi
@@ -29,3 +30,4 @@ script:
2930
# 2to3 version.
3031
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '2' ]]; then nosetests; fi
3132
- if [[ ${TRAVIS_PYTHON_VERSION%%.*} == '3' ]]; then nosetests --where=./build/src; fi
33+

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ scalability as most graphs will always have more rdf:type statements than others
1212

1313
In addition, it persists namespace mappings in a separate table.
1414

15+
Back-end persistence
16+
--------------------
17+
18+
Back-end persistence is provided by SQLAlchemy.
19+
20+
Tested dialects are:
21+
22+
- SQLite, using the built-in Python driver or, for Python 2.5, pysqlite
23+
- MySQL, using the MySQLdb-python driver or, for Python 3, mysql-connector
24+
- PostgreSQL, using the psycopg2 driver
25+
26+
pysqlite: https://pypi.python.org/pypi/pysqlite
27+
28+
MySQLdb-python: https://pypi.python.org/pypi/MySQL-python
29+
30+
mysql-connector: http://dev.mysql.com/doc/connector-python/en/connector-python.html
31+
32+
psycopg2: https://pypi.python.org/pypi/psycopg2
33+
34+
1535
Development
1636
===========
1737
Github repository: https://github.com/RDFLib/rdflib-sqlalchemy

rdflib_sqlalchemy/SQLAlchemy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ class membership columns: member,klass,context termComb
855855

856856
q = unionSELECT(selects, selectType=TRIPLE_SELECT_NO_ORDER)
857857
with self.engine.connect() as connection:
858-
_logger.debug("Triples query : %s" % str(q))
858+
# _logger.debug("Triples query : %s" % str(q))
859859
res = connection.execute(q)
860860
# TODO: False but it may have limitations on text column. Check
861861
# NOTE: SQLite does not support ORDER BY terms that aren't
@@ -980,7 +980,7 @@ def __len__(self, context=None):
980980
ASSERTED_LITERAL_PARTITION), ]
981981
q = unionSELECT(selects, distinct=False, selectType=COUNT_SELECT)
982982

983-
_logger.debug("Length query : %s" % str(q))
983+
# _logger.debug("Length query : %s" % str(q))
984984

985985
with self.engine.connect() as connection:
986986
res = connection.execute(q)
@@ -1189,7 +1189,9 @@ def namespace(self, prefix):
11891189
res = connection.execute(s)
11901190
rt = [rtTuple[0] for rtTuple in res.fetchall()]
11911191
res.close()
1192-
return rt and rt[0] or None
1192+
# return rt and rt[0] or None
1193+
from rdflib import URIRef
1194+
return rt and URIRef(rt[0]) or None
11931195
except:
11941196
return None
11951197

requirements-py3.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-e git+https://github.com/RDFLib/rdflib.git#egg=rdflib
22
psycopg2
3-
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
4-
# -e git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
3+
# http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
4+
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.2.zip
5+
-e git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python

tox.ini

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py25,py26,py27,cover,py32,py33
3+
py25,py26,py27,cover,py32,py34
44

55
[testenv]
66
commands =
@@ -37,12 +37,10 @@ deps =
3737
git+http://github.com/RDFLib/rdflib#egg=rdflib
3838
SQLAlchemy
3939
psycopg2
40-
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
41-
# git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
42-
# lxml
40+
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.2.zip
4341

44-
[testenv:py33]
45-
basepython = python3.3
42+
[testenv:py34]
43+
basepython = python3.4
4644
commands =
4745
{envpython} setup.py clean --all
4846
{envpython} setup.py build
@@ -52,10 +50,8 @@ deps =
5250
git+http://github.com/RDFLib/rdflib#egg=rdflib
5351
SQLAlchemy
5452
psycopg2
55-
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.10.zip
56-
# git+https://github.com/davispuh/MySQL-for-Python-3#egg=MySQL-python
57-
# oursql
58-
# lxml
53+
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.2.zip
54+
git+https://github.com/PyMySQL/mysqlclient-python#egg=MySQLdb
5955

6056
[testenv:cover]
6157
basepython = python2.7

0 commit comments

Comments
 (0)