You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Kim van der Riet (JIRA)" <ji...@apache.org> on 2018/08/10 15:18:00 UTC

[jira] [Commented] (QPIDIT-136) Python 2.7 site packages path appearing in Python 3 PYTHONPATH

    [ https://issues.apache.org/jira/browse/QPIDIT-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16576420#comment-16576420 ] 

Kim van der Riet commented on QPIDIT-136:
-----------------------------------------

Removing this reference from PYTHON3PATH causes problems finding modules when running some Python 3 shims. It appears that some shims are using the {{qpid_interop_test.qit_errors}} and {{qpid_interop_test.qit_jms_types}} modules.

The use of these modules are legit, but pose the question of how to package them when they are used by both Python 2 and Python 3.

However, the jms_hdrs_props_test is referencing {{qpid_interop_test.qit_common}} in order to use the static method {{QitTestTypeMap.merge_dicts()}}, and this is in turn forcing the inclusion of modules {{qpid_interop_test.qit_broker_props}}, {{qpid_interop_test.qit_shim}} and {{qpid_interop_test.qit_xunit_log}}. Most of these will not currently run under Python 3.

Proposed solution:
 # During installation, manually create a {{/lib/python3.x/site-packages/qpid_interop_test}} directory (where python3.x is the current version of Python 3), then manually create symlinks to the {{qpid_interop_test.qit_errors}} and {{qpid_interop_test.qit_jms_types}} modules. Then replace the {{PYTHON3PATH}} reference to {{lib/python2.7/site-packages}} with {{lib/ptyon3.x/site-packages}} (again, 3.x representing the actual version of Python 3 installed).
 # The static method used in {{QitTestTypeMap.merge_dicts()}} is a 4-line static method to merge 2 dictionaries. Rather than use this function (and hence inherit all the other non-Python3 dependent modules too), copy this function into the {{JmsHdrsPropsTestSender}} class as a static method, and use that instead.

> Python 2.7 site packages path appearing in Python 3 PYTHONPATH
> --------------------------------------------------------------
>
>                 Key: QPIDIT-136
>                 URL: https://issues.apache.org/jira/browse/QPIDIT-136
>             Project: Apache QPID Interoperability Test Suite
>          Issue Type: Bug
>          Components: Installation
>    Affects Versions: 0.1.0
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Major
>             Fix For: 0.2.0
>
>
> The environment variable {{PYTHON3PATH}} is set up as a holder for {{PYTHONPATH}} when running the shims under Python 3. After installing, the value of PYTHON3PATH contains a path segment containing {{lib/python2.7/site-packages}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org