Comments (11)
Hmm, shouldn't be too bad probably.
A quick look at the 3.5.2 version of subprocess shows that it requires time.monotonic, which I've been meaning to do as it's a dependency for some of the async-type stuff. But maybe makes sense to do 3.2 version of subprocess first as it's already done...
from tauthon.
See https://github.com/kovidgoyal/calibre/blob/master/src/calibre/utils/monotonic.c for monotonic for python 2
from tauthon.
I submitted a pull request to the subprocess32 project to make subprocess32 build on tauthon. Someone e-mailed me back indicating it'd be better to merge subprocess32 into tauthon than to patch subprocess32 to work out of the box on tauthon.
from tauthon.
@dan-stromberg, what's the PR# (or your branch) that you submitted to subprocess32?
from tauthon.
from tauthon.
thx, sir.
I'm working on time.monotonic* right now. I'll look at how to include your PR afterwards.
from tauthon.
from tauthon.
I just submitted Python3's time.monotonic
functions as PR #122 (excluding time.get_clock_info
). If something needs that lmk, and I can work on implementing that in the next couple days.
It needs testing for OSX as I don't have access to that platform. Actually it probably needs testing against whatever consumes it as I just wrote it up and submitted the PR a few minutes ago....
from tauthon.
So the internal _subprocess
and _posixsubprocess
modules can probably be merged so that fork_exec
is exposed on both platforms (and backwards compatibility can be maintained). Then anything that depends on these binary modules can just use whatever is necessary.
However, are there any other differences in the subprocess
module between Python2 and Python3? If we simply replace Lib/subprocess.py
with Python3's version, will that potentially break modules that depend on Python2's implementation? Is this something that we can just get away with, or would it just be safer in terms of compatibility to have it as a separate module similar to subprocess32
?
from tauthon.
If we simply replace Lib/subprocess.py with Python3's version, will that potentially break modules that depend on Python2's implementation? Is this something that we can just get away with
No, it isn't. Backwards compatibility is a very high priority for us - comes right after security.
from tauthon.
I suppose it wasn't too clear, but according to https://docs.python.org/3/whatsnew/3.7.html, the differences seem to be that subprocess.run
contains a capture_output
keyword, an alias for universal_newlines
as text
, context manager for Popen, better handling of KeyboardInterrupt
(by adding a delay), and `close_fds is now defaulted to true.
Other than close_fds
, all of these things seem backwards-compatible. Is this all that's different between these interfaces?
Personally instead of using the subprocess
interface, I prefer just having access to handles/fds and feeding i/o to coroutines that use yield
as an expression, so I'm totally unfamiliar with the differences between both of the subprocess
implementations.
from tauthon.
Related Issues (20)
- Backport issue4761: POSIX openat, etc HOT 1
- proper releases HOT 13
- CVE-2019-9740 HOT 8
- backport venv module HOT 1
- be present on travis HOT 5
- make uninstall HOT 3
- C preprocessor symbol when building C extension modules for Tauthon? HOT 3
- Build a wheel for Tauthon? HOT 6
- Asynchronous for-loops not yet implemented HOT 1
- Python issue 1663329: subprocess/popen close_fds perform poor if SC_OPEN_MAX is hi HOT 1
- Plone 4 on Tauthon HOT 61
- like 10000 errors HOT 2
- Build error on Windows x64 HOT 1
- Formalize "batteries not included" availabiity HOT 1
- Some new packages are not installed by `make install`
- Fix security issues reported on bpo up to 2021/03/31 HOT 7
- Question about compilation for spidermonkey HOT 6
- LibreSSL cryptography support HOT 7
- Regression test hang in test.test_concurrent_futures.ProcessPoolAsCompletedTests HOT 2
- Regression test test_multiprocessing fails HOT 4
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 tauthon.