Skip to content

Change default Loader for add_constructor to FullLoader#274

Closed
perlpunk wants to merge 1 commit intomasterfrom
perlpunk/add_constructor
Closed

Change default Loader for add_constructor to FullLoader#274
perlpunk wants to merge 1 commit intomasterfrom
perlpunk/add_constructor

Conversation

@perlpunk
Copy link
Copy Markdown
Member

Fixes #271

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
Copy Markdown

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
Copy Markdown
Member Author

I think @ingydotnet wants to release #287 instead

@samueljsb
Copy link
Copy Markdown

Oh perfect, that also solves my problem!

@perlpunk
Copy link
Copy Markdown
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

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants