Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

DeprecationWarning: 'AbstractChildWatcher' is deprecated as of Python 3.12 and will be removed in Python 3.14. #76

Closed
rmartin16 opened this issue Apr 7, 2023 · 3 comments · Fixed by #137
Labels
bug A crash or error in behavior.

Comments

@rmartin16
Copy link
Member

Describe the bug

DeprecationWarning for AbstractChildWatcher from Python 3.12.0a7.

/home/russell/github/beeware/briefcase/venv-3.12.0a7-briefcase/lib/python3.12/site-packages/gbulb/glib_events.py:54: DeprecationWarning: 'AbstractChildWatcher' is deprecated as of Python 3.12 and will be removed in Python 3.14.
  class GLibChildWatcher(AbstractChildWatcher):

Steps to reproduce

briefcase dev on Python 3.12.0a7 or later; may require a debug compilation of Python.

Expected behavior

DeprecationWarning is not logged for AbstractChildWatcher.

Screenshots

No response

Environment

  • Operating System: pop os 22.04
  • Python version: 3.12.0a7
  • Software versions:
    • Briefcase: 0.3.14.dev78+g3f8b8979

Logs

No response

Additional context

No response

@rmartin16 rmartin16 added the bug A crash or error in behavior. label Apr 7, 2023
@freakboy3742
Copy link
Member

From what I can tell, the GLibChildWatcher can be directly replaced with asyncio.PidfdChildWatcher - but we need to wait until Python 3.9 is our minimum supported version before we can make that change.

@eichin
Copy link

eichin commented Apr 18, 2024

FYI just ran into this on freshly installed just-pre-24.04 system, running through the beeware tutorial, specifically during https://docs.beeware.org/en/latest/tutorial/tutorial-1.html#run-the-app-in-developer-mode

Successfully installed gbulb-0.6.4 iniconfig-2.0.0 pluggy-1.4.0 pycairo-1.26.0 pygobject-3.48.2 pytest-8.1.1 toga-core-0.4.2 toga-gtk-0.4.2 travertino-0.3.0
[helloworld] Starting in dev mode...
===========================================================================
/home/eichin/tmp/beeware-tutorial/beeware-venv/lib/python3.12/site-packages/gbulb/glib_events.py:54: DeprecationWarning: 'AbstractChildWatcher' is deprecated as of Python 3.12 and will be removed in Python 3.14.
  class GLibChildWatcher(AbstractChildWatcher):

This is with a release version of python, ubuntu package python3 3.12.3-0ubuntu1, the venv python identifies as

Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux

(but that's the exact same thing the system one does, so no development version needed.)

I would generally say "eh, deprecated for two major releases, plenty of time" but on the other hand, this is showing up right when the beeware tutorial is starting to get interesting, so it might be worth some extra consideration. (That might not be possible, either, per the #76 (comment) comment above.)

@freakboy3742
Copy link
Member

Completely agreed that with the release of Ubuntu 24.04, this is starting to get a little urgent, as is #116 and #117.

As for the replacement strategy: I'm not opposed to an if sys.version_info <= 3.9 block if that gets us around the problem. I haven't looked recently to see how feasible that sort of replacement would be.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A crash or error in behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants