This repository found at https://github.com/yaml/yaml contains information and pointers to all things YAML.
yaml / pyyaml Goto Github PK
View Code? Open in Web Editor NEWCanonical source repository for PyYAML
License: MIT License
Canonical source repository for PyYAML
License: MIT License
This repository found at https://github.com/yaml/yaml contains information and pointers to all things YAML.
Feature request: provide option (preferably this would be the default) to ignore yes/no/Yes/No/on/off/etc. as booleans.
PyYaml seems to be an odd hybrid between 1.1 and 1.2; its canonical form of boolean is true
/false
(1.1 says y
and n
) but it allows the full gamut of boolean forms from 1.1 including yes/no/Yes/No/on/off which are excluded from 1.2: http://www.yaml.org/spec/1.2/spec.html#id2804923
Please make Windows wheel packages and put them on Pypi.
Currently it is possible to download Windows wheel packages for pandas here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml
It would be great if the wheels were directly available on the Pypi server https://pypi.python.org/pypi/ so that they can be installed with pip.
(NOTE: This is a migration of pyyaml.org's ticket #128, see potential solutions there)
In the 1.1 spec I believe this is considered an error; currently libyaml silently accepts duplicate keys.
yaml.dump(dictionary) outputs a string for a dictionary.
yaml.dump(dictionary, default_flow_style=False) outputs a yaml string.
Seeing as this is a yaml library and all assumptions would point to outputting a yaml string as the default, these defaults seem kind of confusing and unintuitive.
Would it be possible to have an option to ignore undefined tags instead of raising a yaml.constructor.ConstructorError
?
Something like:
def construct_undefined(self, node):
if ignore_undefined:
return None
raise ConstructorError(None, None,
"could not determine a constructor for the tag %r" % node.tag,
node.start_mark)
pip install pyyaml==3.11 from zip with setuptools==23.1.0 succeeds
pip install pyyaml==3.11 from zip with setuptools==24.0.2 fails
pip install pyyaml==3.11 from whl with setuptools==24.0.2 succeeds
Detailed logs can be found here:
https://gist.github.com/curzona/9a22d8e66853250632293b08ab8e7a9d
pip install --no-cache-dir pyyaml==3.11
Collecting pyyaml==3.11
Downloading PyYAML-3.11.zip (371kB)
100% |################################| 378kB 3.3MB/s
Installing collected packages: pyyaml
Running setup.py install for pyyaml ... error
Complete output from command c:\users\adcurzon\desktop\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\adcurzon\\appdata\\local\\temp\\pip-build-ptwmfh\\pyyaml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\adcurzon\appdata\local\temp\pip-s1evr4-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\adcurzon\desktop\env\include\site\python2.7\pyyaml:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\yaml
copying lib\yaml\composer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\constructor.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\cyaml.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\dumper.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\emitter.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\error.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\events.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\loader.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\nodes.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\parser.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\reader.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\representer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\resolver.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\scanner.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\serializer.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\tokens.py -> build\lib.win-amd64-2.7\yaml
copying lib\yaml\__init__.py -> build\lib.win-amd64-2.7\yaml
running build_ext
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
checking if libyaml is compilable
error: [Error 2] The system cannot find the file specified
----------------------------------------
Command "c:\users\adcurzon\desktop\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\adcurzon\\appdata\\local\\temp\\pip-build-ptwmfh\\pyyaml\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\adcurzon\appdata\local\temp\pip-s1evr4-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\adcurzon\desktop\env\include\site\python2.7\pyyaml" failed with error code 1 in c:\users\adcurzon\appdata\local\temp\pip-build-ptwmfh\pyyaml\
Add support for slots objects where there is not dict or getstate since it is not need.
on
and off
are interpreted as True
or False
when used as values. But they are also interpreted this way as keys:
C:\>python
Python 2.7.12 |Anaconda 4.1.1 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import yaml
>>> yaml.safe_load("""
... on: 1
... off: 2
... """)
{False: 2, True: 1}
>>> yaml.__version__
'3.11'
I can port the documentation from the PyYaml website to just be included in the repo. Outside contributions might be easier to accept in this format perhaps.
Specifically the documentation I'm referencing is from http://pyyaml.org/wiki/PyYAMLDocumentation.
First pass I can do is a straight up port, folks can probably go in and edit things afterwords perhaps. Are there any preferences to the documentation syntax? I've usually just stuck to MarkDown, but I know a lot of Pythonistas tend to use reStructuredText.
Every time when we call yaml.dump
, it will call the resolve
method:
def resolve(self, kind, value, implicit):
if kind is ScalarNode and implicit[0]:
if value == u'':
resolvers = self.yaml_implicit_resolvers.get(u'', [])
else:
resolvers = self.yaml_implicit_resolvers.get(value[0], [])
resolvers += self.yaml_implicit_resolvers.get(None, [])
As show above, the last line resolvers += self.yaml_implicit_resolvers.get(None, []) in resolve
will change the yaml_implicit_resolvers
inplace by accident, making yaml_implicit_resolvers
size become more and more bigger, the yaml.dump
will slow down, and finally use up 100% CPU.
reproduce:
import re
import yaml
def test_implicit_resolver_leak():
# Add any custom resolver
tag, regexp = '!any_resolver', re.compile('AnyResolver')
yaml.add_implicit_resolver(tag, regexp)
none_resolvers = yaml.Dumper.yaml_implicit_resolvers.get(None, [])
assert (tag, regexp) in none_resolvers
old_f_resolvers = yaml.Dumper.yaml_implicit_resolvers.get('f', [])
assert (tag, regexp) not in old_f_resolvers
# Dump at least one ScalarNode
yaml.dump(False)
new_f_resolvers = yaml.Dumper.yaml_implicit_resolvers.get('f', [])
assert (tag, regexp) in new_f_resolvers # leak here
I discovered this after researching yaml load times. Running debian, I thought I installed all of the bindings through pip, but I can't see to import/use CLoader. So, I grabbed this.
python setup,py install.
running install
running build
running build_py
running build_ext
building '_yaml' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
x86_64-linux-gnu-gcc: error: ext/_yaml.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
Error compiling module, falling back to pure Python
I have a project which has a bunch of Enums and must dump them safely to send the output to an application written in another language. So an output like:
!!python/object/apply:__main__.Foo [1]
is not viable. And adding representers is not maintainable as the given class hierarchy is strongly subject to modification (new classes are tacked on regularly, all subclasses of Enum
). As it is now, I must register a new "representer" for each such class. As a contrived example:
from yaml import dump as dump_yaml, add_representer
from enum import Enum
class Foo(Enum):
A = 1
B = 2
class Bar(Enum):
A = 1
B = 2
def enum_representer(dumper, data):
return dumper.represent_scalar('!enum', str(data.value))
data = {
'value1': Foo.A,
'value2': Bar.B
}
add_representer(Foo, enum_representer)
add_representer(Bar, enum_representer)
print(dump_yaml(data))
As you can see in the last couple of lines, I need to register a representer for each subclass of Enum. What makes things work in my case, is that those enums come from an external library in my application. If that library decides to add a new subclass and an instance of that ends up in a data structure I wan to serialise, the application will create a non-safe dump.
It would be much nicer if I could simply register a representer for the base class Enum
.
The latest version in https://github.com/yaml/pyyaml/blob/master/CHANGES is 3.11, whereas the latest release is 3.12.
I'm presuming they can just be copied from the ones on:
http://pyyaml.org/wiki/PyYAML
:-)
yaml.load
default to safeyaml.dangerous_load
to replace yaml.load
@sigmavirus24 and @ingydotnet are taking over maintenance of pyyaml from @xitology.
The first step is to migrate the Mercurial repo on BitBucket to a Git repo on GitHub. We hope this will make for a truly collaborative community maintenance environment.
Here are the steps being taken:
old/$name
After this we will:
See also yaml/libyaml#11
Using PyYAML 3.11 in Python 2.7.6 on Ubuntu 14.04 LTS (64-bit)
When a folded scalar is specified (with chomp) with >-
, a line containing only indentation causes the scalar to be parsed instead as a block scalar.
This example works as expected:
abc: >-
def
ghi
which results in:
{'abc': 'def ghi'}
This example returns the string as though |-
was specified instead:
abc: >-
def
ghi
which results in
{'abc': 'abc\ndef'}
The branch 1.2 gives a misleading indication that there is some work done towards 1.2 spec.
The branch does not have any implementation.
Should it be removed ?
My yaml file first line is
!!brut.androlib.meta.MetaInfo
and when I load yaml file, I got this error
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:brut.androlib.meta.MetaInfo'
How can I solve this problem ?
It seems http://pyyaml.org/ticket/245 (created in 2012) is still there.
Problem:
D:\Anaconda\envs\3.4\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2\helpers\pydev\pydevconsole.py" 49921 49922
PyDev console: starting.
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['D:\\GIT_MIRROR\\SRP_DLA\\Python_DLA', 'D:\\GIT_MIRROR\\SRP_DLA\\data', 'D:\\GIT_MIRROR\\SRP_DLA\\results', 'D:\\GIT_MIRROR\\SRP_DLA\\Python_DLA\\python34_code'])
Python 3.4.5 |Continuum Analytics, Inc.| (default, Jul 5 2016, 14:53:07) [MSC v.1600 64 bit (AMD64)] on win32
>>> from abc import ABCMeta
>>> import yaml
>>> class A(metaclass=ABCMeta):
... pass
...
>>> yaml.dump(A)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "D:\Anaconda\envs\3.4\lib\site-packages\yaml\__init__.py", line 200, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)
File "D:\Anaconda\envs\3.4\lib\site-packages\yaml\__init__.py", line 188, in dump_all
dumper.represent(data)
File "D:\Anaconda\envs\3.4\lib\site-packages\yaml\representer.py", line 26, in represent
node = self.represent_data(data)
File "D:\Anaconda\envs\3.4\lib\site-packages\yaml\representer.py", line 51, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "D:\Anaconda\envs\3.4\lib\site-packages\yaml\representer.py", line 315, in represent_object
reduce = data.__reduce_ex__(2)
File "D:\Anaconda\envs\3.4\lib\copyreg.py", line 65, in _reduce_ex
raise TypeError("can't pickle %s objects" % base.__name__)
TypeError: can't pickle int objects
Analysis:
This is because of A being handled as an object, so an unbind version object.reduce_ex is called, so protocol version is mistaken with the object (2 is passed in place of self).
>>> type(A)
<class 'abc.ABCMeta'>
Solution:
>>> from yaml.representer import Representer
>>> from abc import ABCMeta
>>> Representer.add_representer(ABCMeta, Representer.represent_name)
>>> yaml.dump(A)
"!!python/name:__main__.A ''\n"
Using following example.
content = """
dd: !!omap
- a: 1
- b: 3
"""
print(repr(yaml.load(content)))
Output is following: {'dd': [('a', 1), ('b', 3)]}
I suppose it could be much useful if it will be like {'dd': OrderedDict([('a', 1), ('b', 3)])}
ruamel.yamel is a fork off PyYaml which has been much more active in recent years. According to the author it passes all PyYaml tests and so it should be more or less backwards compatible.
At the same time it has many new features and code improvements such as
It would be really useful if these features could be available to all the users of PyYAML. Currently there are many more changes in ruamel.yaml than in PyYAML. Also I believe it already has some of the fixes. This means it would be easiest to rebase off ruamel.yaml and then port all of the new work on PyYAML. I'd like to propose that.
Probably easiest would be to just import the ruamel.yaml code into the current repo, but there could be other proposals such as starting to use the existing ruamel repository (unfortunately it's a mercurial repo so wouldn't be fully compatible with github).
Any comments on this? Reasons not to?
sudo pip install --upgrade pyyaml
Downloading/unpacking pyyaml from https://pypi.python.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz#md5=4c129761b661d181ebf7ff4eb2d79950
Downloading PyYAML-3.12.tar.gz (253kB): 253kB downloaded
Running setup.py (path:/tmp/pip_build_root/pyyaml/setup.py) egg_info for package pyyaml
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/usr/local/lib/python2.7/dist-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 70, in <module>
import packaging.version
ImportError: No module named packaging.version
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/usr/local/lib/python2.7/dist-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 70, in <module>
import packaging.version
ImportError: No module named packaging.version
Consider the following:
import yaml
def mapping_constructor(loader, node):
args = loader.construct_mapping(node)
print args
return args
yaml.add_constructor('!tag', mapping_constructor)
print yaml.load('!tag {a: {b : c}}')
I expect the output to be
{'a': {'b': 'c'}}
{'a': {'b': 'c'}}
but instead I get:
{'a': {}}
{'a': {'b': 'c'}}
That is, the sub-dictionary doesn't get populated until after the constructor call. Is this by design? It makes it impossible to properly initialize objects whose args have dictionaries containing dictionaries.
In scanner.py (line 289 and 320) the message reads:
"could not found expected ':'"
it should read "could not find expected ':'"
Hi,
To reproduce this error, please follow these steps on Windows 10-
Anaconda: 4.3.1
Python: 2.7.13
PyYaml: 3.12
> conda install pyyaml=3.12
> python
>>> import yaml
>>> yaml.cyaml
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'cyaml'
This issue is not present on Linux for the same version of pyyaml.
Regards,
Pushpak
pyyaml
depends on the order of anchor definition. I'm coming to pyyaml
from go-yaml. Both of the examples below work in the go-yaml
, but the second one fails in `pyyaml.
# works
yaml.load("""
left hand: &A
name: The Bastard Sword of Eowyn
weight: 30
right hand: *A
""")
# does not work
yaml.load("""
right hand: *A
left hand: &A
name: The Bastard Sword of Eowyn
weight: 30
""")
Ansible (one of our largest downstream users on Python versions older than 2.6) is officially making all code only support 2.6 or newer in April 2017.
This means we can safely drop support for anything prior to 2.6 at that point. While we don't presently have testing for 2.5 (because our existing options make that difficult) we have been attempting to properly support 2.5 this entire time. This will make our lives easier
YAML processes unicode characters in actual YAML properly, but when an inline Python data structure contains unicode elements, they are not loaded properly. For example:
>>> yaml.safe_load('''\
... foo:
... a: Π
... b: {'a': u'\\u0414'}
... ''')
{'foo': {'a': u'\u0414', 'b': {'a': "u'\\u0414'"}}}
Where we're running into this is when we have a bit of data which is programatically generated and dumped into a YAML file using Jinja. When you template a data structure in Jinja it will just repr()
that data structure and display the results. So, when a repr()
'ed data structure containing a unicode string ends up in the YAML file, PyYAML loads that inline Python incorrectly.
(Obviously, this only affects Python 2)
Is it possible to get yaml.load_all() to return a dictionary? If not, how can I acheive this?
This repo is nearing abandonware which is IMHO a sad thing.
I see @sigmavirus24 was trying to get something done a while back.
@dstufft started a sensible fork IMHO here https://github.com/dstufft/yaml
@ingydotnet @xitology what do you think?
I need to treat '@', '&', '*'
as plain string, and disable anchors and aliases if needed.
that is make the code below work:
yaml.load("@xxx") # -> "@xxx"
yaml.load("&xxx") # -> "&xxx"
yaml.load("*xxx") # -> "*xxx"
How can I do that?
If a string value that's provided starts with #
, PyYAML by default simply dumps it, causing the value to be lost as part of YAML comment. E.g. {foo: "# hello"}
will be dumped as foo: # hello
.
See http://stackoverflow.com/questions/42688644/python-customized-yaml-dumping-format for more detail
When installing dependencies in a Linux production environment or container, it would help to have a binary wheel so that deployed artifacts don't require a full build toolchain. We've seen several of our build systems break since awscli>=1.11.19
added a pyyaml dependency.
Using the manylinux wheel approach should allow you to build wheels compatible with any modern 64-bit linux system.
According to https://en.wikipedia.org/wiki/YAML#Repeated_nodes you can do the following in YAML
- step: &id001 # defines anchor label &id001
instrument: Lasik 2000
pulseEnergy: 5.4
pulseDuration: 12
repetition: 1000
spotSize: 1mm
- step: &id002
instrument: Lasik 2000
pulseEnergy: 5.0
pulseDuration: 10
repetition: 500
spotSize: 2mm
- step: *id001 # refers to the first step (with anchor &id001)
- step: *id002 # refers to the second step
- step: *id001
spotSize: 2mm # redefines just this key, refers rest from &id001
- step: *id002
Although when you try to override spotSize
key of step with reference *id001
you get
yaml.parser.ParserError: while parsing a block mapping
in "C:\Users\...\test.yaml", line 1, column 1
expected <block end>, but found '<block mapping start>'
in "C:\Users\...\test.yaml", line 29, column 5
Hello,
Originally I've filled this bug in here: adrienverge/yamllint#13
@adrienverge narrowed down a simplified case and we couldn't figure out whose fault it is and why yamllint
is complaining. Basic example input file:
cat > zsample.yaml
---
This is paragraph one.
# comment
This is paragraph two.
The result is:
python -c 'import sys, yaml; yaml.dump(yaml.load(sys.stdin), sys.stdout)' < zsample.yaml
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/usr/local/lib/python2.7/site-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python2.7/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/usr/local/lib/python2.7/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/local/lib/python2.7/site-packages/yaml/parser.py", line 174, in parse_document_start
self.peek_token().start_mark)
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
in "<stdin>", line 4, column 1
My little Ruby utility however doesn't complain:
wget https://raw.githubusercontent.com/wkoszek/me/master/scripts/yamllint.rb
chmod 755 yamllint.rb
./yamllint.rb zsample.yaml
I'm trying to understand whose issue is that, as I intended to use yamllint
for my purposes.
Will update the issues link to refer to this Github repo. Is the Mailing list something this project is still maintaining? I'm not aware of what is all maintained by this project, or by former contributers.
In the light of Make load safe_load I would like to point you to the CII Best Practices Badge Program. Could you go thought the criteria, add the project and keep it up-to-date there?
Refs:
Line 289 in a7daab7
Line 320 in a7daab7
- "could not found expected ':'", self.get_mark())
+ "could not find expected ':'", self.get_mark())
The word "could" is the past tense of "can" and both must be followed by a present tense verb. "Can find" and "Could find" are correct, but "could found" is not (unless we're using "found" as the present tense of "to found", like founding a company).
I don't know if this is intended behavior but after shallow copying and merging back parts of a dict, dumping generates what seems like memory addresses instead of actual dict data (ex: &id001).
Here's a small example (python 2):
import yaml
dict = {"1":{"2"}}
shallow_copy = dict["1"]
dict["3"] = shallow_copy
print yaml.dump(dict, Dumper=yaml.CDumper)
The regex for tag:yaml.org,2002:int looks like this:
Resolver.add_implicit_resolver(
u'tag:yaml.org,2002:int',
re.compile(ur'''^(?:[-+]?0b[0-1_]+
|[-+]?0[0-7_]+
|[-+]?(?:0|[1-9][0-9_]*)
|[-+]?0x[0-9a-fA-F_]+
|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$''', re.X),
list(u'-+0123456789'))
Please remove the time-parsing content (the last alternative = [-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)
); this is not an int
and it alters the interpretation of such a string even if someone removes the tag:yaml.org,2002:timestamp
.
http://pyyaml.org/wiki/PyYAML (which is the home page according to https://pypi.python.org/pypi/PyYAML) has a broken link:
PyYAML is now maintained at https://github.org/yaml/pyyaml.
It should be https://github.com/yaml/pyyaml
I have no idea why but I'm having trouble installing pyYAML.
This is the build log:
Running setup.py install for PyYAML ... error
Complete output from command /usr/local/osquery/Cellar/python/2.7.12_101/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3HGiLK/PyYAML/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iPplYE-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/representer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/composer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/cyaml.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/tokens.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/constructor.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/dumper.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/error.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/events.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/parser.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/nodes.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/emitter.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/serializer.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/scanner.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/resolver.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/__init__.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/reader.py -> build/lib.linux-x86_64-2.7/yaml
copying lib/yaml/loader.py -> build/lib.linux-x86_64-2.7/yaml
running build_ext
creating build/temp.linux-x86_64-2.7
checking if libyaml is compilable
clang -fno-strict-aliasing -isystem/usr/local/osquery/legacy/include -L/usr/local/osquery/legacy/lib -isystem/usr/local/osquery/include -L/usr/local/osquery/lib -fPIC -DNDEBUG -Os -march=core2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/osquery/include -I/usr/local/osquery/opt/openssl/include -I/usr/local/osquery/opt/sqlite/include -I/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
clang-4.0: warning: argument unused during compilation: '-L/usr/local/osquery/legacy/lib' [-Wunused-command-line-argument]
clang-4.0: warning: argument unused during compilation: '-L/usr/local/osquery/lib' [-Wunused-command-line-argument]
checking if libyaml is linkable
clang build/temp.linux-x86_64-2.7/check_libyaml.o -L/usr/local/osquery/lib -L/usr/local/osquery/opt/openssl/lib -L/usr/local/osquery/opt/sqlite/lib -lyaml -o build/temp.linux-x86_64-2.7/check_libyaml
building '_yaml' extension
creating build/temp.linux-x86_64-2.7/ext
clang -fno-strict-aliasing -isystem/usr/local/osquery/legacy/include -L/usr/local/osquery/legacy/lib -isystem/usr/local/osquery/include -L/usr/local/osquery/lib -fPIC -DNDEBUG -Os -march=core2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/osquery/include -I/usr/local/osquery/opt/openssl/include -I/usr/local/osquery/opt/sqlite/include -I/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
clang-4.0: warning: argument unused during compilation: '-L/usr/local/osquery/legacy/lib' [-Wunused-command-line-argument]
clang-4.0: warning: argument unused during compilation: '-L/usr/local/osquery/lib' [-Wunused-command-line-argument]
In file included from ext/_yaml.c:271:
ext/_yaml.h:6:9: warning: 'PyUnicode_FromString' macro redefined [-Wmacro-redefined]
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:194:10: note: previous definition is here
# define PyUnicode_FromString PyUnicodeUCS2_FromString
^
ext/_yaml.c:1410:17: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
__pyx_v_value = yaml_get_version_string();
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.c:2577:52: warning: incompatible pointer types passing 'int (void *, char *, size_t, size_t *)' (aka 'int (void *, char *, unsigned long, unsigned long *)') to parameter of type 'yaml_read_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long, unsigned long *)') [-Wincompatible-pointer-types]
yaml_parser_set_input((&__pyx_v_self->parser), __pyx_f_5_yaml_input_handler, ((void *)__pyx_v_self));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/yaml.h:1368:30: note: passing argument to parameter 'handler' here
yaml_read_handler_t *handler, void *data);
^
ext/_yaml.c:2818:59: warning: passing 'char [1]' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign]
yaml_parser_set_input_string((&__pyx_v_self->parser), PyString_AS_STRING(__pyx_v_stream), PyString_GET_SIZE(__pyx_v_stream));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/stringobject.h:91:32: note: expanded from macro 'PyString_AS_STRING'
#define PyString_AS_STRING(op) (((PyStringObject *)(op))->ob_sval)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/yaml.h:1342:30: note: passing argument to parameter 'input' here
const unsigned char *input, size_t size);
^
ext/_yaml.c:4572:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag_directive.handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:4572:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag_directive.handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:4584:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag_directive.prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:4584:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag_directive.prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:5444:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.alias.value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:5444:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.alias.value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:5518:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.anchor.value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:5518:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.anchor.value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:5592:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag.handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:5592:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag.handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:5604:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag.suffix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:5604:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_token->data.tag.suffix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:5716:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_token->data.scalar.value, __pyx_v_token->data.scalar.length, ((char *)"strict")); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7424:42: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_tag_directive->handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:7424:21: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_tag_directive->handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7436:42: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_tag_directive->prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:7436:21: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_tag_directive->prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7655:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.alias.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:7655:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.alias.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7749:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.scalar.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:7749:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.scalar.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7790:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.scalar.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:7790:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.scalar.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:7811:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_DecodeUTF8(__pyx_v_event->data.scalar.value, __pyx_v_event->data.scalar.length, ((char *)"strict")); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:8179:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.sequence_start.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:8179:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.sequence_start.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:8220:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.sequence_start.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:8220:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.sequence_start.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:8449:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.mapping_start.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:8449:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.mapping_start.anchor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:8490:40: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.mapping_start.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:8490:19: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_4 = PyUnicode_FromString(__pyx_v_event->data.mapping_start.tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:10094:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.alias.anchor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:10094:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.alias.anchor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:10378:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.scalar.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:10378:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.scalar.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:10434:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.sequence_start.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:10434:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.sequence_start.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:10490:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.mapping_start.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:10490:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_6 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.mapping_start.anchor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:11109:36: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_DecodeUTF8(__pyx_v_self->parsed_event.data.scalar.value, __pyx_v_self->parsed_event.data.scalar.length, ((char *)"strict")); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:11310:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.scalar.tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:11310:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.scalar.tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:11841:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.sequence_start.tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:11841:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.sequence_start.tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:12435:38: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.mapping_start.tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:66: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^
/usr/local/osquery/legacy/include/string.h:399:37: note: passing argument to parameter '__s' here
extern size_t strlen (__const char *__s)
^
ext/_yaml.c:12435:17: warning: passing 'yaml_char_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = PyUnicode_FromString(__pyx_v_self->parsed_event.data.mapping_start.tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.h:6:54: note: expanded from macro 'PyUnicode_FromString'
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
^~~
/usr/local/osquery/Cellar/python/2.7.12_101/include/python2.7/unicodeobject.h:751:17: note: passing argument to parameter 'string' here
const char *string, /* UTF-8 encoded string */
^
ext/_yaml.c:13630:53: warning: incompatible pointer types passing 'int (void *, char *, size_t)' (aka 'int (void *, char *, unsigned long)') to parameter of type 'yaml_write_handler_t *' (aka 'int (*)(void *, unsigned char *, unsigned long)') [-Wincompatible-pointer-types]
yaml_emitter_set_output((&__pyx_v_self->emitter), __pyx_f_5_yaml_output_handler, ((void *)__pyx_v_self));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/yaml.h:1830:31: note: passing argument to parameter 'handler' here
yaml_write_handler_t *handler, void *data);
^
ext/_yaml.c:15002:44: warning: assigning to 'yaml_char_t *' (aka 'unsigned char *') from 'char [1]' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_v_tag_directives_end->handle = PyString_AS_STRING(__pyx_v_handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.c:15117:44: warning: assigning to 'yaml_char_t *' (aka 'unsigned char *') from 'char [1]' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_v_tag_directives_end->prefix = PyString_AS_STRING(__pyx_v_prefix);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.c:15454:62: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_alias_event_initialize(__pyx_v_event, __pyx_v_anchor) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:553:63: note: passing argument to parameter 'anchor' here
yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
^
ext/_yaml.c:16169:63: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:579:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag,
^
ext/_yaml.c:16169:79: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:579:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag,
^
ext/_yaml.c:16169:92: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~~~
/usr/include/yaml.h:580:22: note: passing argument to parameter 'value' here
yaml_char_t *value, int length,
^
ext/_yaml.c:16603:71: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = ((yaml_sequence_start_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_sequence_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:602:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:16603:87: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_3 = ((yaml_sequence_start_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_sequence_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:602:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:17037:70: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_mapping_start_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_mapping_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:634:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:17037:86: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_mapping_start_event_initialize(__pyx_v_event, __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_mapping_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:634:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:18516:42: warning: assigning to 'yaml_char_t *' (aka 'unsigned char *') from 'char [1]' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_v_tag_directives_end->handle = PyString_AS_STRING(__pyx_v_handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.c:18631:42: warning: assigning to 'yaml_char_t *' (aka 'unsigned char *') from 'char [1]' converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_v_tag_directives_end->prefix = PyString_AS_STRING(__pyx_v_prefix);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/_yaml.c:19491:65: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_alias_event_initialize((&__pyx_v_event), __pyx_v_anchor) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:553:63: note: passing argument to parameter 'anchor' here
yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
^
ext/_yaml.c:20240:68: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:579:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag,
^
ext/_yaml.c:20240:84: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:579:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag,
^
ext/_yaml.c:20240:97: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_scalar_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_value, __pyx_v_length, __pyx_v_plain_implicit, __pyx_v_quoted_implicit, __pyx_v_scalar_style) == 0) != 0);
^~~~~~~~~~~~~
/usr/include/yaml.h:580:22: note: passing argument to parameter 'value' here
yaml_char_t *value, int length,
^
ext/_yaml.c:20605:76: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_sequence_start_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_sequence_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:602:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:20605:92: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_sequence_start_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_sequence_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:602:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:21113:75: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_mapping_start_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_mapping_style) == 0) != 0);
^~~~~~~~~~~~~~
/usr/include/yaml.h:634:22: note: passing argument to parameter 'anchor' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:21113:91: warning: passing 'char *' to parameter of type 'yaml_char_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
__pyx_t_2 = ((yaml_mapping_start_event_initialize((&__pyx_v_event), __pyx_v_anchor, __pyx_v_tag, __pyx_v_implicit, __pyx_v_mapping_style) == 0) != 0);
^~~~~~~~~~~
/usr/include/yaml.h:634:43: note: passing argument to parameter 'tag' here
yaml_char_t *anchor, yaml_char_t *tag, int implicit,
^
ext/_yaml.c:25616:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
^
ext/_yaml.c:25613:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
^
ext/_yaml.c:358:29: warning: unused function '__Pyx_Py_UNICODE_strlen' [-Wunused-function]
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
^
ext/_yaml.c:25728:33: warning: unused function '__Pyx_PyIndex_AsSsize_t' [-Wunused-function]
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
^
ext/_yaml.c:24269:27: warning: unused function '__Pyx_ErrFetchInState' [-Wunused-function]
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
^
ext/_yaml.c:24734:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
^
ext/_yaml.c:24749:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
^
ext/_yaml.c:25382:37: warning: function '__Pyx_PyInt_As_long' is not needed and will not be emitted [-Wunneeded-internal-declaration]
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
^
80 warnings generated.
/usr/local/osquery/bin/gcc-5 -shared -L/usr/local/osquery/legacy/lib -L/usr/local/osquery/lib -Wl,-rpath,/usr/local/osquery/lib -lrt -lpthread -ldl -lz build/temp.linux-x86_64-2.7/ext/_yaml.o -L/usr/local/osquery/lib -L/usr/local/osquery/opt/openssl/lib -L/usr/local/osquery/opt/sqlite/lib -lyaml -o build/lib.linux-x86_64-2.7/_yaml.so
/usr/local/osquery/bin/ld: cannot find -lyaml
collect2: error: ld returned 1 exit status
error: command '/usr/local/osquery/bin/gcc-5' failed with exit status 1
----------------------------------------
Command "/usr/local/osquery/Cellar/python/2.7.12_101/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3HGiLK/PyYAML/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iPplYE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3HGiLK/PyYAML/
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806826
the yaml spec says that
βThe allowed character range explicitly excludes the surrogate
block #xD800-#xDFFF, DEL #x7F, the C0 control block #x0-#x1F
(except for #x9, #xA, and #xD), the C1 control block #x80-#x9F,
#xFFFE, and #xFFFF.β
however pyyaml has chosen to negate that check and apply it to only
plane 0. This means that any yaml document that contains unicode
literals in higher planes will fail to parse (and, on output, use the
rather unfriendly \Uxxxxxxxx format).
The attached patch fixes this in a minimally intrusive way, by
extending the checks to cover the additional codepoints where
appropriate. A better fix would be to use the check as the spec
specifies it, but that would be a bigger change.
--- pyyaml-3.11.orig/lib/yaml/emitter.py
+++ pyyaml-3.11/lib/yaml/emitter.py
@@ -8,9 +8,13 @@
all = ['Emitter', 'EmitterError']
+import sys
+
from error import YAMLError
from events import *
+has_ucs4 = sys.maxunicode > 0xffff
+
class EmitterError(YAMLError):
pass
@@ -701,7 +705,8 @@ class Emitter(object):
line_breaks = True
if not (ch == u'\n' or u'\x20' <= ch <= u'\x7E'):
if (ch == u'\x85' or u'\xA0' <= ch <= u'\uD7FF'
or u'\uE000' <= ch <= u'\uFFFD') and ch != u'\uFEFF':
or u'\uE000' <= ch <= u'\uFFFD'
or ((not has_ucs4) or (u'\U00010000' <= ch < u'\U0010ffff'))) and ch != u'\uFEFF':
unicode_characters = True
if not self.allow_unicode:
special_characters = True
--- pyyaml-3.11.orig/lib/yaml/reader.py
+++ pyyaml-3.11/lib/yaml/reader.py
@@ -19,7 +19,9 @@ all = ['Reader', 'ReaderError']
from error import YAMLError, Mark
-import codecs, re
+import codecs, re, sys
+
+has_ucs4 = sys.maxunicode > 0xffff
class ReaderError(YAMLError):
@@ -134,7 +136,10 @@ class Reader(object):
self.encoding = 'utf-8'
self.update(1)
NON_PRINTABLE = re.compile(u'[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]')
if has_ucs4:
NON_PRINTABLE = re.compile(u'[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD\U00010000-\U0010ffff]')
else:
NON_PRINTABLE = re.compile(u'[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]')
--- pyyaml-3.11.orig/lib3/yaml/emitter.py
+++ pyyaml-3.11/lib3/yaml/emitter.py
@@ -698,7 +698,8 @@ class Emitter:
line_breaks = True
if not (ch == '\n' or '\x20' <= ch <= '\x7E'):
if (ch == '\x85' or '\xA0' <= ch <= '\uD7FF'
or '\uE000' <= ch <= '\uFFFD') and ch != '\uFEFF':
or '\uE000' <= ch <= '\uFFFD'
or '\U00010000' <= ch < '\U0010ffff') and ch != '\uFEFF':
unicode_characters = True
if not self.allow_unicode:
special_characters = True
--- pyyaml-3.11.orig/lib3/yaml/reader.py
+++ pyyaml-3.11/lib3/yaml/reader.py
@@ -134,7 +134,7 @@ class Reader(object):
self.encoding = 'utf-8'
self.update(1)
NON_PRINTABLE = re.compile('[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]')
NON_PRINTABLE = re.compile('[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD\U00010000-\U0010ffff]')
def check_printable(self, data):
match = self.NON_PRINTABLE.search(data)
if match:
Should this repository clearly indicate that it is not the master repo for PyYAML ?
It may lead to misunderstanding if developers contribute here instead of the master:
https://bitbucket.org/xi/pyyaml
Here's a minimal example to reproduce my bug:
#!/usr/bin/env python3
import io, json, sys, yaml
# Comment this out to compare with the non-buggy case
yaml.add_constructor('!baz', lambda loader, node: node.value)
# Comment this out and uncomment the line after it to "fix" the bug
default_out = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
# default_out = sys.stdout
parsed = yaml.load('''
---
foo:
- bar''')
json.dump(parsed, default_out)
default_out.write('\n')
This program prints nothing. Commenting out the add_constructor
line, or printing directly to sys.stdout
, prints {"foo": ["bar"]}
as it should.
Somehow, adding a custom constructor clobbers the I/O wrapper around stdout.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.