Skip to content

Commit

Permalink
update configuration / documentation for Py26 support #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiko Czub committed Mar 2, 2014
1 parent 4d4eec7 commit db0620e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
16 changes: 16 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ Changes in TestLink-API-Python-client Source Distribution
TestLink-API-Python-client UNDER DEVELOP v0.4.8
-----------------------------------------------

add Python 2.6 support #21
~~~~~~~~~~~~~~~~~~~~~~~~~~

Installation failed under Python 2.6 with on error, cause TestlinkAPIGeneric
used in '_convertPostionalArgs()' a
`Py31 feature, back ported to Py27 <http://docs.python.org/2/whatsnew/2.7.html#python-3-1-features>`_

- Dictionary and set comprehensions ({i: i*2 for i in range(3)}).

TestLink-API-Python-client is now installable under Py26 and Py27.
To use it under Py26, the module 'argparse' must be installed additionally::

pip install argparse
pip install TestLink-API-Python-client

implement 1.9.9 api changes - getLastExecutionResult #16
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TestlinkAPIGeneric and TestlinkAPIClient api method getLastExecutionResult()
Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ how existing code can be adapted
TestLink-API-Python-client developers
-------------------------------------
* `James Stock`_, `Olivier Renault`_, `lczub`_
* `g4l4drim`_, `pade`_, `anton-matosov`_, `citizen-stig`_
* `g4l4drim`_, `pade`_, `anton-matosov`_, `citizen-stig`_, `charz`_
* anyone forgotten?

.. _Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0
Expand All @@ -102,3 +102,4 @@ TestLink-API-Python-client developers
.. _lczub: https://github.com/lczub/TestLink-API-Python-client
.. _anton-matosov: https://github.com/anton-matosov/TestLink-API-Python-client
.. _citizen-stig: https://github.com/citizen-stig/TestLink-API-Python-client
.. _charz: https://github.com/charz/TestLink-API-Python-client.git
9 changes: 7 additions & 2 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ TestLink-API-Python-client Installation
Preconditions
-------------

Currently only the combination Python 2.7 and TestLink 1.9.8/1.9.9 is tested.
Currently only the combinations Python 2.6.6/2.7.5 and TestLink 1.9.8/1.9.9 are tested.

- Other combination might work - feedback is welcome :-)

To use TestLink-API-Python-client under Py26, the module 'argparse' must be
installed additionally (Py27 already includes this)::

pip install argparse

TestLink configuration
----------------------

Expand Down Expand Up @@ -40,7 +45,7 @@ The source code can be retrieved as source distribution either

Install the archives using pip by running::

pip install TestLink-API-Python-client-0.4.6.zip
pip install TestLink-API-Python-client-0.4.7.zip
Installing from source
----------------------
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Libraries :: Python Modules'
]
Expand Down
9 changes: 4 additions & 5 deletions src/testlink/testlinkapigeneric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,11 +1034,10 @@ def _convertPostionalArgs(self, methodName, valueList):
new_msg = '%s\n expected args: %s' % (new_msg, ', '.join(nameList))
raise testlinkerrors.TLArgError(new_msg)

ret = {}
for x in range(len(nameList)):
ret.update({nameList[x] : valueList[x] })

return ret
# issue #20: Following line works with Py27, but not with Py26
# return {nameList[x] : valueList[x] for x in range(len(nameList)) }
# this line works with Py26 and Py27 (and is also nice)
return dict(zip(nameList, valueList))

def _getAttachmentArgs(self, attachmentfile):
""" returns dictionary with key/value pairs needed, to transfer
Expand Down
2 changes: 1 addition & 1 deletion src/testlink/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
#
# ------------------------------------------------------------------------

VERSION = '0.4.8-dev-20'
VERSION = '0.4.8-Beta'

0 comments on commit db0620e

Please sign in to comment.