Skip to content

Commit 92e46e5

Browse files
authored
Merge pull request #151 from sdispater/merge-changes-from-fork
Merge the changes from maintained fork atoml
2 parents 627fb1a + 459e452 commit 92e46e5

30 files changed

Lines changed: 1738 additions & 1793 deletions

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*.*.*'
6+
- "*.*.*"
77

88
jobs:
99
Release:
@@ -13,7 +13,7 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v2
1515
with:
16-
submodules: 'recursive'
16+
submodules: "recursive"
1717

1818
- name: Get tag
1919
id: tag
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Install and set up Poetry
2828
run: |
29-
curl -fsS -o install-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py
29+
curl -fsSL -o install-poetry.py https://install.python-poetry.org
3030
python install-poetry.py -y
3131
3232
- name: Update PATH

.github/workflows/tests.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,32 @@ on:
77
- develop
88
pull_request:
99
branches:
10-
- '**'
10+
- "**"
1111

1212
jobs:
1313
Linting:
1414
runs-on: ubuntu-latest
1515

1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up Python 3.8
19-
uses: actions/setup-python@v1
20-
with:
21-
python-version: 3.8
22-
- name: Linting
23-
run: |
24-
pip install pre-commit
25-
pre-commit run --all-files
18+
- uses: actions/setup-python@v2
19+
- uses: pre-commit/[email protected]
2620
Tests:
2721
needs: Linting
2822
name: ${{ matrix.os }} / ${{ matrix.python-version }}
2923
runs-on: ${{ matrix.os }}-latest
3024
strategy:
3125
matrix:
3226
os: [Ubuntu, MacOS, Windows]
33-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
27+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
3428

3529
steps:
3630
- uses: actions/checkout@v2
3731
with:
38-
submodules: 'recursive'
32+
submodules: "recursive"
3933

4034
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@v1
35+
uses: actions/setup-python@v2
4236
with:
4337
python-version: ${{ matrix.python-version }}
4438

@@ -51,11 +45,16 @@ jobs:
5145
- name: Install Poetry
5246
shell: bash
5347
run: |
54-
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
55-
python get-poetry.py --preview -y
56-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
57-
echo "%USERPROFILE%/.poetry/bin" >> $GITHUB_PATH
58-
- name: Setup Poetry
48+
curl -fsSL https://install.python-poetry.org | python - -y
49+
- name: Update PATH
50+
if: ${{ matrix.os != 'Windows' }}
51+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
52+
53+
- name: Update Path for Windows
54+
if: ${{ matrix.os == 'Windows' }}
55+
shell: bash
56+
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
57+
- name: Configure Poetry
5958
shell: bash
6059
run: |
6160
poetry config virtualenvs.in-project true

.pre-commit-config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: stable
3+
rev: 21.12b0
44
hooks:
5-
- id: black
6-
python_version: python3.6
5+
- id: black
76

87
- repo: https://github.com/timothycrosley/isort
9-
rev: 5.1.4
8+
rev: 5.10.1
109
hooks:
1110
- id: isort
1211
additional_dependencies: [toml]
1312
exclude: ^.*/?setup\.py$
1413

1514
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v3.1.0
15+
rev: v4.0.1
1716
hooks:
1817
- id: trailing-whitespace
1918
exclude: ^tests/(toml-test|toml-spec-tests)/.*

CHANGELOG.md

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
# Change Log
22

