Skip to content

fix: passing a non-Collection iterable to pytest.parametrize is deprecated#4144

Merged
ianna merged 1 commit into
scikit-hep:mainfrom
maxymnaumchyk:maxymnaumchyk/fix-pytest
Jun 18, 2026
Merged

fix: passing a non-Collection iterable to pytest.parametrize is deprecated#4144
ianna merged 1 commit into
scikit-hep:mainfrom
maxymnaumchyk:maxymnaumchyk/fix-pytest

Conversation

@maxymnaumchyk

@maxymnaumchyk maxymnaumchyk commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

fixes the error for the new pytest version: pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated

this is how the variable cuda_layouts is changed:

     BEFORE (type): <class 'awkward.contents.listoffsetarray.ListOffsetArray'>
     BEFORE (value):
     <ListOffsetArray len='2'>
         <offsets><Index dtype='int64' len='3'>[0 2 4]</Index></offsets>
         <content><ListOffsetArray len='4'>
             <offsets><Index dtype='int64' len='5'>[ 0  3  6  9 12]</Index></offsets>
             <content><NumpyArray dtype='int64' len='12'>[0 1 2 3 4 5 0 1 2 3 4 5]</NumpyArray></content>
         </ListOffsetArray></content>
     </ListOffsetArray>

     AFTER (type): <class 'list'>
     AFTER (value):
     [<ListArray len='2'>
         <starts><Index dtype='int64' len='2'>[0 3]</Index></starts>
         <stops><Index dtype='int64' len='2'>[3 6]</Index></stops>
         <content><NumpyArray dtype='int64' len='6'>[0 1 2 3 4 5]</NumpyArray></content>
     </ListArray>, <ListOffsetArray len='2'>
         <offsets><Index dtype='int64' len='3'>[0 3 6]</Index></offsets>
         <content><NumpyArray dtype='int64' len='6'>[0 1 2 3 4 5]</NumpyArray></content>
     </ListOffsetArray>]

@github-actions github-actions Bot added the type/fix PR title type: fix (set automatically) label Jun 18, 2026
@maxymnaumchyk maxymnaumchyk changed the title fix: passing a non-Collection iterable to parametrize is deprecated fix: passing a non-Collection iterable to pytest.parametrize is deprecated Jun 18, 2026
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.42%. Comparing base (b025b0b) to head (8fe0d5d).

Additional details and impacted files

see 5 files with indirect coverage changes

@maxymnaumchyk

Copy link
Copy Markdown
Collaborator Author

@ianna should I run GPU tests for this manually? This is a fix for an error you can see in this PR: https://github.com/scikit-hep/awkward/actions/runs/27625607798/job/81686350927?pr=4143

@maxymnaumchyk
maxymnaumchyk marked this pull request as ready for review June 18, 2026 13:17
@maxymnaumchyk
maxymnaumchyk requested a review from ianna June 18, 2026 13:17

@ianna ianna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxymnaumchyk - Thanks for fixing it! Since it's a pytest the fix is fine IMHO.

@ianna
ianna merged commit ef63e16 into scikit-hep:main Jun 18, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/fix PR title type: fix (set automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants