pyrax icon indicating copy to clipboard operation
pyrax copied to clipboard

[python3] ConfigParser does not exist

Open scolson opened this issue 11 years ago • 7 comments

Per the docs, ConfigParser is now configparser in 3.x.

init.py, base_identity.py, and identity/rax_identity.py should be modified for:

try:
    import configparser
except ImportError:
    import ConfigParser as configparser

And the subsequent calls to ConfigParser.SomeMethod() should be changed to lowercase.

scolson avatar Dec 01 '13 17:12 scolson

FYI - I started working on this but ran into a bunch of other import errors w/Python 3.3 when running tox. Just need to dig in a little more.

richleland avatar Dec 02 '13 12:12 richleland

There are plenty of other 3.3 errors which I would guess would trigger too, or in any event, would flat out fail to parse. At least when I was playing around with this in 3.3 the other day, I didn't get very far before realizing there was a fair amount of search-replace in syntax alone that would be necessary for it to run.

So I would think the bigger question is wether unit tests still run properly in 2.7 with this commit/issue since 3.3 will still be a long way off.

scolson avatar Dec 02 '13 22:12 scolson

Yeah agreed there will likely be a bit of work here - I want to try to estimate just how much. With this change in place all the 2.7 unit tests still run properly.

richleland avatar Dec 02 '13 22:12 richleland

After we get this and the print syntax changed over (and maybe any other items on the 2.x->3.x compat guides) I am happy to help test things. We are writing some code now for 3.3 and have had to mimic (and heavily strip down) some of the identity and queue code. Since this is proof of concept thing, I don't mind an error here or there as I am testing pyrax...

scolson avatar Dec 02 '13 23:12 scolson

I'm got a little further with this today, fixing a lot of python3 tox errors (print as function, name and import errors), but we still have a way to go. https://github.com/richleland/pyrax/pull/1

made sure python2 tests also still pass.

Also note python-swiftclient will need some updating as well.

rizumu avatar Jan 03 '14 20:01 rizumu

Yes, both swiftclient and novaclient would need to be ported, among other third party libraries. I started on a swiftclient port but it didn't attract many reviews and ultimately died. If you want to pick it up, the branches are probably still available in gerrit but they're likely marked as abandoned.

briancurtin avatar Jan 03 '14 20:01 briancurtin

Both swiftclient and novaclient have been ported AFAIK.

vaibhavsagar avatar Dec 10 '14 03:12 vaibhavsagar