Skip to content

Fix warning errors of the libyaml binding#557

Closed
pantoniou wants to merge 0 commit intoyaml:release/6.0from
pantoniou:rel6.0-fix-warn
Closed

Fix warning errors of the libyaml binding#557
pantoniou wants to merge 0 commit intoyaml:release/6.0from
pantoniou:rel6.0-fix-warn

Conversation

@pantoniou
Copy link
Copy Markdown
Contributor

Make the build work without any warnings.
The cython and C yaml types were differing in definition and that's
no good.

Signed-off-by: Pantelis Antoniou pantelis.antoniou@konsulko.com

yaml/_yaml.h Outdated
#else

// really puzzling, but, not being a string is required
#undef PyString_CheckExact
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right thing- this redefines the builtin Python macro to tell calling code that bytes and str have the same memory layout, which they don't. I'm actually amazed this doesn't segfault under test, but I guess if the codepath isn't actually being hit, or there's a fallback somewhere else... It's also possible that there was some 2/3 compatibility stuff that was keeping this stuff working that needs to be revisited now that we're 3.x only. eg, the other definitions of PyString_XXX below that are using bytes are not semantically correct for Python3- in py2 str and bytes were the same thing, but not in py3. So maybe we need to revisit all of those to be named properly and/or use Python's own macros where appropriate. The custom string type is definitely problematic for this, so we may need to have yaml_char_t casting aliases for all the necessary macros... :(

@pantoniou
Copy link
Copy Markdown
Contributor Author

pantoniou commented Sep 22, 2021 via email

@ingydotnet ingydotnet closed this Sep 22, 2021
stuhood pushed a commit to pantsbuild/pants that referenced this pull request Oct 20, 2021
PyYAML 6:
```
6.0 (2021-10-13)

* yaml/pyyaml#327 -- Change README format to Markdown
* yaml/pyyaml#483 -- Add a test for YAML 1.1 types
* yaml/pyyaml#497 -- fix float resolver to ignore `.` and `._`
* yaml/pyyaml#550 -- drop Python 2.7
* yaml/pyyaml#553 -- Fix spelling of “hexadecimal”
* yaml/pyyaml#556 -- fix representation of Enum subclasses
* yaml/pyyaml#557 -- fix libyaml extension compiler warnings
* yaml/pyyaml#560 -- fix ResourceWarning on leaked file descriptors
* yaml/pyyaml#561 -- always require `Loader` arg to `yaml.load()`
* yaml/pyyaml#564 -- remove remaining direct distutils usage
```
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Oct 23, 2021
Now uses "vendored" distutils from setuptools by default
rather than from Python stdlib.

Changes
=======

* yaml/pyyaml#327
  -- Change README format to Markdown
* yaml/pyyaml#483
  -- Add a test for YAML 1.1 types
* yaml/pyyaml#497
  -- fix float resolver to ignore `.` and `._`
* yaml/pyyaml#550
  -- drop Python 2.7
* yaml/pyyaml#553
  -- Fix spelling of “hexadecimal”
* yaml/pyyaml#556
  -- fix representation of Enum subclasses
* yaml/pyyaml#557
  -- fix libyaml extension compiler warnings
* yaml/pyyaml#560
  -- fix ResourceWarning on leaked file descriptors
* yaml/pyyaml#561
  -- always require `Loader` arg to `yaml.load()`
* yaml/pyyaml#564
  -- remove remaining direct distutils usage

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
seambot pushed a commit to seamapi/poky that referenced this pull request Oct 23, 2021
Now uses "vendored" distutils from setuptools by default
rather than from Python stdlib.

Changes
=======

* yaml/pyyaml#327
  -- Change README format to Markdown
* yaml/pyyaml#483
  -- Add a test for YAML 1.1 types
* yaml/pyyaml#497
  -- fix float resolver to ignore `.` and `._`
* yaml/pyyaml#550
  -- drop Python 2.7
* yaml/pyyaml#553
  -- Fix spelling of “hexadecimal”
* yaml/pyyaml#556
  -- fix representation of Enum subclasses
* yaml/pyyaml#557
  -- fix libyaml extension compiler warnings
* yaml/pyyaml#560
  -- fix ResourceWarning on leaked file descriptors
* yaml/pyyaml#561
  -- always require `Loader` arg to `yaml.load()`
* yaml/pyyaml#564
  -- remove remaining direct distutils usage

(From OE-Core rev: 2abc7a612a71b3594f3183fbb824a708269ae694)

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

3 participants