Bug 1313864 - Make sure code is python2 compatible
Summary: Make sure code is python2 compatible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-vmconsole
Classification: oVirt
Component: Core
Version: master
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ovirt-4.0.0-alpha
: 1.0.1
Assignee: Francesco Romani
QA Contact: Nikolai Sednev
URL:
Whiteboard: virt
Depends On:
Blocks: 1312364 1330565
TreeView+ depends on / blocked
 
Reported: 2016-03-02 13:41 UTC by Francesco Romani
Modified: 2016-07-05 08:03 UTC (History)
3 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Clone Of:
Environment:
Last Closed: 2016-07-05 08:03:33 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
tjelinek: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 54259 0 None None None 2016-03-02 13:56:55 UTC

Description Francesco Romani 2016-03-02 13:41:31 UTC
Description of problem:
Just trying 'make' from the current master branch results in a failure

make[3]: Leaving directory '/home/fromani/Projects/upstream/ovirt-vmconsole/src/ovirt_vmconsole/common'
Making all in ovirt_vmconsole_host_shell
make[3]: Entering directory '/home/fromani/Projects/upstream/ovirt-vmconsole/src/ovirt_vmconsole/ovirt_vmconsole_host_shell'
FILES=""; \
FILES="${FILES:-./*.py}"; \
if [ -n "pyflakes" ]; then \
	pyflakes ${FILES}; \
fi
./socketproxy.py:198: undefined name 'BrokenPipeError'
./socketproxy.py:211: undefined name 'BrokenPipeError'
Makefile:556: recipe for target 'python-syntax-check' failed

This is because 'BrokenPipeError' was added in python3, while we must preserve compatibility with python2.

Please note this not affects released software


Version-Release number of selected component (if applicable):
master branch

How reproducible:
100%

Steps to Reproduce:
1. fetch tip of the master branch
2. make sure default python is version 2 (most often true on Fedora/RHEL/Centos)
3. run 'make'

Actual results:
check fails for undefined name, breaking python2 compatibility


Expected results:
Code should work both on python2 and python3

Comment 1 Francesco Romani 2016-03-02 13:42:49 UTC
This bug is for internal tracking only. Users of the package should never notice any difference if they use released packages.

Comment 2 Nikolai Sednev 2016-03-13 14:08:28 UTC
Hi Francesco,
Can you supply more detailed steps for bug reproduction and verification please?
I'm not totally familiar with what should be done, in order to properly verify this bug.

Comment 3 Francesco Romani 2016-03-14 07:43:36 UTC
(In reply to Nikolai Sednev from comment #2)
> Hi Francesco,
> Can you supply more detailed steps for bug reproduction and verification
> please?
> I'm not totally familiar with what should be done, in order to properly
> verify this bug.

Hi Nikolai,

This bug was added as internal reference only: I needed a blocker for https://bugzilla.redhat.com/show_bug.cgi?id=1312364

Also, this doesn't affect released software.
If you can install the 1.0.1 package (or any package past 1.0.0), this bug is gone.

You can reproduce what addressed here only if you fetch a snapshot from the source repository and try to install manually.

I don't think further action is needed/

Comment 4 Nikolai Sednev 2016-04-10 15:44:25 UTC
Works for me on these components:

ovirt-vmconsole-1.0.1-0.0.master.20160309100203.gitdfa3c40.el7.noarch
qemu-kvm-rhev-2.3.0-31.el7_2.11.x86_64
libvirt-client-1.2.17-13.el7_2.4.x86_64
vdsm-4.17.999-817.git03d82f6.el7.centos.noarch
mom-0.5.2-0.0.master.20160226114234.git95535d1.el7.noarch
sanlock-3.2.4-2.el7_2.x86_64
ovirt-hosted-engine-ha-2.0.0-0.0.master.20160321143043.20160321143039.gitadbef4c.el7.noarch
ovirt-setup-lib-1.0.2-0.0.master.20160119215211.gita8bd5cb.el7.centos.noarch
ovirt-release40-4.0.0-0.2.alpha1.20160405123556.gitbd184ec.noarch
libgovirt-0.3.3-1.el7_2.1.x86_64
ovirt-vmconsole-host-1.0.1-0.0.master.20160309100203.gitdfa3c40.el7.noarch
ovirt-engine-sdk-python-3.6.3.1-0.1.20160211.git13845c8.el7.centos.noarch
ovirt-hosted-engine-setup-2.0.0-0.0.master.20160318071154.gite339fa9.el7.centos.noarch
ovirt-host-deploy-1.5.0-0.0.master.20160317100615.gitf913ead.el7.noarch

Red Hat Enterprise Linux Server release 7.2 (Maipo)
Linux 3.10.0-327.13.1.el7.x86_64 #1 SMP Mon Feb 29 13:22:02 EST 2016 x86_64 x86_64 x86_64 GNU/Linux



I've attempted to make NFS based HE deployment using ovirt-engine-appliance.noarch 0:4.0-20160322.1.el7.centos from disk. Had an issue described here https://bugzilla.redhat.com/show_bug.cgi?id=1325677, but forth to comment #3, setting this very bug's status as verified, as currently environment component version is ovirt-vmconsole-host-1.0.1-0.0.master.20160309100203.gitdfa3c40.el7.noarch > package past 1.0.0.

Comment 5 Sandro Bonazzola 2016-07-05 08:03:33 UTC
oVirt 4.0.0 has been released, closing current release.


Note You need to log in before you can comment on or make changes to this bug.