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

feat(python/adbc_driver_manager): handle KeyboardInterrupt #1509

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Feb 2, 2024

Alternative to #1486.

Fixes #1484.

@github-actions github-actions bot added this to the ADBC Libraries 0.10.0 milestone Feb 2, 2024
@lidavidm
Copy link
Member Author

lidavidm commented Feb 2, 2024

TODOS

  • macOS support
  • Windows support
  • Direct tests of the infrastructure
  • Annotate other methods that block

@lidavidm
Copy link
Member Author

lidavidm commented Feb 2, 2024

CC @zeroshade @mariusvniekerk how awful is this? 😅

python/adbc_driver_manager/adbc_driver_manager/_lib.pyx Outdated Show resolved Hide resolved
if threading.current_thread() is not threading.main_thread():
return func(*args, **kwargs)

_init_blocking_call()
Copy link
Member Author

Choose a reason for hiding this comment

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

Does the rest of the body want to be in a mutex? Or are we going to trust the current_thread check?

python/adbc_driver_manager/adbc_driver_manager/_lib.pyx Outdated Show resolved Hide resolved
@lidavidm lidavidm force-pushed the gh1484-bg branch 13 times, most recently from 7856659 to cead49d Compare February 5, 2024 17:15
@lidavidm lidavidm marked this pull request as ready for review February 5, 2024 19:27
@lidavidm
Copy link
Member Author

lidavidm commented Feb 5, 2024

I still need to fix this on Windows but I'll have to set up a development environment again

@lidavidm lidavidm force-pushed the gh1484-bg branch 2 times, most recently from 05b5fed to 9245195 Compare February 6, 2024 17:43
@lidavidm
Copy link
Member Author

lidavidm commented Feb 6, 2024

Hmm, I'm unable to reproduce the error in the Conda builds.

@lidavidm
Copy link
Member Author

lidavidm commented Feb 6, 2024

If this doesn't work then I'm simply going to disable the feature altogether on Windows.

@lidavidm lidavidm merged commit c7f5306 into apache:main Feb 6, 2024
49 checks passed
@lidavidm lidavidm deleted the gh1484-bg branch February 6, 2024 19:40
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.

python: make sure SIGINT properly interrupts everything
1 participant