Skip to content

Support Python3 for github CI#3612

Merged
trengginas merged 7 commits intomasterfrom
update-github-python-ci
Jul 6, 2023
Merged

Support Python3 for github CI#3612
trengginas merged 7 commits intomasterfrom
update-github-python-ci

Conversation

@trengginas
Copy link
Copy Markdown
Member

@trengginas trengginas commented Jun 27, 2023

Github CI no longer support Python2.7 (ref), making some tests failing.
This PR will update the unit tests using Python3, it will no longer work on Python2.

@trengginas trengginas added this to the release-2.14 milestone Jun 27, 2023
@trengginas trengginas requested review from nanangizz and sauwming June 27, 2023 05:07
@trengginas trengginas self-assigned this Jun 27, 2023
@sauwming
Copy link
Copy Markdown
Member

The CI tests still failed.

@nanangizz
Copy link
Copy Markdown
Member

There are a lot of warnings:
/home/runner/work/pjproject/pjproject/tests/pjsua/run.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses import imp

This may be useful: https://stackoverflow.com/questions/69884878/replacing-imp-with-importlib-maintaining-old-behavior

@nanangizz
Copy link
Copy Markdown
Member

In CI Windows:

  • UnicodeEncodeError: 'charmap' codec can't encode character '\x80' in position 482: character maps to <undefined>
  • Some failures in initiating/running pjsua.

Saw some encoding errors in CI Linux too.

- On windows, error EACCESS when binding/opening socket
- Fix UnicodeEncodeError/UnicodeDecodeError
Copy link
Copy Markdown
Member

@nanangizz nanangizz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pjsua tests in CI Windows produce about 6x errors (out of 2xx tests), mostly about failure in starting pjsua and FileNotFoundError: [WinError 2] The system cannot find the file specified. But as it seems to also happens before this Python version upgrade, I think it is not within the scope of this PR.

@trengginas
Copy link
Copy Markdown
Member Author

pjsua tests in CI Windows produce about 6x errors (out of 2xx tests), mostly about failure in starting pjsua and FileNotFoundError: [WinError 2] The system cannot find the file specified. But as it seems to also happens before this Python version upgrade, I think it is not within the scope of this PR.

The failure related to sipp tests and AMRNB codec use. sipp tests will fail because it needs cygwin to run on windows. AMRNB build fails in windows.

@trengginas trengginas merged commit 21f40c8 into master Jul 6, 2023
BarryYin pushed a commit to BarryYin/pjproject that referenced this pull request Feb 3, 2026
* Support Python3 for github CI

* Fix runtime error due to changes in telnetlib for python3

This will also remove support for python2

* Fix runtime error due to changes in socket lib

* Fix runtime error

* Fix error

* Replace imp to importlib to fix warning

* Fix some error

- On windows, error EACCESS when binding/opening socket
- Fix UnicodeEncodeError/UnicodeDecodeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants