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

Change default Loader for add_constructor to FullLoader #274

Closed
wants to merge 1 commit into from

Conversation

perlpunk
Copy link
Member

Fixes #271

@perlpunk perlpunk added this to PRs and Notes to Consider in 5.2 Release Mar 17, 2019
@perlpunk perlpunk moved this from PRs and Notes to Consider to Won't fix in 5.2 Release Mar 31, 2019
samueljsb pushed a commit to unipartdigital/odoo that referenced this pull request Apr 4, 2019
pyYAML 5.1 is now the distro version. This introduces the requirement to
specify a loader when loading yaml. There is a known issue ( yaml/pyyaml#274 )
with the add_constructor method not assignign the correct default
loader. This commit assigns the default FullLoader, allowing the
constructors to be used again.

Task: 3761

Signed-off-by: Samuel Searles-Bryant <samuel.searles-bryant@unipart.io>
samueljsb pushed a commit to unipartdigital/udes-tester that referenced this pull request Apr 4, 2019
There is a known issue with pyYAML 5.1 (yaml/pyyaml#274) which does not assign
a default loader to the add_constructor method. This ensures that a
pre-5.1 version of pyYAML is being used.

Task: 3716

Signed-off-by: Samuel Searles-Bryant <samuel.searles-bryant@unipart.io>
@samueljsb
Copy link

Is this going to be included in the next release?

samueljsb pushed a commit to unipartdigital/odoo that referenced this pull request Apr 26, 2019
pyYAML 5.1 is now the distro version. This introduces the FullLoader as
the default loader used with yaml.load(…), however the default loader for
yaml.add_constructor(…) has not been updated (This is a known issue:
yaml/pyyaml#274).
This commit specifies the loader to be used when adding constructors,
using the FullLoader if it exists and the older Loader if not (i.e.
depending on which version of pyYAML is installed).

Task: 3958

Signed-off-by: Samuel Searles-Bryant <samuel.searles-bryant@unipart.io>
samueljsb pushed a commit to unipartdigital/odoo that referenced this pull request Apr 26, 2019
pyYAML 5.1 is now the distro version. This introduces the FullLoader as
the default loader used with yaml.load(…), however, the default loader for
yaml.add_constructor(…) has not been updated (this is a known issue:
yaml/pyyaml#274).
This commit specifies the loader to be used when adding constructors,
using the FullLoader if it exists and the older Loader if not (i.e.
depending on which version of pyYAML is installed).

Task: 3958

Signed-off-by: Samuel Searles-Bryant <samuel.searles-bryant@unipart.io>
@perlpunk
Copy link
Member Author

I think @ingydotnet wants to release #287 instead

@samueljsb
Copy link

Oh perfect, that also solves my problem!

@perlpunk
Copy link
Member Author

perlpunk commented Dec 2, 2019

Closing, replaced by #287

@perlpunk perlpunk closed this Dec 2, 2019
@perlpunk perlpunk deleted the perlpunk/add_constructor branch December 2, 2019 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5.2 Release
Won't fix
Development

Successfully merging this pull request may close these issues.

convenience methods in __init__.py should modify FullLoader instead of Loader
2 participants