Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Jul 22, 2025

Important

This is a PR for backport against v1.7 branch

the function has been deprecated from IPython 7.14 and has been removed in IPython 9.0

cherry picked from commit 05958bc and a61d45d that were done in python environment update

cderv added 3 commits July 22, 2025 15:34
the function has been deprecated from IPython 7.14 and has been removed in IPython 9.0

(cherry picked from commit 05958bc)
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jul 22, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cderv cderv mentioned this pull request Jul 22, 2025
3 tasks
@cderv cderv changed the title fix set_matplotlib_formats being removed from Ipython [backport] fix set_matplotlib_formats being removed from Ipython Jul 22, 2025
@cderv cderv added the backport label Jul 22, 2025
@cderv cderv added this to the Hot-fix milestone Jul 22, 2025
@cderv cderv added the jupyter label Jul 22, 2025
@cderv
Copy link
Collaborator Author

cderv commented Jul 22, 2025

Tests are passing. I think the change is small enough it is worth backporting.

@cscheid adding you as review to valide backport or not.

Also manually tested with this doc

---
keep-md: true
format:
  typst:
    fig-format: svg
    keep-typ: true
---

# Hello World

```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

we do get

#figure([
#box(image("index_files/figure-typst/fig-polar-output-1.svg"))
]

@cderv cderv requested a review from cscheid July 22, 2025 15:42
@cderv cderv linked an issue Jul 22, 2025 that may be closed by this pull request
3 tasks
Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@cscheid cscheid merged commit f4389d0 into v1.7 Jul 22, 2025
44 checks passed
@cscheid cscheid deleted the backport/set-matplotlib branch July 22, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typst Format doesn't use SVG images

4 participants