Upgrading PyYAML 5 to 6
Breaking5.4.1 → 6.0.3Platform3Changed1Other1
BreakingUpgrade verdict
3 platform requirement changes.
In plain terms
- This version works with the newest Python release and with experimental builds that remove the global interpreter lock.
- This version works with newer Cython and Python 3.13.
- The package now works on Python 3.13.
Must act 3 items need code or config changes
Python requirement changed in 6.0.2: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.* → >=3.8.
What you must change
Platform3
Adds support for Python 3.14 and experimental free-threading builds.
Adds support for Cython 3.x and Python 3.13.
Adds support for Python 3.13.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
class YAMLLoadWarning(RuntimeWarning) - removed:
field YAMLObject.from_yaml - removed:
field YAMLObject.to_yaml - removed:
function load_warning(method) - changed:
class YAMLObject(object) → class YAMLObject - changed:
function load(stream, Loader=…) → function load(stream, Loader) - changed:
function load_all(stream, Loader=…) → function load_all(stream, Loader) - changed:
method YAMLObject.from_yaml(loader, node) → static method YAMLObject.from_yaml(loader, node) - changed:
method YAMLObject.to_yaml(dumper, data) → static method YAMLObject.to_yaml(dumper, data)
- changed:
class Composer(object) → class Composer
- added:
class BaseConstructor - added:
class Constructor(UnsafeConstructor) - added:
class ConstructorError(MarkedYAMLError) - added:
class FullConstructor(SafeConstructor) - added:
class SafeConstructor(BaseConstructor) - added:
class UnsafeConstructor(FullConstructor) - added:
constructor BaseConstructor() - added:
field BaseConstructor.yaml_constructors - added:
field BaseConstructor.yaml_multi_constructors - added:
field SafeConstructor.bool_values - added:
field SafeConstructor.inf_value - added:
field SafeConstructor.nan_value - added:
field SafeConstructor.timestamp_regexp - added:
method BaseConstructor.check_data() - added:
method BaseConstructor.check_state_key(key) - added:
method BaseConstructor.construct_document(node) - added:
method BaseConstructor.construct_mapping(node, deep=…) - added:
method BaseConstructor.construct_object(node, deep=…) - added:
method BaseConstructor.construct_pairs(node, deep=…) - added:
method BaseConstructor.construct_scalar(node) - added:
method BaseConstructor.construct_sequence(node, deep=…) - added:
method BaseConstructor.get_data() - added:
method BaseConstructor.get_single_data() - added:
method FullConstructor.construct_python_bytes(node) - added:
method FullConstructor.construct_python_complex(node) - added:
method FullConstructor.construct_python_long(node) - added:
method FullConstructor.construct_python_module(suffix, node) - added:
method FullConstructor.construct_python_name(suffix, node) - added:
method FullConstructor.construct_python_object(suffix, node) - added:
method FullConstructor.construct_python_object_apply(suffix, node, newobj=…) - added:
method FullConstructor.construct_python_object_new(suffix, node) - added:
method FullConstructor.construct_python_str(node) - added:
method FullConstructor.construct_python_tuple(node) - added:
method FullConstructor.construct_python_unicode(node) - added:
method FullConstructor.find_python_module(name, mark, unsafe=…) - added:
method FullConstructor.find_python_name(name, mark, unsafe=…) - added:
method FullConstructor.get_state_keys_blacklist() - added:
method FullConstructor.get_state_keys_blacklist_regexp() - added:
method FullConstructor.make_python_instance(suffix, node, args=…, kwds=…, newobj=…, unsafe=…) - added:
method FullConstructor.set_python_instance_state(instance, state, unsafe=…) - added:
method SafeConstructor.construct_mapping(node, deep=…) - added:
method SafeConstructor.construct_scalar(node) - added:
method SafeConstructor.construct_undefined(node) - added:
method SafeConstructor.construct_yaml_binary(node) - added:
method SafeConstructor.construct_yaml_bool(node) - added:
method SafeConstructor.construct_yaml_float(node) - added:
method SafeConstructor.construct_yaml_int(node) - added:
method SafeConstructor.construct_yaml_map(node) - added:
method SafeConstructor.construct_yaml_null(node) - added:
method SafeConstructor.construct_yaml_object(node, cls) - added:
method SafeConstructor.construct_yaml_omap(node) - added:
method SafeConstructor.construct_yaml_pairs(node) - added:
method SafeConstructor.construct_yaml_seq(node) - added:
method SafeConstructor.construct_yaml_set(node) - added:
method SafeConstructor.construct_yaml_str(node) - added:
method SafeConstructor.construct_yaml_timestamp(node) - added:
method SafeConstructor.flatten_mapping(node) - added:
method UnsafeConstructor.find_python_module(name, mark) - added:
method UnsafeConstructor.find_python_name(name, mark) - added:
method UnsafeConstructor.make_python_instance(suffix, node, args=…, kwds=…, newobj=…) - added:
method UnsafeConstructor.set_python_instance_state(instance, state) - added:
static method BaseConstructor.add_constructor(tag, constructor) - added:
static method BaseConstructor.add_multi_constructor(tag_prefix, multi_constructor)
- changed:
class Emitter(object) → class Emitter
- changed:
class Mark(object) → class Mark
- changed:
class Parser(object) → class Parser
- removed:
field BaseRepresenter.add_multi_representer - removed:
field BaseRepresenter.add_representer - removed:
method BaseRepresenter.get_classobj_bases(cls) - removed:
method Representer.represent_instance(data) - removed:
method Representer.represent_long(data) - removed:
method Representer.represent_str(data) - removed:
method Representer.represent_unicode(data) - removed:
method SafeRepresenter.represent_long(data) - removed:
method SafeRepresenter.represent_unicode(data) - changed:
class BaseRepresenter(object) → class BaseRepresenter - changed:
method BaseRepresenter.add_multi_representer(data_type, representer) → static method BaseRepresenter.add_multi_representer(data_type, representer) - changed:
method BaseRepresenter.add_representer(data_type, representer) → static method BaseRepresenter.add_representer(data_type, representer) - added:
method Representer.represent_ordered_dict(data) - added:
method SafeRepresenter.represent_binary(data)
- added:
class BaseResolver - added:
class Resolver(BaseResolver) - added:
constructor BaseResolver() - added:
field BaseResolver.DEFAULT_MAPPING_TAG - added:
field BaseResolver.DEFAULT_SCALAR_TAG - added:
field BaseResolver.DEFAULT_SEQUENCE_TAG - added:
field BaseResolver.yaml_implicit_resolvers - added:
field BaseResolver.yaml_path_resolvers - added:
method BaseResolver.ascend_resolver() - added:
method BaseResolver.check_resolver_prefix(depth, path, kind, current_node, current_index) - added:
method BaseResolver.descend_resolver(current_node, current_index) - added:
method BaseResolver.resolve(kind, value, implicit) - added:
static method BaseResolver.add_implicit_resolver(tag, regexp, first) - added:
static method BaseResolver.add_path_resolver(tag, path, kind=…)
- changed:
class Scanner(object) → class Scanner
- changed:
class Serializer(object) → class Serializer