Skip to content

refactor: scrub Python2 compatibility fossils#206

Merged
tseaver merged 2 commits intomasterfrom
tseaver-scrub_compat_fossils
Jun 3, 2024
Merged

refactor: scrub Python2 compatibility fossils#206
tseaver merged 2 commits intomasterfrom
tseaver-scrub_compat_fossils

Conversation

@tseaver
Copy link
Copy Markdown
Member

@tseaver tseaver commented Jun 2, 2024

  • Disentangle checks for needed long_long/ulong_long helpers. Silences compiler warning for unused functions.
  • Replace Py2 compatibility macros w/ Python APIs.
  • Remove the local _compat.h header where they were defined, replacing includes of it everwhere with #include "Python.h".
    Note that the unrelated include/persistent/persistent/'compat.h header in the directory is still in place. No C header or module imports it directly, and none uses any macros defined in it indirectly.

This work is in preparation for adding PEP 489 multi-phase module initialization, including compatibility with the changes to persistent in zopefoundation/persistent#204. bit does not yet expect (or require) that PR to be merged.

tseaver added 2 commits June 2, 2024 15:22
Remove the local '_compat.h' header where they were defined, replacing
imports of it everwhere with 'Python.h'.

Note that the unrelated '_compat.h' header in the
'include/persistent/persistent/' directory is still in place.  No C
header or module imports it directly, and none uses any macros defined
in it indirectly.
@tseaver tseaver requested review from davisagli and jimfulton June 2, 2024 20:21
@tseaver
Copy link
Copy Markdown
Member Author

tseaver commented Jun 3, 2024

I don't grok the Coveralls failures, but they appear to be complaining that master (not just this PRs branch) has dropped statement and / or branch coverage since the merge of PR #198.

@tseaver tseaver merged commit b792a20 into master Jun 3, 2024
@tseaver tseaver deleted the tseaver-scrub_compat_fossils branch June 3, 2024 03:55
@davisagli
Copy link
Copy Markdown
Member

@tseaver It's not the first time I've seen confusing reports from coveralls

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.

2 participants