/
[Python] Migration help for ecu.test and a new Python version

[Python] Migration help for ecu.test and a new Python version

Issue

ecu.test is based on Python. As ecu.test is constantly under development, it is also necessary that the Python version is up to date. As a rule, the Python version is updated once a year.

For you as a user, it is therefore necessary that you update the locations you use (e.g. function variables, UserPyModules, additional Python libraries).

Otherwise, it may happen that your code can no longer be executed.

Solution

Collect Python deprecation warnings in ecu.test via feature flag

Python deprecation warnings are filtered out in ecu.test by default and are neither written in the ecu.test_err.log, ecu.test_out.log nor in the message window. In order to display Python deprecation warnings, you need to place a feature flag in your ecu.test workspace. A feature flag is an option to activate code that enables a feature that is deactivated by default.

In ecu.test feature flags are stored in the features.xml file within the .workspace folder of your ecu.test Workspace.

 

If you do not use any feature flags:

  1. Download this file.

  2. Save it in the .workspace folder next to the other XML files storing your settings.

  3. Restart ecu.test.

  4. The message FEATURE 'ENABLE-DEPRECATION-WARNINGS' is activated! is shown within the ecu.test message window.

If you use feature flags:

  1. Copy the feature ENABLE-DEPRECATION-WARNINGS into your features.xml file. 

  2. Save your changes.

  3. Restart ecu.test.

  4. The message FEATURE 'ENABLE-DEPRECATION-WARNINGS' is activated! is shown within the ecu.test message window.

In your temp directory (%temp%\ecu.test [version] by default) a log file will be created:

  • DeprecationWarning_<WorkspaceName>.log

This deprecation log will store all deprecation warnings (and only these) that are created during runtime of ecu.test. Thus, you can use this information to systematically get rid of all the deprecation warnings.

 

Note

The deprecation log is never cleared, enabling you to run projects, packages, configurations and generators in multiple sessions.

 

Further information regarding Python migration can be found here:

Related content