Skip to content

Instantly share code, notes, and snippets.

@piotr-dobrogost
piotr-dobrogost / resources.py
Last active September 2, 2015 12:13
Error when trying to version Node table in Kotti using SQLAlchemy-Continuum
diff --git a/kotti/resources.py b/kotti/resources.py
index e771ebe..3723732 100644
--- a/kotti/resources.py
+++ b/kotti/resources.py
@@ -69,6 +69,11 @@ from kotti.util import Link
from kotti.util import LinkParent
from kotti.util import LinkRenderer
+from sqlalchemy_continuum import make_versioned
+
@piotr-dobrogost
piotr-dobrogost / sa-continnum.test failures.txt
Last active September 3, 2015 12:41
First 10 failures when running tests of SQLAlchemy-Continuum 1.2.0
(env)[piotr@demon sqlalchemy-continuum]$ py.test --maxfail=10 tests
==================================================================================== test session starts ====================================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/piotr/projects/sqlalchemy-continuum, inifile:
collected 627 items
tests/test_accessors.py ................................................................................................................
tests/test_changeset.py .........
tests/test_column_aliases.py ........................s
tests/test_column_inclusion_and_exclusion.py ......
import logging
from os import remove
from sqlalchemy import (create_engine, Column, ForeignKey, Integer, String, Unicode)
from sqlalchemy.ext.declarative import (declarative_base, declared_attr)
from sqlalchemy.orm import (configure_mappers, sessionmaker)
from sqlalchemy.util import classproperty
from sqlalchemy_continuum import make_versioned
logging.basicConfig()
(env)[piotr@demon kotti_content_proxy]$ pip list
alembic (0.8.2)
apipkg (1.4)
appdirs (1.4.0)
Babel (2.1.1)
Beaker (1.7.0)
beautifulsoup4 (4.4.1)
bleach (1.4.2)
bleach-whitelist (0.0.7)
Chameleon (2.22)
from gevent import monkey
monkey.patch_all()
import gevent
import requests
def http_req(x, url):
r = requests.post(url)
print "Request ", x, r
/home/piotr/projects/kotti_content_proxy/env/bin/python /home/piotr/apps/pycharm-4.5.3/helpers/pycharm/pytestrunner.py -p pytest_teamcity kotti_content_proxy/tests
Testing started at 1:30 PM ...
============================= test session starts ==============================
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
rootdir: /home/piotr/projects/kotti_content_proxy, inifile: setup.cfg
plugins: Kotti-1.2.0, xdist-1.13.1, pep8-1.0.6, cov-2.1.0, pycharm-0.3.0
collected 13 items
kotti_content_proxy/__init__.py .
kotti_content_proxy/resources.py F
class Base(object):
pass
class C(Base):
an_attr = None
def __init__(self):
self.an_attr = 1
==================================================================================== test session starts ====================================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.3
rootdir: /home/piotr/projects/kotti_content_proxy, inifile: setup.cfg
plugins: Kotti, xdist, xdist, xdist, cache, pep8, cov, pycharm
collected 8 items
kotti_content_proxy/__init__.py s
kotti_content_proxy/resources.py s
kotti_content_proxy/views.py s
kotti_content_proxy/tests/conftest.py s
# -*- coding: utf-8 -*-
"""
Created on 2015-09-16
:author: Piotr Dobrogost (email)
"""
from kotti.resources import File
from pyramid.i18n import TranslationStringFactory
from pyramid.view import view_config
Traceback (most recent call last):
File "/home/piotr/projects/kotti_content_proxy/kotti_content_proxy/tests/conftest.py", line 12, in foo_proxy
from kotti_content_proxy.resources import ContentProxy
File "/home/piotr/projects/kotti_content_proxy/kotti_content_proxy/__init__.py", line 10, in <module>
from .resources import ContentProxy
File "/home/piotr/projects/kotti_content_proxy/kotti_content_proxy/resources.py", line 14, in <module>
from kotti_content_proxy import _
ImportError: cannot import name _