Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
project_loader: handle invalid unicode chars (canonical#1941)
Note that the exception is currently raised with valid and invalid unicode chbaracters due to the upstream bug pyyaml#25. But we'll want to handle the error cleanly even if the upstream issue is fixed. This branch adds a patch to the PyYAML used by the Snapcraft snap to handle the unicode code points erroneously flagged as invalid, such as the hankey emoji. A Snapcraft snap built from this PR will successfully validate a summary or description making use of the hankey emoji. New test cases: tests.unit.project_loader.test_config.test_invalid_yaml_invalid_unicode_chars tests.integration.general.test_global_properties Note: The integration level test for the PyYAML work-around is skipped unless testing with a snap or Debian package (ie. SNAPCRAFT_FROM_SNAP=1 is set or SNAPCRAFT_FROM_DEB=1 is set), both of which are patched. I verified with a snap from the branch, and running the tests in a virtual environment respectively. LP: #1737571
- Loading branch information