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

👌 Removing deepcopy #1033

Merged
merged 4 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Released: under development
* Improvement: Suffix all warnings with ``[needs]``, and allow them to be suppressed
(`#975 <https://github.com/useblocks/sphinx-needs/pull/975>`_)
* Improvement: :ref:`needextend` for single needs is much faster.
* Improvement: General performance improvement (up to 50%) and less memory consumption (~40%).
* Improvement: external_needs is using cached templates to save generation time.

1.3.0
Expand Down
3 changes: 1 addition & 2 deletions sphinx_needs/directives/needpie.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import copy
import os
from typing import Iterable, List, Sequence

Expand Down Expand Up @@ -156,7 +155,7 @@ def process_needpie(app: Sphinx, doctree: nodes.document, fromdocname: str, foun
# execute filter_func code
# Provides only a copy of needs to avoid data manipulations.
context = {
"needs": copy.deepcopy(need_list),
"needs": need_list,
"results": [],
}
args = []
Expand Down
3 changes: 1 addition & 2 deletions sphinx_needs/filter_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""
from __future__ import annotations

import copy
import re
from types import CodeType
from typing import Any, Iterable, TypeVar
Expand Down Expand Up @@ -167,7 +166,7 @@ def process_filters(
else:
# Provides only a copy of needs to avoid data manipulations.
context = {
"needs": copy.deepcopy(all_needs_incl_parts),
"needs": all_needs_incl_parts,
"results": [],
}

Expand Down