Skip to content

Commit

Permalink
Release 0.11.4 (#228)
Browse files Browse the repository at this point in the history
* Release 0.11.4

* fix the version number
  • Loading branch information
frostming authored Aug 13, 2022
1 parent ade6619 commit 6720e24
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [0.11.4] - 2022-08-12

### Fixed

- Fix a memory leak caused by `lru_cache` on methods. ([#227](https://github.com/sdispater/tomlkit/issues/227))

## [0.11.3] - 2022-08-10

### Fixed
Expand Down Expand Up @@ -307,7 +313,8 @@
- Fixed handling of super tables with different sections.
- Fixed raw strings escaping.

[unreleased]: https://github.com/sdispater/tomlkit/compare/0.11.3...master
[unreleased]: https://github.com/sdispater/tomlkit/compare/0.11.4...master
[0.11.4]: https://github.com/sdispater/tomlkit/releases/tag/0.11.4
[0.11.3]: https://github.com/sdispater/tomlkit/releases/tag/0.11.3
[0.11.2]: https://github.com/sdispater/tomlkit/releases/tag/0.11.2
[0.11.1]: https://github.com/sdispater/tomlkit/releases/tag/0.11.1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tomlkit"
version = "0.11.3"
version = "0.11.4"
description = "Style preserving TOML library"
authors = ["Sébastien Eustace <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion tomlkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from tomlkit.api import ws


__version__ = "0.11.3"
__version__ = "0.11.4"
__all__ = [
"aot",
"array",
Expand Down
10 changes: 1 addition & 9 deletions tomlkit/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from datetime import time
from datetime import tzinfo
from enum import Enum
from functools import lru_cache
from typing import TYPE_CHECKING
from typing import Any
from typing import Collection
Expand Down Expand Up @@ -242,12 +241,6 @@ def item(
raise ValueError(f"Invalid type {type(value)}")


# This code is only valid for Python < 3.8, when @cached_property was introduced
# it replaces chained @property and @lru_cache decorators
def lazy_property(f):
return property(lru_cache(maxsize=None)(f))


class StringType(Enum):
# Single Line Basic
SLB = '"'
Expand Down Expand Up @@ -291,7 +284,7 @@ def invalid_sequences(self) -> Collection[str]:
StringType.MLL: (forbidden_in_literal | {"'''"}) - allowed_in_multiline,
}[self]

@lazy_property
@property
def unit(self) -> str:
return self.value[0]

Expand Down Expand Up @@ -320,7 +313,6 @@ class BoolType(Enum):
TRUE = "true"
FALSE = "false"

@lru_cache(maxsize=None) # noqa: B019
def __bool__(self):
return {BoolType.TRUE: True, BoolType.FALSE: False}[self]

Expand Down

0 comments on commit 6720e24

Please sign in to comment.