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

python: make python@3.11 the new default for python3 #114154

Closed
wants to merge 3 commits into from
Closed

python: make python@3.11 the new default for python3 #114154

wants to merge 3 commits into from

Conversation

ryenus
Copy link
Contributor

@ryenus ryenus commented Oct 28, 2022

Switch python3 aliases from python@3.10 to python@3.11, following up #113811

  • 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>?

Query for related formulae pr(s):

@BrewTestBot BrewTestBot added the automerge-skip `brew pr-automerge` will skip this pull request label Oct 28, 2022
@request-info
Copy link

request-info bot commented Oct 28, 2022

Please provide a better issue/pull request title and/or description!

@request-info request-info bot added the needs response Needs a response from the issue/PR author label Oct 28, 2022
@carlocab
Copy link
Member

carlocab commented Oct 28, 2022

Also needs changes in python@3.10 and python@3.11 so that python@3.11 will install python3 in its bin directory and python@3.10 won't. Without this, I can brew install python3 but then have python3 call Apple's Python3.

See #107517.

@ryenus
Copy link
Contributor Author

ryenus commented Oct 28, 2022

Also needs changes in python@3.10 and python@3.11 so that python@3.11 will install python3 in its bin directory and python@3.10 won't. Without this, I can brew install python3 but then have python3 call Apple's Python3.

See #107517.

@carlocab, thank you for clarifying, I didn't thought about that but it's certainly mandatory, I've applied the sensible changes, hopefully nothing missed.

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Nice work! Could you split your commit so that you have at least two commits:

  • one that modifies python@3.11.rb
  • one that modifies python@3.10.rb
    Adding a third commit only for the symlinks works fine too.

Let me know if you need help with this.

@carlocab carlocab added the 13-arm64 Ventura arm64 is specifically affected label Oct 28, 2022
@cho-m cho-m added the long build Set a long timeout for formula testing label Oct 28, 2022
@ryenus ryenus closed this Oct 29, 2022
@ryenus ryenus reopened this Oct 29, 2022
@ryenus
Copy link
Contributor Author

ryenus commented Oct 29, 2022

https://github.com/Homebrew/homebrew-core/actions/runs/3349533474/jobs/5549658710

Error: PR requires the CI-long-timeout label but it is not set!
Error: If the longer timeout is not required, remove the "long build" label.
Error: Otherwise, add the "CI-long-timeout" label.
Error: No more than 2 PRs at a time may use "CI-long-timeout".

@cho-m, @carlocab, or anyone possible to take a look?

@smrde
Copy link

smrde commented Oct 29, 2022

@ryenus arm64_ventura seems to be missing at line 11 in branch 2cc17eb

2cc17eb

@SMillerDev
Copy link
Member

@ryenus the "long build" label indicates to maintainers that this build will need a "CI-long-timeout" label and they will add one when it's available.

@ryenus
Copy link
Contributor Author

ryenus commented Nov 3, 2022

Got it, thank you for the clarification @SMillerDev.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added stale No recent activity and removed stale No recent activity labels Dec 6, 2022
@ychin
Copy link
Contributor

ychin commented Dec 12, 2022

Hi @ryenus , is there any progress on this? I was paying attention to this to make sure I could release MacVim with the correct pinned Python 3 version and was wondering if this was going to be merged considering the PR was filed more than a month ago. Thanks!

@p-linnane p-linnane added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Dec 14, 2022
@p-linnane
Copy link
Member

Kicking off a run

@p-linnane p-linnane removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Dec 14, 2022
@cho-m cho-m added the test failure CI fails while running the test-do block label Dec 14, 2022
@p-linnane p-linnane added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jan 26, 2023
@chenrui333
Copy link
Member

Thanks @p-linnane! :)

@chenrui333 chenrui333 removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jan 26, 2023
@equal-l2
Copy link
Contributor

equal-l2 commented Jan 26, 2023

