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

generate_page_range: warn, not raise, if start==end, fix #1106 #1107

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

kba
Copy link
Member

@kba kba commented Sep 28, 2023

No description provided.

@kba kba linked an issue Sep 28, 2023 that may be closed by this pull request
@kba kba requested a review from MehmedGIT September 28, 2023 10:38
Copy link
Contributor

@MehmedGIT MehmedGIT left a comment

Choose a reason for hiding this comment

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

Seems to fix the issue on my side. I am just not sure whether having a warning for each processing request with a single page will not be too much but that is a small detail. So good to be merged!

@kba
Copy link
Member Author

kba commented Sep 28, 2023

I am just not sure whether having a warning for each processing request with a single page will not be too much but that is a small detail.

We can either redirect warnings to logging https://docs.python.org/3/library/logging.html#logging.captureWarnings and handle/hide them that way.

There's also methods to filter warnings directly, e.g. https://docs.python.org/3/library/warnings.html#the-warnings-filter

@kba kba merged commit 6d10125 into master Oct 9, 2023
@kba kba deleted the page-range-warn-single branch October 9, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow single page ranges
2 participants