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

Muffle DeprecationWarning during docbuild #37664

Closed
mkoeppe opened this issue Mar 24, 2024 · 4 comments · Fixed by #38608
Closed

Muffle DeprecationWarning during docbuild #37664

mkoeppe opened this issue Mar 24, 2024 · 4 comments · Fixed by #38608

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Mar 24, 2024

These deprecation warnings are not helpful and should be suppressed.

Example:

[sagemath_doc_html-10.4.beta0]   [cryptogra] /sage/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sphinx/util/inspect.py:330: DeprecationWarning:
[sagemath_doc_html-10.4.beta0]   [cryptogra] Importing carmichael_lambda from here is deprecated; please use "from sage.arith.misc import carmichael_lambda" instead.
[sagemath_doc_html-10.4.beta0]   [cryptogra] See https://github.com/sagemath/sage/issues/34719 for details.
[sagemath_doc_html-10.4.beta0]   [cryptogra]   return getattr(obj, name, *defargs)
[sagemath_doc_html-10.4.beta0]   [cryptogra] The inventory file is in ../inventory/en/reference/cryptography.
@thecaligarmo
Copy link
Contributor

Most of these are coming from lazy_import as it has the deprecation parameter. Is the point of this issue to remove the deprecation parameter altogether? (Why was it added in the first place?) Or is it to go through and remove all lazy imports which contain these deprecation warnings? (If so, I still don't see why there's a deprecation parameter if we'd want to remove those lazy imports altogether.)

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 28, 2024

No, the deprecation warnings have an important function: They alert about code (in library and users' code) that should be updated.
Just during the docbuild (sphinx), these warnings should not be shown.

@thecaligarmo
Copy link
Contributor

Sounds good. So far what I have is that I can remove all DeprecationWarning when we do sphinx. This would remove all deprecation warnings and not just the ones coming form lazy_import. If that's not the idea, lemme know, but if so, I'll submit a pull request with the changes.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 28, 2024

Yes, this sounds like a suitable solution.

vbraun pushed a commit to vbraun/sage that referenced this issue Sep 5, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 6, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 8, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 8, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 10, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 12, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Sep 14, 2024
… build

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Fixes sagemath#37664.

from the log of the doc build workflow of this PR,
```
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/cryptography inventory
  [sagemath_doc_html-none] [spkg-install] [cryptogra] Converting
`source_suffix = '.rst'` to `source_suffix = {'.rst':
'restructuredtext'}`.
  [sagemath_doc_html-none] [spkg-install] [cryptogra] building
[inventory]: targets for 25 source files that are out of date
  [sagemath_doc_html-none] [spkg-install] [cryptogra] updating
environment: [new config] 25 added, 0 changed, 0 removed
  [sagemath_doc_html-none] [spkg-install] [cryptogra] The inventory file
is in ../../local/share/doc/sage/inventory/en/reference/cryptography.
  [sagemath_doc_html-none] [spkg-install] sage --docbuild --no-pdf-links
reference/curves inventory
```

This PR is based on sagemath#38580 and replaces it. Thank @thecaligarmo for
allowing this arrangement.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38608
Reported by: Kwankyu Lee
Reviewer(s): Matthias Köppe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants