Beta: Python 3 migration

 

python3_1

Today, I’m here to announce codebase migration to Python 3 for all CloudLinux userspace utilities. All packages are available from our updates-testing repository.

As you may already know, Python 2 support ended on New Year’s Day 2020. And we at CloudLinux are ready to remove some of the pitfalls and imperfections of Python 2 and stay secured and updated with the new Python 3.

I also should mention that the alt-python27-cllib package will be replaced with the alt-python-cllib package as we announced earlier.

If you encounter any issues, do not hesitate and reach out to our support team at https://cloudlinux.zendesk.com/.

Changelog

alt-python-cllib-2.0.8-3

  • CAG-1027: fix pickle incompatibility between Python 2 and Python 3
  • LU-1630: usage of os.makedirs on Python 3
  • LU-1646: fix CloudLinux Wizard on CloudLinux 7 hybrid
  • LU-1641: investigate issues with CloudLinux 8 installation into empty chroot (ISO install)
  • PTCLLIB-195: fix NoneType Traceback with whmapi call on cPanel 86.0
  • PTCLLIB-183: rewrite pretrans using Lua
  • PTCLLIB-193: fix issues with upgrade and downgrade of alt-python-cllib package
  • CAG-1014: investigate failed test 958-list-mounted-users on DirectAdmin
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LVEMAN-1636: fix sendmail subprocess error
  • LU-1583: enable pylint py3k for cllib
  • LU-1607: (python-cllib) add interpolation=None
  • LU-1589: fix Wizard errors on CloudLinux 8
  • PTCLLIB-191: fix unit tests
  • LU-1501: add manual pyc pyo build for cllib
  • LVES-968: make it possible to get raw subprocess from run_command
  • PTCLLIB-186: make db_info optional as mentioned in documentation
  • PTCLLIB-185: fix admins sync when admin does not have system user
  • PTCLLIB-183: rewrite pretrans using Lua
  • PTCLLIB-184: fix DirectAdmin cpapi tests
  • add text=True to clcaptain
  • LU-1492: use text=True for subprocess while installing cPanel hooks
  • LU-1492: write errors in case of bad cPanel configs
  • LU-1492: make hooks installation work on Plesk
  • minor fixes to cllib to work on Python 3
  • LU-1492: remove byteify usage from cpapi plugins
  • PTCLLIB-179: use text=True in all subprocess calls
  • LU-1566: add -bb option to cllib
  • PTCLLIB-179: remove multiple imports on single lines
  • PTCLLIB-179: fix cpapi plugins Plesk users encoding
  • PTCLLIB-179: fix vendors_api
  • PTCLLIB-179: fixes: stage 2 of futurize
  • PTCLLIB-179: nobuild: stage 2 of futurize
  • LU-1500: update spec and shebangs for Python 3
  • PTCLLIB-179: stage 2: safe fixes of futurize
  • PTCLLIB-179: fix unit tests behaviour
  • PTCLLIB-179: use bytes when parsing php_conf config
  • PTCLLIB-179: fix reload_processes function
  • PTCLLIB-179: replace deprecated NoneType
  • PTCLLIB-179: replace __builtin__ imports with builtins
  • PTCLLIB-179: replace deprecated assertItemsEqual with assertCountEqual
  • PTCLLIB-179: replace assert(Not)Eqals with assert(Not)Equal
  • LU-1500: version up
  • PTCLLIB-175: build alt-python27-cllib package for CloudLinux 8
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lve-utils-4.0.2-2

  • LU-1630: usage of os.makedirs on Python 3
  • LU-1637: /usr/sbin/lveps cuts user IDs > 8
  • LU-1629: cl-summary get-remote returns -42 for cagefs params
  • LU-1620: fix clsummary enabling/disabling error
  • LU-1607: lve-utils: add interpolation=None
  • LU-1604: fix lve-utils CloudLinux 8 and Python 3 tests
  • LU-1501: manually build pyc pyo for CloudLinux 8
  • LU-1589: fix Wizard errors on CloudLinux 8
  • LU-1492: fix checking of users's packages in cldiaglib
  • LU-1492: enable unit tests for lve-utils package
  • LU-1492: fix migration_ve1_to_v2.py script
  • LU-1492: fix cldiaglib error reporting about user's packages
  • LU-1492: remove unneeded encode() in clcontrollib for Plesk
  • PTCLLIB-184: Py_lve: fix DirectAdmin cpapi tests
  • LU-1492: use process.cmdline as a method because of a new psutil version
  • LU-1492: write errors in case of bad cPanel configs
  • LU-1492: migrate lve-utils code to Python 3 (limits manipulation)
  • LU-1492: migrate lve-utils code to use universal Python 2/3 code
  • LU-1566: add -bb option to lve-utils
  • LU-1500: update spec file for python_lve
  • LU-1492: do not call struct.pack with float argument
  • LU-1492: fix bug with _parse_lve_lines
  • LU-1500: version up
  • LU-1486: build lve-utils package for CloudLinux 8
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

cagefs-7.0.2-2

  • CAG-1027: fix pickle incompatibility between Python 2 and Python 3
  • LU-1625: rewrite some expensive CageFS tests as unit-tests
  • LU-1630: CAG: usage of os.makedirs on Python 3
  • CAG-1020: add python3-virtualenv and python36 packages to CageFS
  • CAG-1014: investigate failed test 958-list-mounted-users on DirectAdmin
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LU-1583: enable pylint py3k CageFS
  • CAG-988: migrate CageFS code to universal Python 2/3 code (fix errors #2)
  • LU-1607: CageFS: add interpolation=None
  • CAG-1010: set umask in CageFS
  • CAG-988: migrate CageFS code to universal Python 2/3 code (fix errors after migration)
  • CAG-988: migrate CageFS code to universal Python 2/3 code (stage 2)
  • CAG-988: migrate CageFS code to universal Python 2/3 code (stage 1 + Unicode literals)
  • LU-1501: manually build pyc pyo for CloudLinux 8
  • LU-1566: add -bb option to CageFS
  • LVEMAN-1500: change .spec file and shebangs for Python 3
  • LU-1500: version up
  • CAG-987: build simple_rpm.so for alt-python37
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lve-stats-3.0.0-2

  • LVES-990: fix traceback of lve-stats server after downgrade
  • LVES-988: fix traceback in postun section of previous installed lve-stats package
  • LVES-987: make dbmigrator workable
  • LU-1583: enable pylint py3k lve-stats
  • LU-1598: add Requires: jq for lve-stats-itests package
  • LVES-968: final checks of lve-stats with Python 3 from real repos
  • LVES-968: fix lve-stats unit tests run with -bb
  • LU-1566: add -bb option to the lve-stats
  • LVES-968: minor fixes in order to make pylint and unit tests work
  • LVES-968: make stderr rediretion to /dev/null buffered
  • LVES-968: fix invalid imports for Python 3
  • LVES-968: replace StringIO module with IO
  • LVES-968: avoid comparison of dictionaries as strings
  • LVES-968: fix usage of newer psutil
  • LVES-968: call tzset after modifying os.environ['TZ']
  • LVES-968: remove unneeded matplotlib test
  • LVES-968: replace assertItemsEqual with assertCountEqual
  • LVES-968: fix bytes manipulation in snapshots
  • LVES-968: update res_mem_collector to use bytes during lveps parsing
  • LVES-968: update typing in statsnotifier
  • LVES-968: do not raise StopIteration in iter
  • LVES-968: update code that uses config parser
  • LVES-968: update Sentry library
  • LVES-968: update LiteSpeed library
  • LVES-968: update code to use PrettyTable version
  • LVES-968: use corresponding file mode to write bytes and str
  • LVES-968: update dependencies and shebangs for Python 3
  • LU-1500: version up
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lvemanager-6.0.1-2

  • LU-1630: LVE Manager: usage of os.makedirs on Python 3
  • LVEMAN-1637: make possible ea-ruby24-mod_passenger work with CloudLinux Python Selector
  • LVEMAN-1586: fix cl-quota
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LU-1583: enable pylint py3k lvemanager
  • LVEMAN-1623: Python/Node.js Selector: improve integration with LiteSpeed
  • WEB-1774: fix traceback when try to create a ticket to support (Python 3 branch)
  • WEB-1733: adapt protractor tests to Python 3
  • LVEMAN-1603: migrate LVE Manager to Python 3: stabilizing for rpms
  • LU-1607: LVE Manager: add interpolation=None
  • LVEMAN-1630: fix LVE Manager unit tests mocks
  • LVEMAN-1628: fix issue with pylint that does not start in LVE Manager spec
  • LU-1591: fix fix-homedirs command
  • LU-1589: fix Wizard errors on CloudLinux 8
  • LVEMAN-1603: fix collect_py_files script work with Python 3
  • LVEMAN-1603: migrate LVE Manager to Python 3: stabilizing for rpms
  • LU-1492: write errors in case of bad cPanel configs
  • LVEMAN-1603 migrate 2 to 3 LVE Manager replace with compatible imports + unit tests
  • LU-1566: add -bb option to LVE Manager
  • LU-1500: update spec file for LVE Manager
  • LU-1500: version up
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

Update command

yum update lvemanager lve-utils lve-stats cagefs --enablerepo=cloudlinux-updates-testing

Downgrade command

yum downgrade lvemanager lve-utils lve-stats cagefs cagefs-safebin  --enablerepo=cloudlinux-updates-testing

Beta: Python 3 migration

 

python3_1

Today, I’m here to announce codebase migration to Python 3 for all CloudLinux userspace utilities. All packages are available from our updates-testing repository.

As you may already know, Python 2 support ended on New Year’s Day 2020. And we at CloudLinux are ready to remove some of the pitfalls and imperfections of Python 2 and stay secured and updated with the new Python 3.

I also should mention that the alt-python27-cllib package will be replaced with the alt-python-cllib package as we announced earlier.

If you encounter any issues, do not hesitate and reach out to our support team at https://cloudlinux.zendesk.com/.

Changelog

alt-python-cllib-2.0.8-3

  • CAG-1027: fix pickle incompatibility between Python 2 and Python 3
  • LU-1630: usage of os.makedirs on Python 3
  • LU-1646: fix CloudLinux Wizard on CloudLinux 7 hybrid
  • LU-1641: investigate issues with CloudLinux 8 installation into empty chroot (ISO install)
  • PTCLLIB-195: fix NoneType Traceback with whmapi call on cPanel 86.0
  • PTCLLIB-183: rewrite pretrans using Lua
  • PTCLLIB-193: fix issues with upgrade and downgrade of alt-python-cllib package
  • CAG-1014: investigate failed test 958-list-mounted-users on DirectAdmin
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LVEMAN-1636: fix sendmail subprocess error
  • LU-1583: enable pylint py3k for cllib
  • LU-1607: (python-cllib) add interpolation=None
  • LU-1589: fix Wizard errors on CloudLinux 8
  • PTCLLIB-191: fix unit tests
  • LU-1501: add manual pyc pyo build for cllib
  • LVES-968: make it possible to get raw subprocess from run_command
  • PTCLLIB-186: make db_info optional as mentioned in documentation
  • PTCLLIB-185: fix admins sync when admin does not have system user
  • PTCLLIB-183: rewrite pretrans using Lua
  • PTCLLIB-184: fix DirectAdmin cpapi tests
  • add text=True to clcaptain
  • LU-1492: use text=True for subprocess while installing cPanel hooks
  • LU-1492: write errors in case of bad cPanel configs
  • LU-1492: make hooks installation work on Plesk
  • minor fixes to cllib to work on Python 3
  • LU-1492: remove byteify usage from cpapi plugins
  • PTCLLIB-179: use text=True in all subprocess calls
  • LU-1566: add -bb option to cllib
  • PTCLLIB-179: remove multiple imports on single lines
  • PTCLLIB-179: fix cpapi plugins Plesk users encoding
  • PTCLLIB-179: fix vendors_api
  • PTCLLIB-179: fixes: stage 2 of futurize
  • PTCLLIB-179: nobuild: stage 2 of futurize
  • LU-1500: update spec and shebangs for Python 3
  • PTCLLIB-179: stage 2: safe fixes of futurize
  • PTCLLIB-179: fix unit tests behaviour
  • PTCLLIB-179: use bytes when parsing php_conf config
  • PTCLLIB-179: fix reload_processes function
  • PTCLLIB-179: replace deprecated NoneType
  • PTCLLIB-179: replace __builtin__ imports with builtins
  • PTCLLIB-179: replace deprecated assertItemsEqual with assertCountEqual
  • PTCLLIB-179: replace assert(Not)Eqals with assert(Not)Equal
  • LU-1500: version up
  • PTCLLIB-175: build alt-python27-cllib package for CloudLinux 8
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lve-utils-4.0.2-2

  • LU-1630: usage of os.makedirs on Python 3
  • LU-1637: /usr/sbin/lveps cuts user IDs > 8
  • LU-1629: cl-summary get-remote returns -42 for cagefs params
  • LU-1620: fix clsummary enabling/disabling error
  • LU-1607: lve-utils: add interpolation=None
  • LU-1604: fix lve-utils CloudLinux 8 and Python 3 tests
  • LU-1501: manually build pyc pyo for CloudLinux 8
  • LU-1589: fix Wizard errors on CloudLinux 8
  • LU-1492: fix checking of users's packages in cldiaglib
  • LU-1492: enable unit tests for lve-utils package
  • LU-1492: fix migration_ve1_to_v2.py script
  • LU-1492: fix cldiaglib error reporting about user's packages
  • LU-1492: remove unneeded encode() in clcontrollib for Plesk
  • PTCLLIB-184: Py_lve: fix DirectAdmin cpapi tests
  • LU-1492: use process.cmdline as a method because of a new psutil version
  • LU-1492: write errors in case of bad cPanel configs
  • LU-1492: migrate lve-utils code to Python 3 (limits manipulation)
  • LU-1492: migrate lve-utils code to use universal Python 2/3 code
  • LU-1566: add -bb option to lve-utils
  • LU-1500: update spec file for python_lve
  • LU-1492: do not call struct.pack with float argument
  • LU-1492: fix bug with _parse_lve_lines
  • LU-1500: version up
  • LU-1486: build lve-utils package for CloudLinux 8
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

cagefs-7.0.2-2

  • CAG-1027: fix pickle incompatibility between Python 2 and Python 3
  • LU-1625: rewrite some expensive CageFS tests as unit-tests
  • LU-1630: CAG: usage of os.makedirs on Python 3
  • CAG-1020: add python3-virtualenv and python36 packages to CageFS
  • CAG-1014: investigate failed test 958-list-mounted-users on DirectAdmin
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LU-1583: enable pylint py3k CageFS
  • CAG-988: migrate CageFS code to universal Python 2/3 code (fix errors #2)
  • LU-1607: CageFS: add interpolation=None
  • CAG-1010: set umask in CageFS
  • CAG-988: migrate CageFS code to universal Python 2/3 code (fix errors after migration)
  • CAG-988: migrate CageFS code to universal Python 2/3 code (stage 2)
  • CAG-988: migrate CageFS code to universal Python 2/3 code (stage 1 + Unicode literals)
  • LU-1501: manually build pyc pyo for CloudLinux 8
  • LU-1566: add -bb option to CageFS
  • LVEMAN-1500: change .spec file and shebangs for Python 3
  • LU-1500: version up
  • CAG-987: build simple_rpm.so for alt-python37
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lve-stats-3.0.0-2

  • LVES-990: fix traceback of lve-stats server after downgrade
  • LVES-988: fix traceback in postun section of previous installed lve-stats package
  • LVES-987: make dbmigrator workable
  • LU-1583: enable pylint py3k lve-stats
  • LU-1598: add Requires: jq for lve-stats-itests package
  • LVES-968: final checks of lve-stats with Python 3 from real repos
  • LVES-968: fix lve-stats unit tests run with -bb
  • LU-1566: add -bb option to the lve-stats
  • LVES-968: minor fixes in order to make pylint and unit tests work
  • LVES-968: make stderr rediretion to /dev/null buffered
  • LVES-968: fix invalid imports for Python 3
  • LVES-968: replace StringIO module with IO
  • LVES-968: avoid comparison of dictionaries as strings
  • LVES-968: fix usage of newer psutil
  • LVES-968: call tzset after modifying os.environ['TZ']
  • LVES-968: remove unneeded matplotlib test
  • LVES-968: replace assertItemsEqual with assertCountEqual
  • LVES-968: fix bytes manipulation in snapshots
  • LVES-968: update res_mem_collector to use bytes during lveps parsing
  • LVES-968: update typing in statsnotifier
  • LVES-968: do not raise StopIteration in iter
  • LVES-968: update code that uses config parser
  • LVES-968: update Sentry library
  • LVES-968: update LiteSpeed library
  • LVES-968: update code to use PrettyTable version
  • LVES-968: use corresponding file mode to write bytes and str
  • LVES-968: update dependencies and shebangs for Python 3
  • LU-1500: version up
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

lvemanager-6.0.1-2

  • LU-1630: LVE Manager: usage of os.makedirs on Python 3
  • LVEMAN-1637: make possible ea-ruby24-mod_passenger work with CloudLinux Python Selector
  • LVEMAN-1586: fix cl-quota
  • PTCLLIB-182: fix hooks installation on cPanel 84+
  • LU-1583: enable pylint py3k lvemanager
  • LVEMAN-1623: Python/Node.js Selector: improve integration with LiteSpeed
  • WEB-1774: fix traceback when try to create a ticket to support (Python 3 branch)
  • WEB-1733: adapt protractor tests to Python 3
  • LVEMAN-1603: migrate LVE Manager to Python 3: stabilizing for rpms
  • LU-1607: LVE Manager: add interpolation=None
  • LVEMAN-1630: fix LVE Manager unit tests mocks
  • LVEMAN-1628: fix issue with pylint that does not start in LVE Manager spec
  • LU-1591: fix fix-homedirs command
  • LU-1589: fix Wizard errors on CloudLinux 8
  • LVEMAN-1603: fix collect_py_files script work with Python 3
  • LVEMAN-1603: migrate LVE Manager to Python 3: stabilizing for rpms
  • LU-1492: write errors in case of bad cPanel configs
  • LVEMAN-1603 migrate 2 to 3 LVE Manager replace with compatible imports + unit tests
  • LU-1566: add -bb option to LVE Manager
  • LU-1500: update spec file for LVE Manager
  • LU-1500: version up
  • LU-1500: add commented pylint --py3k
  • LU-1500: create master-py3 branch

Update command

yum update lvemanager lve-utils lve-stats cagefs --enablerepo=cloudlinux-updates-testing

Downgrade command

yum downgrade lvemanager lve-utils lve-stats cagefs cagefs-safebin  --enablerepo=cloudlinux-updates-testing
imunify-logo

WEB SERVER SECURITY BLOG

Subscribe to CloudLinux Newsletter