3+
## [Unreleased]
4+
5+
### Changed
6+
7+
- Drop support for Python<3.6. ([#151](https://github.com/sdispater/tomlkit/pull/151))
8+
9+
### Fixed
10+
11+
- Fix a bug that tomlkit accepts an invalid table with missing `=`. ([#141](https://github.com/sdispater/tomlkit/issues/141))
12+
- Fix the invalid dumping output when the key is empty. ([#143](https://github.com/sdispater/tomlkit/issues/143))
13+
- Fix incorrect string returned by dumps when moving/renaming table. ([#144](https://github.com/sdispater/tomlkit/issues/144))
14+
- Fix inconsistent dumps when replacing existing item with nested table. ([#145](https://github.com/sdispater/tomlkit/issues/145))
15+
- Fix invalid dumps output when appending to a multiline array. ([#146](https://github.com/sdispater/tomlkit/issues/146))
16+
- Fix the `KeyAlreadyExistError` when the table is separated into multiple parts. ([#148](https://github.com/sdispater/tomlkit/issues/148))
17+
318
## [0.7.2] - 2021-05-20
419

520
### Fixed
621

722
- Fixed an error where container's data were lost when copying. ([#126](https://github.com/sdispater/tomlkit/pull/126))
823
- Fixed missing tests in the source distribution of the package. ([#127](https://github.com/sdispater/tomlkit/pull/127))
924

10-
1125
## [0.7.1] - 2021-05-19
1226

1327
### Fixed
@@ -19,7 +33,6 @@
1933
- Fixed an error in top level keys handling when building documents programmatically. ([#122](https://github.com/sdispater/tomlkit/pull/122))
2034
- Fixed compliance with mypy by adding a `py.typed` file. ([#109](https://github.com/sdispater/tomlkit/pull/109))
2135

22-
2336
## [0.7.0] - 2020-07-31
2437

2538
### Added
@@ -34,28 +47,24 @@
3447

3548
- Fixed compliance with the 1.0.0rc1 TOML specification ([#102](https://github.com/sdispater/tomlkit/pull/102)).
3649

37-
3850
## [0.6.0] - 2020-04-15
3951

4052
### Added
4153

4254
- Added support for heterogeneous arrays ([#92](https://github.com/sdispater/tomlkit/pull/92)).
4355

44-
4556
## [0.5.11] - 2020-02-29
4657

4758
### Fixed
4859

4960
- Fix containers and our of order tables dictionary behavior ([#82](https://github.com/sdispater/tomlkit/pull/82)))
5061

51-
5262
## [0.5.10] - 2020-02-28
5363

5464
### Fixed
5565

5666
- Fixed out of order tables not behaving properly ([#79](https://github.com/sdispater/tomlkit/pull/79))
5767

58-
5968
## [0.5.9] - 2020-02-28
6069

6170
### Fixed
@@ -64,36 +73,31 @@
6473
- Fixed parsing errors when single quotes are present in a table name ([#71](https://github.com/sdispater/tomlkit/pull/71)).
6574
- Fixed parsing errors when parsing some table names ([#76](https://github.com/sdispater/tomlkit/pull/76)).
6675

67-
6876
## [0.5.8] - 2019-10-11
6977

7078
### Added
7179

7280
- Added support for producing multiline arrays
7381

74-
7582
## [0.5.7] - 2019-10-04
7683

7784
### Fixed
7885

7986
- Fixed handling of inline tables.
8087

81-
8288
## [0.5.6] - 2019-10-04
8389

8490
### Fixed
8591

8692
- Fixed boolean comparison.
8793
- Fixed appending inline tables to tables.
8894

89-
9095
## [0.5.5] - 2019-07-01
9196

9297
### Fixed
9398

9499
- Fixed display of inline tables after element deletion.
95100

96-
97101
## [0.5.4] - 2019-06-30
98102

99103
### Fixed
@@ -104,15 +108,13 @@
104108
- Fixed behavior of `setdefault()` on containers (Thanks to [@AndyKluger](https://github.com/AndyKluger)).
105109
- Fixed tables string representation.
106110

107-
108111
## [0.5.3] - 2018-11-19
109112

110113
### Fixed
111114

112115
- Fixed copy of TOML documents.
113116
- Fixed behavior on PyPy3.
114117

115-
116118
## [0.5.2] - 2018-11-09
117119

118120
### Fixed
@@ -121,14 +123,12 @@
121123
- Fixed comments being displayed in inline tables.
122124
- Fixed string with non-scalar unicode code points not raising an error.
123125

124-
125126
## [0.5.1] - 2018-11-08
126127

127128
### Fixed
128129

129130
- Fixed deletion and replacement of sub tables declared after other tables.
130131

131-
132132
## [0.5.0] - 2018-11-06
133133

134134
### Changed
@@ -141,14 +141,12 @@
141141
- Fixed comma handling when parsing inline tables. (Thanks to [@njalerikson](https://github.com/njalerikson))
142142
- Fixed a `KeyAlreadyPresent` error when declaring a sub table after other tables.
143143

144-
145144
## [0.4.6] - 2018-10-16
146145

147146
### Fixed
148147

149148
- Fixed string parsing behavior.
150149

151-
152150
## [0.4.5] - 2018-10-12
153151

154152
### Fixed
@@ -157,14 +155,12 @@
157155
- Fixed key comparison.
158156
- Fixed an error when using pickle on TOML documents.
159157

160-
161158
## [0.4.4] - 2018-09-01
162159

163160
### Fixed
164161

165162
- Fixed performances issues while parsing on Python 2.7.
166163

167-
168164
## [0.4.3] - 2018-08-28
169165

170166
### Fixed
@@ -173,14 +169,12 @@
173169
- Fixed missing newline after table header.
174170
- Fixed dict-like behavior for tables and documents.
175171

176-
177172
## [0.4.2] - 2018-08-06
178173

179174
### Fixed
180175

181176
- Fixed insertion of an element after deletion.
182177

183-
184178
## [0.4.1] - 2018-08-06
185179

186180
### Fixed
@@ -189,7 +183,6 @@
189183
- Fixed parsing of dotted keys inside tables.
190184
- Fixed parsing of array of tables with same prefix.
191185

192-
193186
## [0.4.0] - 2018-07-23
194187

195188
### Added
@@ -205,7 +198,6 @@
205198

206199
- Fixed potential new lines inside an inline table.
207200

208-
209201
## [0.3.0] - 2018-07-20
210202

211203
### Changed
@@ -224,8 +216,7 @@
224216
- Fixed handling of super tables with different sections.
225217
- Fixed raw strings escaping.
226218

227-
228-
[Unreleased]: https://github.com/sdispater/tomlkit/compare/0.7.2...master
219+
[unreleased]: https://github.com/sdispater/tomlkit/compare/0.7.2...master
229220
[0.7.2]: https://github.com/sdispater/tomlkit/releases/tag/0.7.2
230221
[0.7.1]: https://github.com/sdispater/tomlkit/releases/tag/0.7.1
231222
[0.7.0]: https://github.com/sdispater/tomlkit/releases/tag/0.7.0

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
[pypi_version]: https://img.shields.io/pypi/v/tomlkit.svg?logo=python&logoColor=white
33
[python_versions]: https://img.shields.io/pypi/pyversions/tomlkit.svg?logo=python&logoColor=white
44
[github_license]: https://img.shields.io/github/license/sdispater/tomlkit.svg?logo=github&logoColor=white
5-
[travisci]: https://img.shields.io/travis/com/sdispater/tomlkit/master.svg?logo=travis&logoColor=white&label=Travis%20CI
6-
[appveyor]: https://img.shields.io/appveyor/ci/sdispater/tomlkit/master.svg?logo=appveyor&logoColor=white&label=AppVeyor
5+
[github_action]: https://github.com/sdispater/tomlkit/actions/workflows/tests.yml/badge.svg
6+
77
<!--Codecov logo not offered by shields.io or simpleicons.org, this is Codecov's SVG image modified to be white-->
8+
89
[codecov]: https://img.shields.io/codecov/c/github/sdispater/tomlkit/master.svg?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNDgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSI0MDIiIHdpZHRoPSI1ODIiIHk9Ii0xIiB4PSItMSIvPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGlkPSJzdmdfMSIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsPSIjZmZmZmZmIiBkPSJtMjUuMDE0LDBjLTEzLjc4NCwwLjAxIC0yNS4wMDQsMTEuMTQ5IC0yNS4wMTQsMjQuODMybDAsMC4wNjJsNC4yNTQsMi40ODJsMC4wNTgsLTAuMDM5YTEyLjIzOCwxMi4yMzggMCAwIDEgOS4wNzgsLTEuOTI4YTExLjg0NCwxMS44NDQgMCAwIDEgNS45OCwyL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DAuMjE3Yy0wLjE4NCwwLjMxOCAtMC4zNDgsMC42MjIgLTAuNDg3LDAuOWwtMC4wMzMsMC4wNjFjLTAuMzU0LDAuNzExIC0wLjY2MSwxLjQ1NSAtMC45MTcsMi4yMTRsLTAuMDM2LDAuMTExYTE3LjEzLDE3LjEzIDAgMCAwIC0wLjg1NSw1LjY0NGwwLjAwMywwLjIzNGEyMy41NjUsMjMuNTY1IDAgMCAwIDAuMDQzLDAuODIyYzAuMDEsMC4xMyAwLjAyMywwLjI1OSAwLjAzNiwwLjM4OGMwLjAxNSwwLjE1OCAwLjAzNCwwLjMxNiAwLjA1MywwLjQ3MWwwLjAxMSwwLjA4OGwwLjAyOCwwLjIxNGMwLjAzNywwLjI2NCAwLjA4LDAuNTI1IDAuMTMsMC43ODdjMC41MDMsMi42MzcgMS43Niw1LjI3NCAzLjYzNSw3LjYyNWwwLjA4NSwwLjEwNmwwLjA4NywtMC4xMDRjMC43NDgsLTAuODg0IDIuNjAzLC0zLjY4NyAyLjc2LC01LjM2OWwwLjAwMywtMC4wMzFsLTAuMDE1LC0wLjAyOGExMS43MzYsMTEuNzM2IDAgMCAxIC0xLjMzMywtNS40MDdjMCwtNi4yODQgNC45NCwtMTEuNTAyIDExLjI0MywtMTEuODhsMC40MTQsLTAuMDE1YzIuNTYxLC0wLjA1OCA1LjA2NCwwLjY3MyA3LjIzLDIuMTM2bDAuMDU4LDAuMDM5bDQuMTk3LC0yLjQ0bDAuMDU1LC0wLjAzM2wwLC0wLjA2MmMwLjAwNiwtNi42MzIgLTIuNTkyLC0xMi44NjUgLTcuMzE0LC0xNy41NTFjLTQuNzE2LC00LjY3OSAtMTAuOTkxLC03LjI1NSAtMTcuNjcyLC03LjI1NSIvPgogPC9nPgo8L3N2Zz4=&label=Codecov
910

1011
[![GitHub Release][github_release]](https://github.com/sdispater/tomlkit/releases/)
1112
[![PyPI Version][pypi_version]](https://pypi.python.org/pypi/tomlkit/)
1213
[![Python Versions][python_versions]](https://pypi.python.org/pypi/tomlkit/)
1314
[![License][github_license]](https://github.com/sdispater/tomlkit/blob/master/LICENSE)
1415
<br>
15-
[![Travis CI][travisci]](https://travis-ci.com/sdispater/tomlkit)
16-
[![AppVeyor][appveyor]](https://ci.appveyor.com/project/sdispater/tomlkit)
1716
[![Codecov][codecov]](https://codecov.io/gh/sdispater/tomlkit)
17+
[![Tests][github_action]](https://github.com/sdispater/tomlkit/actions/workflows/tests.yml)
1818

1919
# TOML Kit - Style-preserving TOML library for Python
2020

@@ -152,7 +152,6 @@ It can be created with the following code:
152152
>>> doc["database"] = database
153153
```
154154

155-
156155
## Installation
157156

158157
If you are using [Poetry](https://poetry.eustace.io),

0 commit comments

Comments
 (0)