Failures on all platform

  ==> Testing mftrace
  ==> /home/linuxbrew/.linuxbrew/Cellar/mftrace/1.2.20_2/bin/mftrace --version
  Failed to execute: /home/linuxbrew/.linuxbrew/Cellar/mftrace/1.2.20_2/bin/mftrace
  ==> Testing pipdeptree (again)
  ==> /home/linuxbrew/.linuxbrew/Cellar/pipdeptree/2.3.3/bin/pipdeptree --all
  Error: pipdeptree: failed
  An exception occurred within a child process:
    Minitest::Assertion: --- expected
  +++ actual
  @@ -1,5 +1,61 @@
  -"pip==22.3.1
  +"btrfsutil==6.1.3
  +docutils==0.19
  +GDAL==3.6.2
  +gpg==1.18.0
  +libxml2-python==2.10.3
  +notmuch==0.37
  +numpy==1.24.1
  +Pillow==9.4.0
  +pip==22.3.1
   pipdeptree==2.3.3
  +prelude==5.2.0
  +protobuf==4.21.12
  +PyAFF==0.1
  +pybind11==2.10.3
  +pycairo==1.23.0
  +pycryptosat==5.11.4
  +Pygments==2.14.0
  +PyGObject==3.42.2
  +PyMuPDF==1.20.2
  +PyQt3D==5.15.5
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQt5==5.15.7
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQt5-sip==12.11.0
  +PyQtChart==5.15.6
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQtDataVisualization==5.15.5
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQtNetworkAuth==5.15.5
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQtPurchasing==5.15.5
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyQtWebEngine==5.15.6
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +PyYAML==6.0
  +QScintilla==2.13.3
  +  - PyQt5 [required: >=5.15.4, installed: 5.15.7]
  +    - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +  - PyQt5-sip [required: >=12.11,<13, installed: 12.11.0]
  +SciPy==1.10.0
  +  - numpy [required: >=1.19.5,<1.27.0, installed: 1.24.1]
   setuptools==65.6.3
  +six==1.16.0
  +smbus==1.1
  +tabulate==0.0.0
  +TBB==0.2
  +typing-extensions==4.4.0
   wheel==0.38.4
   "
  ==> Testing suricata
  ==> /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/bin/suricata --build-info
  ==> /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/bin/suricata-update list-sources
  /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/bin/suricata-update: /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/libexec/bin/suricata-update: /home/linuxbrew/.linuxbrew/opt/python@3.11/libexec/bin/python3: bad interpreter: No such file or directory
  /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/bin/suricata-update: line 2: /home/linuxbrew/.linuxbrew/Cellar/suricata/6.0.9/libexec/bin/suricata-update: Success

