Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py36+: use new NamedTuple syntax #7847

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog/7808.breaking.rst
@@ -1 +1 @@
pytest now supports python3.6+ only.
pytest now supports python3.6.1+ only.
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -48,7 +48,7 @@ install_requires =
atomicwrites>=1.0;sys_platform=="win32"
colorama;sys_platform=="win32"
importlib-metadata>=0.12;python_version<"3.8"
python_requires = >=3.6
python_requires = >=3.6.1
package_dir =
=src
setup_requires =
Expand Down
15 changes: 5 additions & 10 deletions src/_pytest/mark/structures.py
Expand Up @@ -74,16 +74,11 @@ def get_empty_parameterset_mark(
return mark


class ParameterSet(
NamedTuple(
"ParameterSet",
[
("values", Sequence[Union[object, NotSetType]]),
("marks", Collection[Union["MarkDecorator", "Mark"]]),
("id", Optional[str]),
],
)
):
class ParameterSet(NamedTuple):
values: Sequence[Union[object, NotSetType]]
marks: Collection[Union["MarkDecorator", "Mark"]]
id: Optional[str]

@classmethod
def param(
cls,
Expand Down