aeye-lab / pymovements

A python package for processing eye movement data
https://pymovements.readthedocs.io
MIT License
57 stars 11 forks source link

build: add support for python 3.12 #660

Closed dkrako closed 3 months ago

dkrako commented 5 months ago

new year new try

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (56f01d3) to head (fb023bf).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #660 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 55 55 Lines 2527 2530 +3 Branches 643 644 +1 ========================================= + Hits 2527 2530 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dkrako commented 5 months ago

I don't get it, what's wrong with pandas?

also it seems the ignore for the DeprecationWarning didn't work

I give up for now, see you next month

dkrako commented 4 months ago

alright, the pandas issue seems to be resolved, there's one DeprecationWarning left:

DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.

Which is raised by this extractall:

https://github.com/aeye-lab/pymovements/blob/07f8c9793478c260cda3a3f3ad51c5d7110e2014/src/pymovements/utils/archives.py#L152-L153

Heres some supplementary documentation: https://docs.python.org/3/library/tarfile.html https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter

Basically, Python <3.12 had unsecure features for extracting tarfiles activated by default which will be changed in 3.14.

There are two options we have:

  1. check if we run python 3.12 (or check if tarfile.extractall() has a filter keyword argument) and pass filter='data' in case
  2. add an ignore for the deprecation warning and leave everything else as is.

How do we want to proceeed?

SiQube commented 4 months ago

@prassepaul I think you should chime in since @dkrako and I worked on the PR