Upgrading tomlkit 0.7 to 0.8
Breaking0.7.2 → 0.8.0Platform1Changed1Fixed10
BreakingUpgrade verdict
A platform requirement change.
In plain terms
- The library no longer works on Python 3.5 or older; you need Python 3.6 or newer.
Must act 1 item needs code or config changes
Python requirement changed in 0.8.0: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* → >=3.6,<4.0.
What you must change
Platform1
Drops support for Python versions below 3.6.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
export dump - added:
export load
- changed:
function aot() → function aot() -> AoT - changed:
function array(raw=…) → function array(raw: str=…) -> Array - changed:
function boolean(raw) → function boolean(raw: str) -> Bool - changed:
function comment(string) → function comment(string: str) -> Comment - changed:
function date(raw) → function date(raw: str) -> Date - changed:
function datetime(raw) → function datetime(raw: str) -> DateTime - changed:
function document() → function document() -> TOMLDocument - changed:
function dumps(data, sort_keys=…) → function dumps(data: Mapping, sort_keys: bool=…) -> str - changed:
function float_(raw) → function float_(raw: str) -> Float - changed:
function inline_table() → function inline_table() -> InlineTable - changed:
function integer(raw) → function integer(raw: str) -> Integer - changed:
function key(k) → function key(k: str) -> Key - changed:
function key_value(src) → function key_value(src: str) -> Tuple[Key, _Item] - changed:
function loads(string) → function loads(string: str) -> TOMLDocument - changed:
function nl() → function nl() -> Whitespace - changed:
function parse(string) → function parse(string: str) -> TOMLDocument - changed:
function string(raw) → function string(raw: str) -> String - changed:
function table() → function table() -> Table - changed:
function time(raw) → function time(raw: str) -> Time - changed:
function value(raw) → function value(raw: str) -> _Item - changed:
function ws(src) → function ws(src: str) -> Whitespace - added:
function dump(data: Mapping, fp: IO[str], *, sort_keys: bool=…) -> None - added:
function load(fp: IO) -> TOMLDocument
- removed:
method Container.pop(key, default=…) - removed:
method OutOfOrderTableProxy.get(key, default=…) - removed:
method OutOfOrderTableProxy.items() - removed:
method OutOfOrderTableProxy.keys() - removed:
method OutOfOrderTableProxy.pop(key, default=…) - removed:
method OutOfOrderTableProxy.update(other) - removed:
method OutOfOrderTableProxy.values() - removed:
property Container.body - removed:
property Container.value - changed:
class Container(MutableMapping, dict) → class Container(_CustomDict) - changed:
class OutOfOrderTableProxy(MutableMapping, dict) → class OutOfOrderTableProxy(_CustomDict) - changed:
constructor Container(parsed=…) → constructor Container(parsed: bool=…) -> None - changed:
constructor OutOfOrderTableProxy(container, indices) → constructor OutOfOrderTableProxy(container: Container, indices: Tuple[int]) -> None - changed:
method Container.add(key, item=…) → method Container.add(key: Union[Key, Item, str], item: Optional[Item]=…) -> Container - changed:
method Container.append(key, item) → method Container.append(key: Union[Key, str, None], item: Item) -> Container - changed:
method Container.as_string() → method Container.as_string() -> str - changed:
method Container.copy() → method Container.copy() -> Container - changed:
method Container.item(key) → method Container.item(key: Union[Key, str]) -> Item - changed:
method Container.last_item() → method Container.last_item() -> Optional[Item] - changed:
method Container.parsing(parsing) → method Container.parsing(parsing: bool) -> None - changed:
method Container.remove(key) → method Container.remove(key: Union[Key, str]) -> Container - changed:
method Container.setdefault(key, default=…) → method Container.setdefault(key: Union[Key, str], default: Any) -> Any - changed:
method OutOfOrderTableProxy.setdefault(key, default=…) → method OutOfOrderTableProxy.setdefault(key: Union[Key, str], default: Any) -> Any - added:
function ends_with_withespace(it: Any) -> bool - added:
property Container.body -> List[Tuple[Optional[Key], Item]] - added:
property Container.value -> Dict[Any, Any]
- changed:
constructor EmptyKeyError(line, col) → constructor EmptyKeyError(line: int, col: int) -> None - changed:
constructor EmptyTableNameError(line, col) → constructor EmptyTableNameError(line: int, col: int) -> None - changed:
constructor InternalParserError(line, col, message=…) → constructor InternalParserError(line: int, col: int, message: Optional[str]=…) -> None - changed:
constructor InvalidCharInStringError(line, col, char) → constructor InvalidCharInStringError(line: int, col: int, char: str) -> None - changed:
constructor InvalidControlChar(line, col, char, type) → constructor InvalidControlChar(line: int, col: int, char: int, type: str) -> None - changed:
constructor InvalidDateError(line, col) → constructor InvalidDateError(line: int, col: int) -> None - changed:
constructor InvalidDateTimeError(line, col) → constructor InvalidDateTimeError(line: int, col: int) -> None - changed:
constructor InvalidNumberError(line, col) → constructor InvalidNumberError(line: int, col: int) -> None - changed:
constructor InvalidNumberOrDateError(line, col) → constructor InvalidNumberOrDateError(line: int, col: int) -> None - changed:
constructor InvalidTimeError(line, col) → constructor InvalidTimeError(line: int, col: int) -> None - changed:
constructor InvalidUnicodeValueError(line, col) → constructor InvalidUnicodeValueError(line: int, col: int) -> None - changed:
constructor MixedArrayTypesError(line, col) → constructor MixedArrayTypesError(line: int, col: int) -> None - changed:
constructor ParseError(line, col, message=…) → constructor ParseError(line: int, col: int, message: Optional[str]=…) -> None - changed:
constructor UnexpectedCharError(line, col, char) → constructor UnexpectedCharError(line: int, col: int, char: str) -> None - changed:
constructor UnexpectedEofError(line, col) → constructor UnexpectedEofError(line: int, col: int) -> None
- removed:
constructor Key(k, t=…, sep=…, dotted=…, original=…) - removed:
method AoT.append(table) - removed:
method Array.append(_item) - removed:
method InlineTable.get(key, default=…) - removed:
method InlineTable.remove(key) - removed:
method InlineTable.setdefault(key, default=…) - removed:
method Key.is_bare() - removed:
method Table.add(key, item=…) - removed:
method Table.get(key, default=…) - removed:
method Table.remove(key) - removed:
method Table.setdefault(key, default=…) - removed:
property AoT.body - removed:
property AoT.discriminant - removed:
property AoT.value - removed:
property Array.discriminant - removed:
property Array.value - removed:
property Bool.discriminant - removed:
property Bool.value - removed:
property Comment.discriminant - removed:
property Date.discriminant - removed:
property Date.value - removed:
property DateTime.discriminant - removed:
property DateTime.value - removed:
property Float.discriminant - removed:
property Float.value - removed:
property InlineTable.discriminant - removed:
property InlineTable.value - removed:
property Integer.discriminant - removed:
property Integer.value - removed:
property Item.discriminant - removed:
property Item.trivia - removed:
property Key.delimiter - removed:
property Null.discriminant - removed:
property Null.value - removed:
property String.discriminant - removed:
property String.value - removed:
property StringType.unit - removed:
property Table.discriminant - removed:
property Table.value - removed:
property Time.discriminant - removed:
property Time.value - removed:
property Whitespace.discriminant - removed:
property Whitespace.s - removed:
property Whitespace.trivia - removed:
property Whitespace.value - changed:
class AoT(Item, list) → class AoT(Item, _CustomList) - changed:
class Array(Item, list) → class Array(Item, _CustomList) - changed:
class InlineTable(Item, MutableMapping, dict) → class InlineTable(AbstractTable) - changed:
class Integer(long, Item) → class Integer(int, Item) - changed:
class Item(object) → class Item - changed:
class Key → class Key(abc.ABC) - changed:
class String(unicode, Item) → class String(str, Item) - changed:
class Table(Item, MutableMapping, dict) → class Table(AbstractTable) - changed:
constructor AoT(body, name=…, parsed=…) → constructor AoT(body: List[Table], name: Optional[str]=…, parsed: bool=…) -> None - changed:
constructor Array(value, trivia, multiline=…) → constructor Array(value: list, trivia: Trivia, multiline: bool=…) -> None - changed:
constructor Bool(t, trivia) → constructor Bool(t: int, trivia: Trivia) -> None - changed:
constructor Date(year, month, day, trivia, raw) → constructor Date(year: int, month: int, day: int, trivia: Trivia, raw: str) -> None - changed:
constructor DateTime(year, month, day, hour, minute, second, microsecond, tzinfo, trivia, raw) → constructor DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, microsecond: int, tzinfo: Optional[tzinfo], trivia: Trivia, raw: str) -> None - changed:
constructor Float(_, trivia, raw) → constructor Float(_: float, trivia: Trivia, raw: str) -> None - changed:
constructor InlineTable(value, trivia, new=…) → constructor InlineTable(value: container.Container, trivia: Trivia, new: bool=…) -> None - changed:
constructor Integer(_, trivia, raw) → constructor Integer(_: int, trivia: Trivia, raw: str) -> None - changed:
constructor Item(trivia) → constructor Item(trivia: Trivia) -> None - changed:
constructor Null() → constructor Null() -> None - changed:
constructor String(t, _, original, trivia) → constructor String(t: StringType, _: str, original: str, trivia: Trivia) -> None - changed:
constructor Table(value, trivia, is_aot_element, is_super_table=…, name=…, display_name=…) → constructor Table(value: container.Container, trivia: Trivia, is_aot_element: bool, is_super_table: bool=…, name: Optional[str]=…, display_name: Optional[str]=…) -> None - changed:
constructor Time(hour, minute, second, microsecond, tzinfo, trivia, raw) → constructor Time(hour: int, minute: int, second: int, microsecond: int, tzinfo: Optional[tzinfo], trivia: Trivia, raw: str) -> None - changed:
constructor Trivia(indent=…, comment_ws=…, comment=…, trail=…) → constructor Trivia(indent: str=…, comment_ws: str=…, comment: str=…, trail: str=…) -> None - changed:
constructor Whitespace(s, fixed=…) → constructor Whitespace(s: str, fixed: bool=…) -> None - changed:
method AoT.as_string() → method AoT.as_string() -> str - changed:
method Array.as_string() → method Array.as_string() -> str - changed:
method Array.clear() → method Array.clear() -> None - changed:
method Array.multiline(multiline) → method Array.multiline(multiline: bool) -> Array - changed:
method Bool.as_string() → method Bool.as_string() -> str - changed:
method Comment.as_string() → method Comment.as_string() -> str - changed:
method Date.as_string() → method Date.as_string() -> str - changed:
method DateTime.as_string() → method DateTime.as_string() -> str - changed:
method Float.as_string() → method Float.as_string() -> str - changed:
method InlineTable.as_string() → method InlineTable.as_string() -> str - changed:
method Integer.as_string() → method Integer.as_string() -> str - changed:
method Item.as_string() → method Item.as_string() -> str - changed:
method Item.comment(comment) → method Item.comment(comment: str) -> Item - changed:
method Item.indent(indent) → method Item.indent(indent: int) -> Item - changed:
method Item.is_aot() → method Item.is_aot() -> bool - changed:
method Item.is_boolean() → method Item.is_boolean() -> bool - changed:
method Item.is_inline_table() → method Item.is_inline_table() -> bool - changed:
method Item.is_table() → method Item.is_table() -> bool - changed:
method Key.as_string() → method Key.as_string() -> str - changed:
method Key.is_dotted() → method Key.is_dotted() -> bool - changed:
method Null.as_string() → method Null.as_string() -> str - changed:
method String.as_string() → method String.as_string() -> str - changed:
method StringType.is_basic() → method StringType.is_basic() -> bool - changed:
method StringType.is_literal() → method StringType.is_literal() -> bool - changed:
method StringType.is_multiline() → method StringType.is_multiline() -> bool - changed:
method StringType.is_singleline() → method StringType.is_singleline() -> bool - changed:
method StringType.toggle() → method StringType.toggle() -> StringType - changed:
method Table.as_string() → method Table.as_string() -> str - changed:
method Table.indent(indent) → method Table.indent(indent: int) -> Table - changed:
method Table.is_aot_element() → method Table.is_aot_element() -> bool - changed:
method Table.is_super_table() → method Table.is_super_table() -> bool - changed:
method Table.raw_append(key, _item) → method Table.raw_append(key: Union[Key, str], _item: Any) -> Table - changed:
method Time.as_string() → method Time.as_string() -> str - changed:
method Whitespace.as_string() → method Whitespace.as_string() -> str - changed:
method Whitespace.is_fixed() → method Whitespace.is_fixed() -> bool - added:
class AbstractTable(Item, _CustomDict) - added:
class DottedKey(Key) - added:
class SingleKey(Key) - added:
constructor AbstractTable(value: container.Container, trivia: Trivia) - added:
constructor DottedKey(keys: Iterable[Key], sep: Optional[str]=…, original: Optional[str]=…) -> None - added:
constructor SingleKey(k: str, t: Optional[KeyType]=…, sep: Optional[str]=…, original: Optional[str]=…) -> None - added:
field Key.key: str - added:
field Key.sep: str - added:
method AbstractTable.add(value: Union[Comment, Whitespace]) -> AT | (key: Union[Key, str], value: Any) -> AT - added:
method AbstractTable.append(key: None, value: Union[Comment, Whitespace]) -> AT | (key: Union[Key, str], value: Any) -> AT - added:
method AbstractTable.copy() -> AT - added:
method AbstractTable.remove(key: Union[Key, str]) -> AT - added:
method AbstractTable.setdefault(key: Union[Key, str], default: Any) -> Any - added:
method AoT.insert(index: int, value: dict) -> None - added:
method AoT.invalidate_display_name() - added:
method Array.add_line(*items: Any, indent: str=…, comment: Optional[str]=…, add_comma: bool=…, newline: bool=…) -> None - added:
method Array.insert(pos: int, value: Any) -> None - added:
method Key.concat(other: Key) -> DottedKey - added:
method SingleKey.is_bare() -> bool - added:
method Table.invalidate_display_name() - added:
method Trivia.copy() -> Trivia - added:
property AbstractTable.value -> container.Container - added:
property AoT.body -> List[Table] - added:
property AoT.discriminant -> int - added:
property AoT.value -> List[Dict[Any, Any]] - added:
property Array.discriminant -> int - added:
property Array.value -> list - added:
property Bool.discriminant -> int - added:
property Bool.value -> bool - added:
property Comment.discriminant -> int - added:
property Date.discriminant -> int - added:
property Date.value -> date - added:
property DateTime.discriminant -> int - added:
property DateTime.value -> datetime - added:
property Float.discriminant -> int - added:
property Float.value -> float - added:
property InlineTable.discriminant -> int - added:
property Integer.discriminant -> int - added:
property Integer.value -> int - added:
property Item.discriminant -> int - added:
property Item.trivia -> Trivia - added:
property Null.discriminant -> int - added:
property Null.value -> None - added:
property SingleKey.delimiter -> str - added:
property String.discriminant -> int - added:
property String.value -> str - added:
property StringType.unit -> str - added:
property Table.discriminant -> int - added:
property Time.discriminant -> int - added:
property Time.value -> time - added:
property Whitespace.discriminant -> int - added:
property Whitespace.s -> str - added:
property Whitespace.trivia -> Trivia - added:
property Whitespace.value -> str - added:
variable AT
- changed:
constructor Parser(string) → constructor Parser(string: str) -> None - changed:
method Parser.end() → method Parser.end() -> bool - changed:
method Parser.extract() → method Parser.extract() -> str - changed:
method Parser.inc(exception=…) → method Parser.inc(exception: Optional[Type[ParseError]]=…) -> bool - changed:
method Parser.inc_n(n, exception=…) → method Parser.inc_n(n: int, exception: Optional[Type[ParseError]]=…) -> bool - changed:
method Parser.mark() → method Parser.mark() -> None - changed:
method Parser.parse() → method Parser.parse() -> TOMLDocument
- removed:
property Source.current - removed:
property Source.idx - removed:
property Source.marker - removed:
property Source.state - changed:
class Source(unicode) → class Source(str) - changed:
constructor Source(_) → constructor Source(_: str) -> None - changed:
method Source.end() → method Source.end() -> bool - changed:
method Source.extract() → method Source.extract() -> str - changed:
method Source.inc(exception=…) → method Source.inc(exception: Optional[Type[ParseError]]=…) -> bool - changed:
method Source.inc_n(n, exception=…) → method Source.inc_n(n: int, exception: Optional[Type[ParseError]]=…) -> bool - changed:
method Source.mark() → method Source.mark() -> None - changed:
method Source.parse_error(exception=…, *args) → method Source.parse_error(exception: Type[ParseError]=…, *args: Any) -> ParseError - added:
property Source.current -> TOMLChar - added:
property Source.idx -> int - added:
property Source.marker -> int - added:
property Source.state -> _StateHandler
- changed:
class TOMLChar(unicode) → class TOMLChar(str) - changed:
method TOMLChar.is_bare_key_char() → method TOMLChar.is_bare_key_char() -> bool - changed:
method TOMLChar.is_int_float_char() → method TOMLChar.is_int_float_char() -> bool - changed:
method TOMLChar.is_kv_sep() → method TOMLChar.is_kv_sep() -> bool - changed:
method TOMLChar.is_nl() → method TOMLChar.is_nl() -> bool - changed:
method TOMLChar.is_spaces() → method TOMLChar.is_spaces() -> bool - changed:
method TOMLChar.is_ws() → method TOMLChar.is_ws() -> bool
- changed:
class TOMLFile(object) → class TOMLFile - changed:
constructor TOMLFile(path) → constructor TOMLFile(path: str) -> None - changed:
method TOMLFile.read() → method TOMLFile.read() -> TOMLDocument - changed:
method TOMLFile.write(data) → method TOMLFile.write(data: TOMLDocument) -> None