-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix TOML parsing in Python ecosystem (fixes #10523) Use `tomli` instead of outdated `toml` package * Adds test cases --------- Co-authored-by: sachin-sandhu <[email protected]>
- Loading branch information
1 parent
127a958
commit 960ff4b
Showing
6 changed files
with
116 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "dependabot-pyproject-toml-error" | ||
description = '''foo''' | ||
version = "0.0.1" | ||
requires-python = ">=3.12" | ||
license = { text = "GNU General Public License v3 or later (GPLv3+)" } | ||
classifiers = [ | ||
'''Development Status :: 4 - Beta''', | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
dependencies = [ | ||
'''pydantic==2.7.0''', | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
'''if __name__ == ['"]__main__['"]:''', | ||
] |
19 changes: 19 additions & 0 deletions
19
python/spec/fixtures/pyproject_files/pyproject_1_0_0_nodeps.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "dependabot-pyproject-toml-error" | ||
description = '''foo''' | ||
version = "0.0.1" | ||
requires-python = ">=3.12" | ||
license = { text = "GNU General Public License v3 or later (GPLv3+)" } | ||
classifiers = [ | ||
'''Development Status :: 4 - Beta''', | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
'''if __name__ == ['"]__main__['"]:''', | ||
] |
29 changes: 29 additions & 0 deletions
29
python/spec/fixtures/pyproject_files/pyproject_1_0_0_optional_deps.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[build-system] | ||
requires = ["setuptools", "setuptools-scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "dependabot-pyproject-toml-error" | ||
description = '''foo''' | ||
version = "0.0.1" | ||
requires-python = ">=3.12" | ||
license = { text = "GNU General Public License v3 or later (GPLv3+)" } | ||
classifiers = [ | ||
'''Development Status :: 4 - Beta''', | ||
"Programming Language :: Python :: 3 :: Only", | ||
] | ||
dependencies = [ | ||
'''pydantic==2.7.0''', | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
'''if __name__ == ['"]__main__['"]:''', | ||
] | ||
[project.optional-dependencies] | ||
socks = [ 'PySocks >= 1.5.6, != 1.5.7, < 2' ] | ||
tests = [ | ||
'ddt >= 1.2.2, < 2', | ||
'pytest < 6', | ||
'mock >= 1.0.1, < 4; python_version < "3.4"', | ||
] |