Skip to content

gobject-introspection + dependents: migrate to python@3.10#107645

Closed
carlocab wants to merge 17 commits intoHomebrew:masterfrom
carlocab:gio-py310
Closed

gobject-introspection + dependents: migrate to python@3.10#107645
carlocab wants to merge 17 commits intoHomebrew:masterfrom
carlocab:gio-py310

Conversation

@carlocab
Copy link
Copy Markdown
Member

@carlocab carlocab commented Aug 9, 2022

  • gnuradio: migrate to python@3.10
  • gobject-introspection: migrate to python@3.10
  • gst-python: migrate to python@3.10
  • libpeas: migrate to python@3.10
  • nicotine-plus: migrate to python@3.10
  • pympress: migrate to python@3.10
  • terminator: migrate to python@3.10
  • virt-manager: migrate to python@3.10
  • xdot: migrate to python@3.10
  • zim: migrate to python@3.10
  • mat2: migrate to python@3.10
  • pytouhou: migrate to python@3.10

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@carlocab carlocab added CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. long build Set a long timeout for formula testing python-3.10-migration labels Aug 9, 2022
@BrewTestBot BrewTestBot added the python Python use is a significant feature of the PR or issue label Aug 9, 2022
@carlocab carlocab force-pushed the gio-py310 branch 4 times, most recently from 6c40c73 to ac35aee Compare August 9, 2022 16:10
@carlocab
Copy link
Copy Markdown
Member Author

carlocab commented Aug 9, 2022

gst-python failure:

  ==> /opt/homebrew/opt/python@3.10/bin/python3.10 -c import gi
  gi.require_version('Gst', '1.0')
  from gi.repository import Gst
  print (Gst.Fraction(num=3, denom=5))
  Traceback (most recent call last):
    File "<string>", line 4, in <module>
  TypeError: Fraction() takes no arguments

@carlocab
Copy link
Copy Markdown
Member Author

carlocab commented Aug 9, 2022

virt-manager fails to install with

    ERROR: failed virDomainRestoreParams
    ERROR: failed virDomainSaveParams
    error: command '/opt/homebrew/Cellar/virt-manager/4.0.0_1/libexec/bin/python3.10' failed with exit code 1
    error: subprocess-exited-with-error
    
    × Running setup.py install for libvirt-python did not run successfully.
    │ exit code: 1
    ╰─> See above for output.

@cho-m
Copy link
Copy Markdown
Member

cho-m commented Aug 9, 2022

Not sure about compatibility, but it would be good to update virt-manager resource libvirt-python to at least 8.5.0 for https://gitlab.com/libvirt/libvirt-python/-/merge_requests/85. Would need to check if virt-manager needs to also be updated to current 4.1.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Would be good to see if this works with our docutils.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it a runtime dependency? There is a depends_on "docutils" => :build so definitely odd that both resource and dependency are in formula.

On side note, virt-manager should probably be updated to 4.1.0 to get virt-manager/virt-manager@90e1354

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From quick glance, I didn't see any python code using docutils. Setup runs command rst2man. May be okay to drop resource.

Comment on lines 44 to 46
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure where this dependency came from. I'm guessing it was from requests but it shouldn't have been added on Python 3: chardet>=3.0.2,<5; python_version < "3"'. As of 2.28.0, Python 2 support has been dropped.

Also missing charset-normalizer:

pipgrip requests --tree
requests (2.28.1)
├── certifi>=2017.4.17 (2022.6.15)
├── charset-normalizer<3,>=2 (2.1.0)
├── idna<4,>=2.5 (3.3)
└── urllib3<1.27,>=1.21.1 (1.26.11)

@cho-m cho-m removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Aug 10, 2022
@carlocab carlocab added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Aug 10, 2022
@carlocab
Copy link
Copy Markdown
Member Author

virt-manager test is failing. Not sure how to fix it. May drop it if everything else is passing.

@BrewTestBot BrewTestBot added the automerge-skip `brew pr-automerge` will skip this pull request label Aug 10, 2022
@carlocab
Copy link
Copy Markdown
Member Author

Dropped virt-manager.

Comment on lines +39 to +41
# This shouldn't be needed, but this fails to link with libpython3.10.so.
# TODO: Remove this when `python@3.10` is no longer keg-only.
ENV.append "LDFLAGS", "-Wl,-rpath,#{Formula["python@3.10"].opt_lib}" if OS.linux?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems odd. I wonder if there is a brew bug. I downloaded previous run's bottle and it is interesting that one library (lib/python3.10/site-packages/gi/overrides/_gi_gst.cpython-310-x86_64-linux-gnu.so) has python@3.10 in RPATH but the other (lib/gstreamer-1.0/libgstpython.so) doesn't.

The only difference between two RPATHS is @@HOMEBREW_PREFIX@@/opt/python@3.10/lib.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Would help to be able to find the compiler/linker invocation when these objects are created, but Linux doesn't upload logs properly, unfortunately.

@carlocab carlocab added the ready to merge PR can be merged once CI is green label Aug 11, 2022
@carlocab
Copy link
Copy Markdown
Member Author

@yurikoles, do you mind taking a look at migrating virt-manager to python@3.10 once this is merged? Thanks.

@carlocab
Copy link
Copy Markdown
Member Author

Only Intel Big Sur left running. Should be done in the next hour or so.

@carlocab carlocab removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Aug 11, 2022
@BrewTestBot
Copy link
Copy Markdown
Contributor

:shipit: @carlocab has triggered a merge.

Comment on lines +48 to +49
libexec/Language::Python.site_packages(python3)/"zim/config/basedirs.py",
libexec/"vendor"/Language::Python.site_packages(python3)/"xdg/BaseDirectory.py",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
libexec/Language::Python.site_packages(python3)/"zim/config/basedirs.py",
libexec/"vendor"/Language::Python.site_packages(python3)/"xdg/BaseDirectory.py",
libexec/site_packages/"zim/config/basedirs.py",
libexec/"vendor"/site_packages/"xdg/BaseDirectory.py",

depends_on "python@3.10"

uses_from_macos "flex" => :build
uses_from_macos "libffi", since: :catalina
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We actually need glib to make the same declaration for this to work.

@carlocab carlocab deleted the gio-py310 branch September 17, 2022 15:51
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge-skip `brew pr-automerge` will skip this pull request CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. long build Set a long timeout for formula testing no long build conflict Do not allow merging other pull requests when files conflict with this one outdated PR was locked due to age python Python use is a significant feature of the PR or issue python-3.10-migration ready to merge PR can be merged once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants