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

wrong error message when deleting a vertex from a static sparse graph #39270

Closed
2 tasks done
dcoudert opened this issue Jan 4, 2025 · 0 comments · Fixed by #39271
Closed
2 tasks done

wrong error message when deleting a vertex from a static sparse graph #39270

dcoudert opened this issue Jan 4, 2025 · 0 comments · Fixed by #39271

Comments

@dcoudert
Copy link
Contributor

dcoudert commented Jan 4, 2025

Steps To Reproduce

sage: G = Graph([('a', 1), (1, 2), (2, 3)], immutable=True)
sage: type(G._backend)
<class 'sage.graphs.base.static_sparse_backend.StaticSparseBackend'>

Expected Behavior

sage: G.delete_vertex(1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())
sage: G.delete_vertex('a')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())

Actual Behavior

sage: G.delete_vertex(1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
ValueError: graph is immutable; please change a copy instead (use function copy())
sage: G.delete_vertex('a')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: an integer is required

Additional Information

No response

Environment

  • OS: all
  • Sage Version: 10.6.beta2

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
dcoudert added a commit to dcoudert/sage that referenced this issue Jan 4, 2025
vbraun pushed a commit to vbraun/sage that referenced this issue Jan 10, 2025
…ete vertex/edge from a static graph

    
Fixes sagemath#39270.


### 📝 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.
- [x] I have created tests covering the changes.
- [x] 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#39271
Reported by: David Coudert
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this issue Jan 12, 2025
…ete vertex/edge from a static graph

    
Fixes sagemath#39270.


### 📝 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.
- [x] I have created tests covering the changes.
- [x] 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#39271
Reported by: David Coudert
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this issue Jan 16, 2025
…ete vertex/edge from a static graph

    
Fixes sagemath#39270.


### 📝 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.
- [x] I have created tests covering the changes.
- [x] 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#39271
Reported by: David Coudert
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this issue Jan 17, 2025
…ete vertex/edge from a static graph

    
Fixes sagemath#39270.


### 📝 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.
- [x] I have created tests covering the changes.
- [x] 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#39271
Reported by: David Coudert
Reviewer(s): Travis Scrimshaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant