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

Change paths passed to listener v3 methods to pathlib.Path instances #4988

Closed
pekkaklarck opened this issue Dec 20, 2023 · 0 comments
Closed

Comments

@pekkaklarck
Copy link
Member

pekkaklarck commented Dec 20, 2023

Listeners have methods like output_file and log_file that are called when result files are ready. At the moment they get the path to the file as a string, but I believe with listener v3 methods we should use pathlib.Path instead. Path instances are more convenient to use and we are now enhancing v3 listeners also otherwise.

This change is backwards incompatible, but in most cases str and Path work the same way, so it's unlikely that the change causes big problems. For example, our acceptance tests passed after I changed the type locally and I needed to add special checks to make sure the received path is actually Path.

Although the change is pretty safe, with listener v2 it's anyway safer to keep using str. We are also otherwise just using base types with them.

@pekkaklarck pekkaklarck added this to the v7.0 milestone Dec 20, 2023
@pekkaklarck pekkaklarck self-assigned this Dec 20, 2023
pekkaklarck added a commit that referenced this issue Jan 2, 2024
Fixes #4992. This regression was caused by #4988.

Also document that these variables are strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant