-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20 Mar 2011, at 21:37, lex mlist wrote:

I'm trying to get elixir running in my python3.2 environment since I'm
developing for this target.


I've read that there was a patch on the main trunk to support Python3
so I downloaded the source, then the repository's head revision, and
I've also tried using the fork made to support python3.

If you're referring to the foogod fork (labelled "elixir3"), that doesn't seem to have been refactored for Python3 (see below)

configparser.InterpolationSyntaxError: '%' must be followed by '%' or
'(', found: '%s%s#L%s%s'
Then also easy_install does not work.
I've tried removing from the site-packages the reference to Elixir and
SQLAlchemy, and easy_install works again, but everytime i try to
install it i get always the same error.

What can I do?


Comment out the offending "trac_link_format" assignment in setup.cfg:

https://bitbucket.org/foogod/elixir3/src/c69b3eb6ebdd/setup.cfg#cl-12

but that isn't goint to get you very far because, as I mentioned above, that particular fork doesn't seem to have been refactored for Python 3, c.f.:

https://bitbucket.org/foogod/elixir3/src/c69b3eb6ebdd/elixir/relationships.py #cl-1099

I have also been tinkering with elixir under Python 3.2 - the prognosis looks quite promising but coverage is patchy and a few tests fail (I've appended the output below, for interest).

The discussion thread here:

http://groups.google.com/group/sqlelixir/browse_frm/thread/57a656966e018391#

makes it unlikely that elixir will be fully ported to Python 3 (unless the permanent development hiatus is resolved).



(DevPy3)bash-3.2$ nosetests
.......................................................FF....schema test skipped ...............................................................F ................E....
======================================================================
ERROR: Failure: KeyError ('tests.db1..c')
- ----------------------------------------------------------------------
Traceback (most recent call last):
File "{py3}/nose-1.0.0-py3.2.egg/nose/failure.py", line 37, in runTest
    raise self.exc_class(self.exc_val).with_traceback(self.tb)
File "{py3}/nose-1.0.0-py3.2.egg/nose/loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
File "{py3}/nose-1.0.0-py3.2.egg/nose/importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
File "{py3}/nose-1.0.0-py3.2.egg/nose/importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "{src}/elixir/tests/test_session_ext.py", line 18, in <module>
    setup_all(True)
  File "{src}/elixir/elixir/__init__.py", line 89, in setup_all
    setup_entities(entities)
  File "{src}/elixir/elixir/entity.py", line 820, in setup_entities
    method()
  File "{src}/elixir/elixir/entity.py", line 308, in setup_reltables
    self.call_builders('create_tables')
  File "{src}/elixir/elixir/entity.py", line 482, in call_builders
    getattr(builder, what)()
File "{src}/elixir/elixir/relationships.py", line 903, in create_tables
    if self.inverse:
  File "{src}/elixir/elixir/relationships.py", line 521, in inverse
    self, check_reverse=check_reverse)
File "{src}/elixir/elixir/entity.py", line 564, in get_inverse_relation
    if rel.is_inverse(other_rel):
  File "{src}/elixir/elixir/relationships.py", line 1147, in is_inverse
    return super(ManyToMany, self).is_inverse(other) and \
  File "{src}/elixir/elixir/relationships.py", line 540, in is_inverse
    self.entity == other.target and \
  File "{src}/elixir/elixir/relationships.py", line 495, in target
    self._target = collection.resolve(self.of_kind, self.entity)
  File "{src}/elixir/elixir/collection.py", line 63, in resolve
    return self.resolve_absolute(key, key, entity)
File "{src}/elixir/elixir/collection.py", line 26, in resolve_absolute
    module = sys.modules[module_path]
KeyError: KeyError('tests.db1..c',)

======================================================================
FAIL: tests.test_events.TestEvents.test_events
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "{py3}/nose-1.0.0-py3.2.egg/nose/case.py", line 188, in runTest
    self.test(*self.arg)
  File "{src}/elixir/tests/test_events.py", line 97, in test_events
    checkCount('before_insert_called', 1)
  File "{src}/elixir/tests/test_events.py", line 89, in checkCount
    (name, value, dictCount)
AssertionError: global var count for before_insert_called should be 1 but is 0 0 = {'before_any_called': 0, 'after_update_called': 0, 'after_delete_called': 0, 'before_delete_called': 0, 'before_insert_called': 0, 'reconstructor_called': 2, 'after_insert_called': 0, 'before_update_called': 0} ['before_insert_called']
>>  assert 0 == 1, \
        'global var count for %s should be %s but is %s' % \
        ('before_insert_called', 1, 0)


======================================================================
FAIL: tests.test_events.TestEvents.test_multiple_inheritance
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "{py3}/nose-1.0.0-py3.2.egg/nose/case.py", line 188, in runTest
    self.test(*self.arg)
File "{src}/elixir/tests/test_events.py", line 127, in test_multiple_inheritance
    assert a.update_count == 1
AssertionError:
>>  assert <tests.test_events.A object at 0x1d74470>.update_count == 1


======================================================================
FAIL: tests.test_packages.TestPackages.test_relative_collection
- ----------------------------------------------------------------------
Traceback (most recent call last):
  File "{py3}/nose-1.0.0-py3.2.egg/nose/case.py", line 188, in runTest
    self.test(*self.arg)
File "{src}/elixir/tests/test_packages.py", line 96, in test_relative_collection
    assert len(elixir.entities) == 5
AssertionError:
>> assert len(<module 'elixir' from '{src}/elixir/elixir/ __init__.py'>.[]) == 5


Name                     Stmts   Miss  Cover   Missing
- ------------------------------------------------------
elixir                      40      2    95%   20-21
elixir.collection 69 13 81% 11, 14-15, 29-33, 68-72, 76, 111, 120, 124 elixir.entity 517 56 89% 57, 155, 161, 226, 305, 315-328, 338-339, 345-352, 358-361, 387, 412-426, 436, 460, 510, 521, 537, 542, 551-553, 568, 587-590, 603, 625, 687, 784, 888, 893, 928, 958, 967, 970, 976, 980, 983, 986, 993
elixir.events               15      0   100%
elixir.ext                   0      0   100%
elixir.ext.associable       60      4    93%   205-209
elixir.ext.perform_ddl      40      2    95%   71, 98
elixir.ext.taggable 43 25 42% 17-28, 33-37, 42-47, 52-58 elixir.ext.versioned 130 12 91% 125-128, 150, 153, 170, 182, 187, 254, 257-258, 285-286
elixir.fields               52      1    98%   166
elixir.options              44      2    95%   243, 258
elixir.properties           66      2    97%   129, 162
elixir.relationships 371 34 91% 455, 507, 531, 575, 593, 650-651, 662, 676, 682, 711, 795, 872, 881-882, 978-983, 995, 1108, 1114, 1133, 1153-1171, 1203, 1223, 1237
elixir.statements           23      0   100%
- ------------------------------------------------------
TOTAL                     1470    153    90%
- ----------------------------------------------------------------------
Ran 146 tests in 10.431s

FAILED (errors=1, failures=3)


- --
Cheers,

Graham

http://bel-epa.com/gjh/








-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAk2Gp0sACgkQOsmLt1NhivxsPQCeJZ6zhj6E6vQfcpEdAMg/Qrky
x0sAoLV+VDIBDPGl2tBUFAlr9H+Rk1+9iQCVAgUBTYanS1nrWVZ7aXD1AQLekQP/
VaouW2xy9JWPtFtHo9VYzcCcSbSyHOT5sEMnTtbOrWyI62MMjrF60yUkjjKhBJOa
jrKGx7u2u3DgSeA3m+rECwzpgWWVsUadsYE0xgKLCekRRxqZq7uMN3k++O/dSYfd
D9ATK1F0ol+LIAAPpErdtCrJpWpXDQnkNVj7DoMRK+w=
=0sSP
-----END PGP SIGNATURE-----

--
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en.

Reply via email to