Skip to content

SYN-5967: Convert yaml.safe_load to yaml.load(..., yaml.CSafeLoader) #3289

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

Merged
merged 9 commits into from
Aug 15, 2023

Conversation

MichaelSquires
Copy link
Contributor

@MichaelSquires MichaelSquires commented Aug 13, 2023

  • Switch to opportunistically using yaml CSafeLoader instead of the pure-python SafeLoader (via safe_load)
  • Add synapse.common.yamlloads to deserialize yaml data from a string
  • Update tests

@MichaelSquires MichaelSquires force-pushed the blackout/SYN-5967/yaml_csafeloader branch from d2b0075 to 5957461 Compare August 13, 2023 16:10
@codecov
Copy link

codecov bot commented Aug 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.10% ⚠️

Comparison is base (ec69e68) 97.31% compared to head (f190f39) 97.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3289      +/-   ##
==========================================
- Coverage   97.31%   97.21%   -0.10%     
==========================================
  Files         227      227              
  Lines       45464    45466       +2     
==========================================
- Hits        44242    44199      -43     
- Misses       1222     1267      +45     
Flag Coverage Δ
linux 97.21% <100.00%> (+<0.01%) ⬆️
linux_replay ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
synapse/telepath.py 93.66% <ø> (ø)
synapse/common.py 98.31% <100.00%> (+0.19%) ⬆️
synapse/lib/config.py 96.92% <100.00%> (ø)
synapse/lib/stormlib/yaml.py 100.00% <100.00%> (ø)
synapse/tools/moduser.py 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelSquires MichaelSquires changed the title WIP SYN-5967: Convert yaml.safe_load to yaml.load(..., yaml.CSafeLoader) SYN-5967: Convert yaml.safe_load to yaml.load(..., yaml.CSafeLoader) Aug 14, 2023
@MichaelSquires MichaelSquires marked this pull request as ready for review August 14, 2023 14:38
invisig0th
invisig0th previously approved these changes Aug 14, 2023
@MichaelSquires MichaelSquires merged commit aeeba90 into master Aug 15, 2023
@MichaelSquires MichaelSquires deleted the blackout/SYN-5967/yaml_csafeloader branch August 15, 2023 21:35
@vEpiphyte vEpiphyte modified the milestones: v2.144.0, v2.14x.x Aug 16, 2023
@vEpiphyte vEpiphyte added enhancement reqChangelog requires changelog labels Aug 16, 2023
@vEpiphyte vEpiphyte removed the reqChangelog requires changelog label Aug 24, 2023
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.

4 participants