Skip to content

Commit

Permalink
fix for 3.8 python pull 13528 - 38exceptwjb (#333)
Browse files Browse the repository at this point in the history
* fix for 3.8 python pull 13528 - python/cpython#13528
* changes
* flake8
  • Loading branch information
wjblanke authored and hoffmang9 committed Jul 27, 2020
1 parent 6b266fc commit 2563053
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ for setuptools_scm/PEP 440 reasons.
- Binary wheels for ARM64/aarch64 also build for python 3.7.
- See and remove plot directories from the UI and command line.
- You can now specify the memory buffer in UI.
- Optimized MPIR for Sandybridge and Ivybridge CPUs under Windows

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

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


### Changed
- Minor changes have been made across the repositories to better support
compiling on OpenBSD. HT @n1000.
Expand Down
3 changes: 2 additions & 1 deletion src/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ async def _sync(self) -> OutboundMessageGenerator:
phr.wait(), timeout=sleep_interval,
)
break
except concurrent.futures.TimeoutError:
# https://github.com/python/cpython/pull/13528
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
total_time_slept += sleep_interval
self.log.warning("Did not receive desired header hashes")

Expand Down
3 changes: 2 additions & 1 deletion src/full_node/sync_blocks_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ async def process(self) -> None:
try:
await asyncio.wait_for(future, timeout=self.SLEEP_INTERVAL)
break
except concurrent.futures.TimeoutError:
# https://github.com/python/cpython/pull/13528
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
try:
await future
except asyncio.CancelledError:
Expand Down
6 changes: 4 additions & 2 deletions src/wallet/wallet_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,8 @@ async def _sync(self):
].wait()
await asyncio.wait_for(aw, timeout=sleep_interval)
break
except concurrent.futures.TimeoutError:
# https://github.com/python/cpython/pull/13528
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
total_time_slept += sleep_interval
self.log.info("Did not receive desired headers")

Expand Down Expand Up @@ -635,7 +636,8 @@ async def _sync(self):
future = asyncio.gather(*awaitables, return_exceptions=True)
try:
await asyncio.wait_for(future, timeout=sleep_interval)
except concurrent.futures.TimeoutError:
# https://github.com/python/cpython/pull/13528
except (concurrent.futures.TimeoutError, asyncio.TimeoutError):
try:
await future
except asyncio.CancelledError:
Expand Down

0 comments on commit 2563053

Please sign in to comment.