Failures on some platform

  ==> Testing bpytop (again)
  Error: bpytop: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected /ERROR:/ to not match "25/01/23 (19:40:17) | INFO: New instance of bpytop version 1.0.68 started with pid 30317\n25/01/23 (19:40:17) | INFO: Loglevel set to DEBUG\n25/01/23 (19:40:17) | DEBUG: Using psutil version 5.9.3\n25/01/23 (19:40:17) | DEBUG: CMD: /opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\n25/01/23 (19:40:17) | ERROR: Exception while getting cpu frequency!\n25/01/23 (19:40:17) | ERROR: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\nTraceback (most recent call last):\n  File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3080, in _collect\n    if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), \"current\"):\n                                        ^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.11/site-packages/psutil/__init__.py\", line 1864, in cpu_freq\n    ret = _psplatform.cpu_freq()\n          ^^^^^^^^^^^^^^^^^^^^^^\n  File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.11/site-packages/psutil/_psosx.py\", line 179, in cpu_freq\n    curr, min_, max_ = cext.cpu_freq()\n                       ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\n25/01/23 (19:40:17) | DEBUG: Collect and draw completed in 0.209290 seconds\n".
  • jupyterlab (linux)
  ==> Testing jupyterlab
  ==> /home/linuxbrew/.linuxbrew/Cellar/jupyterlab/3.4.8_1/bin/jupyter-console --help
  The Jupyter terminal-based Console.
  
  This launches a Console application inside a terminal.
  
  The Console supports various extra features beyond the traditional single-
  process Terminal IPython shell, such as connecting to an existing ipython
  session, via:
  
      jupyter console --existing
  
  where the previous session could have been created by another ipython console,
  an ipython qtconsole, or by opening an ipython notebook.
  
  Options
  =======
  The options below are convenience aliases to configurable class-options,
  as listed in the "Equivalent to" description-line of the aliases.
  To see all configurable class-options for some <cmd>, use:
      <cmd> --help-all
  
  --debug
      set log level to logging.DEBUG (maximize logging output)
      Equivalent to: [--Application.log_level=10]
  --show-config
      Show the application's configuration (human-readable format)
      Equivalent to: [--Application.show_config=True]
  --show-config-json
      Show the application's configuration (json format)
      Equivalent to: [--Application.show_config_json=True]
  --generate-config
      generate default config file
      Equivalent to: [--JupyterApp.generate_config=True]
  -y
      Answer yes to any questions instead of prompting.
      Equivalent to: [--JupyterApp.answer_yes=True]
  --existing
      Connect to an existing kernel. If no argument specified, guess most recent
      Equivalent to: [--JupyterConsoleApp.existing=kernel*.json]
  --confirm-exit
      Set to display confirmation dialog on exit. You can always use 'exit' or
             'quit', to force a direct exit without any confirmation. This can also
             be set in the config file by setting
             `c.JupyterConsoleApp.confirm_exit`.
      Equivalent to: [--JupyterConsoleApp.confirm_exit=True]
  --no-confirm-exit
      Don't prompt the user when exiting. This will terminate the kernel
             if it is owned by the frontend, and leave it alive if it is external.
             This can also be set in the config file by setting
             `c.JupyterConsoleApp.confirm_exit`.
      Equivalent to: [--JupyterConsoleApp.existing]
  -f=<Unicode>
      JSON file in which to store connection info [default: kernel-<pid>.json]
          This file will contain the IP, ports, and authentication key needed to connect
          clients to this kernel. By default, this file will be created in the security dir
          of the current profile, but can be specified by absolute path.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.connection_file]
  --kernel=<Unicode>
      The name of the default kernel to start.
      Default: 'python'
      Equivalent to: [--JupyterConsoleApp.kernel_name]
  --ssh=<Unicode>
      The SSH server to use to connect to the kernel.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.sshserver]
  --sshkey=<Unicode>
      Path to the ssh key to use for logging in to the ssh server.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.sshkey]
  
  Examples
  --------
  
      jupyter console # start the ZMQ-based console
      jupyter console --existing # connect to an existing ipython session
  
  To see all available configurables, use `--help-all`.
  
  ==> /home/linuxbrew/.linuxbrew/Cellar/jupyterlab/3.4.8_1/bin/jupyter kernelspec list
  0.00s - Debugger warning: It seems that frozen modules are being used, which may
  0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
  0.00s - to python to disable frozen modules.
  0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
  ==> expect -f console.exp
  ==> Testing jupyterlab (again)
  ==> /home/linuxbrew/.linuxbrew/Cellar/jupyterlab/3.4.8_1/bin/jupyter-console --help
  The Jupyter terminal-based Console.
  
  This launches a Console application inside a terminal.
  
  The Console supports various extra features beyond the traditional single-
  process Terminal IPython shell, such as connecting to an existing ipython
  session, via:
  
      jupyter console --existing
  
  where the previous session could have been created by another ipython console,
  an ipython qtconsole, or by opening an ipython notebook.
  
  Options
  =======
  The options below are convenience aliases to configurable class-options,
  as listed in the "Equivalent to" description-line of the aliases.
  To see all configurable class-options for some <cmd>, use:
      <cmd> --help-all
  
  --debug
      set log level to logging.DEBUG (maximize logging output)
      Equivalent to: [--Application.log_level=10]
  --show-config
      Show the application's configuration (human-readable format)
      Equivalent to: [--Application.show_config=True]
  --show-config-json
      Show the application's configuration (json format)
      Equivalent to: [--Application.show_config_json=True]
  --generate-config
      generate default config file
      Equivalent to: [--JupyterApp.generate_config=True]
  -y
      Answer yes to any questions instead of prompting.
      Equivalent to: [--JupyterApp.answer_yes=True]
  --existing
      Connect to an existing kernel. If no argument specified, guess most recent
      Equivalent to: [--JupyterConsoleApp.existing=kernel*.json]
  --confirm-exit
      Set to display confirmation dialog on exit. You can always use 'exit' or
             'quit', to force a direct exit without any confirmation. This can also
             be set in the config file by setting
             `c.JupyterConsoleApp.confirm_exit`.
      Equivalent to: [--JupyterConsoleApp.confirm_exit=True]
  --no-confirm-exit
      Don't prompt the user when exiting. This will terminate the kernel
             if it is owned by the frontend, and leave it alive if it is external.
             This can also be set in the config file by setting
             `c.JupyterConsoleApp.confirm_exit`.
      Equivalent to: [--JupyterConsoleApp.confirm_exit=False]
  --simple-prompt
      Force simple minimal prompt using `raw_input`
      Equivalent to: [--ZMQTerminalInteractiveShell.simple_prompt=True]
  --no-simple-prompt
      Use a rich interactive prompt with prompt_toolkit
      Equivalent to: [--ZMQTerminalInteractiveShell.simple_prompt=False]
  --log-level=<Enum>
      Set the log level by value or name.
      Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
      Default: 30
      Equivalent to: [--Application.log_level]
  --config=<Unicode>
      Full path of a config file.
      Default: ''
      Equivalent to: [--JupyterApp.config_file]
  --ip=<Unicode>
      Set the kernel's IP address [default localhost].
              If the IP address is something other than localhost, then
              Consoles on other machines will be able to connect
              to the Kernel, so be careful!
      Default: ''
      Equivalent to: [--JupyterConsoleApp.ip]
  --transport=<CaselessStrEnum>
      Choices: any of ['tcp', 'ipc'] (case-insensitive)
      Default: 'tcp'
      Equivalent to: [--JupyterConsoleApp.transport]
  --hb=<Int>
      set the heartbeat port [default: random]
      Default: 0
      Equivalent to: [--JupyterConsoleApp.hb_port]
  --shell=<Int>
      set the shell (ROUTER) port [default: random]
      Default: 0
      Equivalent to: [--JupyterConsoleApp.shell_port]
  --iopub=<Int>
      set the iopub (PUB) port [default: random]
      Default: 0
      Equivalent to: [--JupyterConsoleApp.iopub_port]
  --stdin=<Int>
      set the stdin (ROUTER) port [default: random]
      Default: 0
      Equivalent to: [--JupyterConsoleApp.stdin_port]
  --control=<Int>
      set the control (ROUTER) port [default: random]
      Default: 0
      Equivalent to: [--JupyterConsoleApp.control_port]
  --existing=<CUnicode>
      Connect to an already running kernel
      Default: ''
      Equivalent to: [--JupyterConsoleApp.existing]
  -f=<Unicode>
      JSON file in which to store connection info [default: kernel-<pid>.json]
          This file will contain the IP, ports, and authentication key needed to connect
          clients to this kernel. By default, this file will be created in the security dir
          of the current profile, but can be specified by absolute path.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.connection_file]
  --kernel=<Unicode>
      The name of the default kernel to start.
      Default: 'python'
      Equivalent to: [--JupyterConsoleApp.kernel_name]
  --ssh=<Unicode>
      The SSH server to use to connect to the kernel.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.sshserver]
  --sshkey=<Unicode>
      Path to the ssh key to use for logging in to the ssh server.
      Default: ''
      Equivalent to: [--JupyterConsoleApp.sshkey]
  
  Examples
  --------
  
      jupyter console # start the ZMQ-based console
      jupyter console --existing # connect to an existing ipython session
  
  To see all available configurables, use `--help-all`.
  
  ==> /home/linuxbrew/.linuxbrew/Cellar/jupyterlab/3.4.8_1/bin/jupyter kernelspec list
  0.00s - Debugger warning: It seems that frozen modules are being used, which may
  0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
  0.00s - to python to disable frozen modules.
  0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
  ==> expect -f console.exp
  Error: jupyterlab: failed
  An exception occurred within a child process:
       Minitest::Assertion: Expected /Jupyter\ console/ to match "spawn /home/linuxbrew/.linuxbrew/Cellar/jupyterlab/3.4.8_1/bin/jupyter-console\r\n0.00s - Debugger warning: It seems that frozen modules are being used, which may\r\n0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off\r\n0.00s - to python to disable frozen modules.\r\n0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.\r\n0.00s - Debugger warning: It seems that frozen modules are being used, which may\r\n0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off\r\n0.00s - to python to disable frozen modules.\r\n0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.\r\n".
   ==> Testing leela-zero (again)
  ==> /home/linuxbrew/.linuxbrew/Cellar/leela-zero/0.17_3/bin/leelaz --help
  Error: leela-zero: failed
  An exception occurred within a child process:
    BuildError: Failed executing: /home/linuxbrew/.linuxbrew/Cellar/leela-zero/0.17_3/bin/leelaz --help

@helingai
Copy link

At this point, I wonder whether the issue with bpytop is worth the blocking...

@branchvincent
Copy link
Member

I rebased and tweaked the commit messages to follow our commit style. This should be good to merge after one more run, we can handle bpytop separately

@p-linnane p-linnane added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Feb 13, 2023
@p-linnane
Copy link
Member

Kicking off a run.

@chenrui333
Copy link
Member

I rebased and tweaked the commit messages to follow our commit style. This should be good to merge after one more run, we can handle bpytop separately

I checked the bpytop per python@3.11 update PR, it works fine, maybe just a test update opportunity.

@chenrui333 chenrui333 added CI-requeued PR has been re-added to the queue and removed test failure CI fails while running the test-do block CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. labels Feb 13, 2023
Copy link
Member

@branchvincent branchvincent left a comment

Choose a reason for hiding this comment

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

Couple new failures are from a flaky network, merging

@BrewTestBot
Copy link
Member

:shipit: @branchvincent has triggered a merge.

@branchvincent
Copy link
Member

Thanks for all the help here! @ryenus @equal-l2 🍻

@chenrui333 chenrui333 added the python Python use is a significant feature of the PR or issue label Oct 10, 2023
@ryenus ryenus mentioned this pull request Nov 17, 2023
4 tasks
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2023
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-linux-self-hosted Build on Linux self-hosted runner CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-requeued PR has been re-added to the queue long build Set a long timeout for formula testing outdated PR was locked due to age python Python use is a significant feature of the PR or issue python-3.11-migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.