Comments (1)
Here is a workaround that mimics the implementation in Python 3.12.1 when using a Python version without the fix in #111424. One can add the following code right before print("Server stopped")
in server.py
:
if sys.version_info < (3, 12, 1) and server._waiters is not None:
# Workaround for server.wait_closed() issue fixed in Python 3.12.1
waiter = server.get_loop().create_future()
server._waiters.append(waiter)
await waiter
This may be a useful snippet for implementing a server that should work across different Python versions.
from cpython.
Related Issues (20)
- lexer handles raw string escapes differently than documentation HOT 1
- `PYTHON_BASIC_REPL` is not currently tested
- argparse.ArgumentParser.parses_args does not honor exit_on_error=False when given unrecognized arguments HOT 5
- zip: Support for external attributes in zipinfo
- Winreg makes persistent changes somewhere, but not to the Windows registry HOT 8
- Improve `_xxtestfuzz/README.rst`
- Improve the repr of partialmethod HOT 1
- Lots of new compiler warnings: `unknown warning option '-Wtrampolines' [-Wunknown-warning-option]` HOT 7
- Add __get__ to the partial object HOT 8
- Soft-deprecate `sys.api_version` and the C API's `PYTHON_API_VERSION` HOT 1
- `any()` and generator behavior should be documented HOT 3
- Include lastResort in logging HOWTO flow chart
- Add assertFloatsAreIdentical/assertComplexAreIdentical to unittest (or kwarg to assertEqual)? HOT 1
- -Wimplicit-fallthrough generating warnings HOT 9
- Add footer to github issues template like in xonsh shell HOT 4
- AIX build breaks with "field 'dtoa' has incomplete type"
- zsh: segmentation fault python src/toolkit/app.py HOT 10
- PGO build on Windows: test_datetime crashs with: Windows fatal exception: access violation
- JIT 3.13 job: test_logging: qemu_plugin_vcpu_init_hook: assertion failed: (success) HOT 3
- Warn In PyThreadState_Clear() If the Thread State Still Has an Unhandled Exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.