Skip to content

Commit 4fe1806

Browse files
authored
fix for 3.8 python pull 13528 - 38exceptwjb (#333)
* fix for 3.8 python pull 13528 - python/cpython#13528 * changes * flake8
1 parent 07980de commit 4fe1806

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ for setuptools_scm/PEP 440 reasons.
1919
- Binary wheels for ARM64/aarch64 also build for python 3.7.
2020
- See and remove plot directories from the UI and command line.
2121
- You can now specify the memory buffer in UI.
22+
- Optimized MPIR for Sandybridge and Ivybridge CPUs under Windows
2223

2324
### Changed
2425
- `chia start wallet-server` changed to `chia start wallet`, for consistency.
@@ -36,6 +37,7 @@ the blspy/bls-signatures library.
3637
- Fixed spelling error for "folder" on Plot tab.
3738
- Various node dependency security vulnerabilities have been fixed.
3839
- Request peers was not returning currently connected peers older than 1 day.
40+
- Fixed timeout exception inheritance changes under python 3.8 (pull 13528)
3941

4042
### Deprecated
4143
- Removed legacy scripts such as chia-stop-server, chia-restart-harvester, etc.
@@ -86,7 +88,6 @@ Graphical installer. Try `./chia -h` from
8688
in Windows or
8789
`/Applications/Chia.app/Contents/Resources/app.asar.unpacked/daemon` on MacOS.
8890

89-
9091
### Changed
9192
- Minor changes have been made across the repositories to better support
9293
compiling on OpenBSD. HT @n1000.

src/full_node/full_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ async def _sync(self) -> OutboundMessageGenerator:
379379
phr.wait(), timeout=sleep_interval,
380380
)
381381
break
382-
except concurrent.futures.TimeoutError:
382+
# https://github.com/python/cpython/pull/13528
383+
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
383384
total_time_slept += sleep_interval
384385
self.log.warning("Did not receive desired header hashes")
385386

src/full_node/sync_blocks_processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ async def process(self) -> None:
6464
try:
6565
await asyncio.wait_for(future, timeout=self.SLEEP_INTERVAL)
6666
break
67-
except concurrent.futures.TimeoutError:
67+
# https://github.com/python/cpython/pull/13528
68+
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
6869
try:
6970
await future
7071
except asyncio.CancelledError:

src/wallet/wallet_node.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ async def _sync(self):
525525
].wait()
526526
await asyncio.wait_for(aw, timeout=sleep_interval)
527527
break
528-
except concurrent.futures.TimeoutError:
528+
# https://github.com/python/cpython/pull/13528
529+
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
529530
total_time_slept += sleep_interval
530531
self.log.info("Did not receive desired headers")
531532

@@ -635,7 +636,8 @@ async def _sync(self):
635636
future = asyncio.gather(*awaitables, return_exceptions=True)
636637
try:
637638
await asyncio.wait_for(future, timeout=sleep_interval)
638-
except concurrent.futures.TimeoutError:
639+
# https://github.com/python/cpython/pull/13528
640+
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
639641
try:
640642
await future
641643
except asyncio.CancelledError:

0 commit comments

Comments
 (0)