Skip to content

Conversation

@tomppa65
Copy link

This branch includes changes that should enable zeeplibrary to work with both python 2.7 and python 3.
There were not many actual changes required to make the library work with python 3. The pull request branch does, however, contain many commits and some additional changes. I've

  • tried to make some linters reasonably happy (correcting indentation and import order and such),
  • added a set of unit tests for ZeepLibrary's keyword methods (except for call_operation) to be run with pytest
  • added tox.ini file to enable running the unit tests with both py27 and py39 using tox (must install it separately first)
  • added requirements.txt file to list all python libraries needed to run the unit tests. tox uses that to build a virtual env for each python version.

Library:
- iteritems() -> items() in get_namespace_prefix_for_url
- add encoding='unicode' to etree.tostring() in create_message
- close_all_clients() failed on changing its dictionary while iterating
over it. Now it read the dict keys to a separate list of aliases
and iterates over that to close individual clients
Regression test set:
- changed extraction of namespace data in TC Namespace trickery (
.keys() and .items() return dict view objects which do not allow
indexing)
- iteritems() call -> items() (they return different types of objects
in py2 and py3 but both can be iterated over)
- renamed custom exception attribute message -> err_msg as in py3
Exceptions no longer have a message attribute by default.
variable names, returning) to make linters happier.
call_operation.
Add a sample xml file for testing purposes.
This makes it explicitly a new style class in py2 and
property tests no longer fail in python 2.7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant