Skip to content

Commit 35ad866

Browse files
authored
Merge pull request #50 from QuTech-Delft/netsquid-magic-memory-leaks-compatibility-fix
Compatibility fix for netsquid-magic version change
2 parents 7e2b6ba + 48e98f5 commit 35ad866

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@master
10-
- name: Set up Python 3.8
10+
- name: Set up Python 3.9
1111
uses: actions/setup-python@v1
1212
with:
13-
python-version: 3.8
13+
python-version: 3.9
1414
- name: Install pypa/build
1515
run: >-
1616
python -m
@@ -35,4 +35,4 @@ jobs:
3535
if: success() && startsWith(github.ref, 'refs/tags')
3636
uses: pypa/gh-action-pypi-publish@master
3737
with:
38-
password: ${{ secrets.PYPI_API_TOKEN }}
38+
password: ${{ secrets.PYPI_API_TOKEN }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
2025-05-13 (0.13.5)
5+
-------------------
6+
- Fix compatibility issue in MagicNetworkLayerProtocol due to changes in netsquid-magic
7+
- Add requirement on netsquid-magic >= 16.0.0, < 17.0.0
8+
49
2024-12-16 (0.13.4)
510
------------------
611
- Bugfix for simulation time not resetting between different calls of the `squidasm.run.stack.run.run` method

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ install_requires =
2121
pydantic >=1.8.2, < 3.0
2222
pydynaa >=0.3, <2.0
2323
netsquid >=1.1.2, <2.0
24+
netsquid-magic >= 16.0.0, <17.0.0
2425
bitarray >=2.8.0, <3.0.0
2526
netqasm >=0.11.2
2627
pytest >=7.1, <8.0

squidasm/sim/network/network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ def _handle_label_delivery(self, event):
353353
# netsquid_magic package, with one change: the `messages` dict is
354354
# returned at the end, so that their contents can be logged.
355355
try:
356-
queue_item = self._pop_from_requests_in_process(event)
356+
delivery = self._magic_distributor.peek_delivery(event)
357+
queue_item = self._pop_from_requests_in_process(delivery)
357358
except KeyError:
358359
# This indicates that this delivery event is not the "reference" delivery event returned by add_delivery
359360
# of the magic distributor. Since the below operations only need to be executed once, we can skip this.

0 commit comments

Comments
 (0)