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

refactor: click styling-> rich #6178

Merged
merged 5 commits into from
Jul 13, 2024
Merged

refactor: click styling-> rich #6178

merged 5 commits into from
Jul 13, 2024

Conversation

oz123
Copy link
Contributor

@oz123 oz123 commented Jun 16, 2024

Replace in shell.py and virtualenv.py.
Also, replace in some exceptions.

This is continuing my previous work in attempt to remove click in favor of rich.

@aidencullo

@oz123 oz123 requested a review from matteius June 16, 2024 20:54
Replace in shell.py and virtualenv.py.
Also, replace in some exceptions.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
The test failed with rich, since it is softwrapping long lines.
The fix matches the location of the venv using regular expressions.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
On these OS rich is insisting on breaking the location to
multiple lines.

To avoid this, we increase the terminal width temporarily,
(as soft_wrap=True seems to have no effect).

Also, a better regex to match the location across multiple lines
is added.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
@oz123 oz123 marked this pull request as ready for review June 17, 2024 08:11
Also, because we use rich.console we don't need the terminal
handling of click.
@oz123 oz123 merged commit e4ce15f into main Jul 13, 2024
19 checks passed
@oz123 oz123 deleted the more-click-echo-cleanup branch July 13, 2024 21:18
achim-k pushed a commit to foxglove/ws-protocol that referenced this pull request Sep 16, 2024
Bumps [pipenv](https://github.com/pypa/pipenv) from 2024.0.1 to
2024.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/pipenv/releases">pipenv's
releases</a>.</em></p>
<blockquote>
<h2>Release v2024.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>PiPenv -&gt; Pipenv by <a
href="https://github.com/gtback"><code>@​gtback</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6184">pypa/pipenv#6184</a></li>
<li>Fix typo missing space between &quot;so&quot; and
&quot;re-building&quot; by <a
href="https://github.com/ptamarit"><code>@​ptamarit</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6183">pypa/pipenv#6183</a></li>
<li>remove all instances of click from project.py by <a
href="https://github.com/aidencullo"><code>@​aidencullo</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6193">pypa/pipenv#6193</a></li>
<li>Fix bump version in CI by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6177">pypa/pipenv#6177</a></li>
<li>Update diagnose URL in issue template by <a
href="https://github.com/michaelmior"><code>@​michaelmior</code></a> in
<a
href="https://redirect.github.com/pypa/pipenv/pull/6188">pypa/pipenv#6188</a></li>
<li>refactor: click styling-&gt; rich by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6178">pypa/pipenv#6178</a></li>
<li>Fix incorrect command reminder after installs by <a
href="https://github.com/nmagee"><code>@​nmagee</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6199">pypa/pipenv#6199</a></li>
<li>Fix: dont call load dot env in shell sub command by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6202">pypa/pipenv#6202</a></li>
<li>Remove click.echo from pipenv/cli by <a
href="https://github.com/aidencullo"><code>@​aidencullo</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6182">pypa/pipenv#6182</a></li>
<li>Linuxbrew shell fix by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6215">pypa/pipenv#6215</a></li>
<li>remove all click.echo calls from exceptions.py by <a
href="https://github.com/aidencullo"><code>@​aidencullo</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6216">pypa/pipenv#6216</a></li>
<li>Solve issue with quiet lock not writing the lock file. by <a
href="https://github.com/matteius"><code>@​matteius</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6208">pypa/pipenv#6208</a></li>
<li>Raise default PIPENV_MAX_DEPTH to 10 by <a
href="https://github.com/snickell"><code>@​snickell</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6214">pypa/pipenv#6214</a></li>
<li>Swap old_version and new_version in <code>pipenv update
--outdated</code> output by <a
href="https://github.com/BarrensZeppelin"><code>@​BarrensZeppelin</code></a>
in <a
href="https://redirect.github.com/pypa/pipenv/pull/6179">pypa/pipenv#6179</a></li>
<li>Correction to the rich conversion by <a
href="https://github.com/matteius"><code>@​matteius</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6229">pypa/pipenv#6229</a></li>
<li>Corrected behavior of uninstall --all by <a
href="https://github.com/matteius"><code>@​matteius</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6209">pypa/pipenv#6209</a></li>
<li>Correct for local package installs always being treated as editable.
by <a href="https://github.com/matteius"><code>@​matteius</code></a> in
<a
href="https://redirect.github.com/pypa/pipenv/pull/6222">pypa/pipenv#6222</a></li>
<li>Corrected behavior of <code>pipenv install --skip-lock</code> by <a
href="https://github.com/matteius"><code>@​matteius</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6225">pypa/pipenv#6225</a></li>
<li>Remove import of cached_property from pip by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6238">pypa/pipenv#6238</a></li>
<li>vendor: bump importlib-metadata to 8.4.0 by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6235">pypa/pipenv#6235</a></li>
<li>Fix shell detection by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6230">pypa/pipenv#6230</a></li>
<li>Add initial support for python 3.13 by <a
href="https://github.com/matteius"><code>@​matteius</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6240">pypa/pipenv#6240</a></li>
<li>remove click echo from utils.resolver by <a
href="https://github.com/oz123"><code>@​oz123</code></a> in <a
href="https://redirect.github.com/pypa/pipenv/pull/6241">pypa/pipenv#6241</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/gtback"><code>@​gtback</code></a> made
their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6184">pypa/pipenv#6184</a></li>
<li><a href="https://github.com/ptamarit"><code>@​ptamarit</code></a>
made their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6183">pypa/pipenv#6183</a></li>
<li><a
href="https://github.com/michaelmior"><code>@​michaelmior</code></a>
made their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6188">pypa/pipenv#6188</a></li>
<li><a href="https://github.com/nmagee"><code>@​nmagee</code></a> made
their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6199">pypa/pipenv#6199</a></li>
<li><a href="https://github.com/snickell"><code>@​snickell</code></a>
made their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6214">pypa/pipenv#6214</a></li>
<li><a
href="https://github.com/BarrensZeppelin"><code>@​BarrensZeppelin</code></a>
made their first contribution in <a
href="https://redirect.github.com/pypa/pipenv/pull/6179">pypa/pipenv#6179</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pypa/pipenv/compare/v2024.0.1...v2024.0.2">https://github.com/pypa/pipenv/compare/v2024.0.1...v2024.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/pipenv/blob/main/CHANGELOG.md">pipenv's
changelog</a>.</em></p>
<blockquote>
<h1>2024.0.2 (2024-09-13)</h1>
<h1>Pipenv 2024.0.2 (2024-09-13)</h1>
<h2>Features &amp; Improvements</h2>
<ul>
<li>Initial support for python3.13
<code>[#6240](pypa/pipenv#6240)
&lt;https://github.com/pypa/pipenv/issues/6240&gt;</code>_</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix bump version in CI/CD pipeline
<code>[#6177](pypa/pipenv#6177)
&lt;https://github.com/pypa/pipenv/issues/6177&gt;</code>_</li>
<li>Swap old_version and new_version in pipenv update --outdated output.
<code>[#6179](pypa/pipenv#6179)
&lt;https://github.com/pypa/pipenv/issues/6179&gt;</code>_</li>
<li>Update shell detection to only check the end of the command used.
<code>[#6197](pypa/pipenv#6197)
&lt;https://github.com/pypa/pipenv/issues/6197&gt;</code>_</li>
<li>Fix loading dot env twice <a
href="https://redirect.github.com/pypa/pipenv/issues/6198">#6198</a>
<code>[#6202](pypa/pipenv#6202)
&lt;https://github.com/pypa/pipenv/issues/6202&gt;</code>_</li>
<li>Solve issue with quiet lock not writing the lock file <a
href="https://redirect.github.com/pypa/pipenv/issues/6207">#6207</a>.
<code>[#6207](pypa/pipenv#6207)
&lt;https://github.com/pypa/pipenv/issues/6207&gt;</code>_</li>
<li>Fix regression introduced with the &quot;smarter uninstall&quot; PR.
Uninstall <code>--all</code> should not clear the Pipfile entries.
<code>[#6209](pypa/pipenv#6209)
&lt;https://github.com/pypa/pipenv/issues/6209&gt;</code>_</li>
<li>Fixed regression where all local file installations were incorrectly
treated as editable. Ensure that local file installations are explicitly
marked as editable in both Pipfile and Pipfile.lock entries if editable
installation is desired.
<code>[#6222](pypa/pipenv#6222)
&lt;https://github.com/pypa/pipenv/issues/6222&gt;</code>_</li>
<li>Corrected behavior of <code>pipenv install --skip-lock</code> after
behavioral install refactor introduced regression. No Pipfile.lock is
generated with this fix and installation of vcs no longer fails with
revision missing error.
<code>[#6225](pypa/pipenv#6225)
&lt;https://github.com/pypa/pipenv/issues/6225&gt;</code>_</li>
<li>Fix for Windows on ARM missing distlib binaries in pyproject.toml
<code>[#6240](pypa/pipenv#6240)
&lt;https://github.com/pypa/pipenv/issues/6240&gt;</code>_</li>
</ul>
<h2>Vendored Libraries</h2>
<ul>
<li>Clean up usage of click styling from exceptions, shell and
virtualenv <code>[#6178](pypa/pipenv#6178)
&lt;https://github.com/pypa/pipenv/issues/6178&gt;</code>_</li>
<li>Remove click.echo from pipenv/cli
<code>[#6182](pypa/pipenv#6182)
&lt;https://github.com/pypa/pipenv/issues/6182&gt;</code>_</li>
<li>Remove click.echo from exceptions.py
<code>[#6216](pypa/pipenv#6216)
&lt;https://github.com/pypa/pipenv/issues/6216&gt;</code>_</li>
<li>Update importlib-metadata to 8.4.0
<code>[#6235](pypa/pipenv#6235)
&lt;https://github.com/pypa/pipenv/issues/6235&gt;</code>_</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pypa/pipenv/commit/13d051b489125d95bad9ecbb44264662cd6bc8e1"><code>13d051b</code></a>
Release v2024.0.2</li>
<li><a
href="https://github.com/pypa/pipenv/commit/f818736dd84298e428939eb31bc3aa4b14c4eebc"><code>f818736</code></a>
Bumped version to 2024.0.2.</li>
<li><a
href="https://github.com/pypa/pipenv/commit/080031d09db3994b2009ce471db3fba333243dfa"><code>080031d</code></a>
Merge pull request <a
href="https://redirect.github.com/pypa/pipenv/issues/6241">#6241</a>
from pypa/trim-click</li>
<li><a
href="https://github.com/pypa/pipenv/commit/9911630b658b8e93cff22ad437755b023ceab2b6"><code>9911630</code></a>
Add news fragments</li>
<li><a
href="https://github.com/pypa/pipenv/commit/1173651622934156770827123fbe858936cb1ee1"><code>1173651</code></a>
Upgrade black rules</li>
<li><a
href="https://github.com/pypa/pipenv/commit/0cfd38499656e63f8d3b07514acfc8b27f9e6891"><code>0cfd384</code></a>
Upgrade black rules</li>
<li><a
href="https://github.com/pypa/pipenv/commit/7816f391dfbac73a16615dcf2304d076d1fe5218"><code>7816f39</code></a>
fix test</li>
<li><a
href="https://github.com/pypa/pipenv/commit/94a0ed828115e634a8a3ce595652a19ba1b62431"><code>94a0ed8</code></a>
fix test</li>
<li><a
href="https://github.com/pypa/pipenv/commit/5b8d3f22ae323338521311f19e4d1e2a17ddf6ca"><code>5b8d3f2</code></a>
upgrade lock file, correct the vcs entry</li>
<li><a
href="https://github.com/pypa/pipenv/commit/28cbcabb3bbf46ad3ff1c5ad9448f8adf6600de1"><code>28cbcab</code></a>
Switch to fork of pypiserver while try to get changes upstreamed</li>
<li>Additional commits viewable in <a
href="https://github.com/pypa/pipenv/compare/v2024.0.1...v2024.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pipenv&package-manager=pip&previous-version=2024.0.1&new-version=2024.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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