Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simultaneous support for Python 2 and Python 3 #46

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

teeks99
Copy link
Contributor

@teeks99 teeks99 commented Oct 27, 2018

I've made the changes to follow the program through in both version of python. This Fixes #43.

Please don't merge yet, there are two known defects.

Different results

The windows version shows slightly different results on windows. Looking at the develop results the teeks99-test-py23-p2-w and teeks99-test-py23-p3-w they are the same except for the buildresults which are missing for the python 3 version.

Different output

On linux (running python 3.5), I get an exception running through the log for regex. Running with Python 3 the file results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/test_log.xml contains:

<test-log library="regex" revision="38afec" test-name="icu_example" test-type="run" test-program="libs/regex/example/snippets/icu_example.cpp" target-directory="boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden" toolset="gcc-8~c++2a" show-run-output="false">
<compile result="succeed" timestamp="2018-10-27 08:59:04 UTC">
"g++-8"   -fvisibility-inlines-hidden -std=c++2a -fPIC -m64 -pthread -O0 -fno-inline -Wall -pedantic -g -fvisibility=hidden -Wextra -DBOOST_ALL_NO_LIB=1 -DBOOST_HAS_ICU=1 -DBOOST_REGEX_DYN_LINK=1 -DU_USING_ICU_NAMESPACE=0  -I".." -c -o "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/snippets/icu_example.o" "../libs/regex/example/snippets/icu_example.cpp"

</compile>
<link result="succeed" timestamp="2018-10-27 08:59:04 UTC">
"g++-8"  -Wl,-rpath -Wl,"/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden" -Wl,-rpath-link -Wl,"/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden" -o "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/icu_example" -Wl,--start-group "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/snippets/icu_example.o" "/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden/libboost_regex.so.1.69.0"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -licudata -licui18n -licuuc -Wl,--end-group -fPIC -m64 -pthread -g -fvisibility=hidden -fvisibility-inlines-hidden 

</link>
<run result="succeed" timestamp="2018-10-27 08:59:04 UTC">
$100.23
£198.12
$
£

EXIT STATUS: 0
</run>
</test-log>

whereas the python 2 version contains:

<test-log library="regex" revision="38afec" test-name="icu_example" test-type="run" test-program="libs/regex/example/snippets/icu_example.cpp" target-directory="boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden" toolset="gcc-8~c++2a" show-run-output="false">
<compile result="succeed" timestamp="2018-10-27 09:03:39 UTC">
"g++-8"   -fvisibility-inlines-hidden -std=c++2a -fPIC -m64 -pthread -O0 -fno-inline -Wall -pedantic -g -fvisibility=hidden -Wextra -DBOOST_ALL_NO_LIB=1 -DBOOST_HAS_ICU=1 -DBOOST_REGEX_DYN_LINK=1 -DU_USING_ICU_NAMESPACE=0  -I".." -c -o "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/snippets/icu_example.o" "../libs/regex/example/snippets/icu_example.cpp"

</compile>
<link result="succeed" timestamp="2018-10-27 09:03:39 UTC">
"g++-8"  -Wl,-rpath -Wl,"/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden" -Wl,-rpath-link -Wl,"/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden" -o "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/icu_example" -Wl,--start-group "/var/boost/run/results/boost/bin.v2/libs/regex/example/icu_example.test/gcc-8~c++2a/debug/threading-multi/visibility-hidden/snippets/icu_example.o" "/var/boost/run/results/boost/bin.v2/libs/regex/build/gcc-8~c++2a/debug/threading-multi/visibility-hidden/libboost_regex.so.1.69.0"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -licudata -licui18n -licuuc -Wl,--end-group -fPIC -m64 -pthread -g -fvisibility=hidden -fvisibility-inlines-hidden 

</link>
<run result="succeed" timestamp="2018-10-27 09:03:39 UTC">
$100.23
<C2><A3>198.12
$
<C2><A3>

EXIT STATUS: 0
</run>
</test-log>

The difference on the £198.12 vs. <C2><A3>198.12 causes a UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1803: ordinal not in range(128). Any ideas what could be causing the differences in the xml files? Something about the environment that runs the tests?

@jimmbelll
Copy link

Please don't merge yet, there are two known defects.

The difference on the £198.12 vs. <C2><A3>198.12 causes a UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1803: ordinal not in range(128). Any ideas what could be causing the differences in the xml files? Something about the environment that runs the tests?

Were you able to make any more progress with this? Are you running your regressions under python 3?

I see in collect_and_upload_logs.py row 182 they're dealing with it as a text file. Opening that file as binary, then read().decode('utf8') (and it should really be in a with statement to close the file) may do it.

Similarly in process_xml_file() row 103.

Neither will get as far as the .translate(...), since it will hit the UnicodeDecodeError first in the read().

@teeks99
Copy link
Contributor Author

teeks99 commented Jul 27, 2023

I haven't looked at this in a very long time, but I believe that issue is still there. I'm still using python 2 for the regression runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support python 3
2 participants