Jan-Philip Gehrcke added the comment:
Martin, I very much like the order you suggested, thanks. I did not feel
confident enough for re-structuring the entire entry. So, can we agree on using
that for Python 2.7?
Is there a consensus regarding the approach to take for Python 3.5? Except from
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Added file: http://bugs.python.org/file38096/issue6634_py27.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Martin Panter added the comment:
If it were me, I’d drop the Notes and Warnings (never been a fan), and put
Thing #2 first, and then Thing #1. Maybe something like
'''
sys.exit([arg])
Exit from Python. . . . and it is possible to intercept the exit attempt at an
outer level. When called from
Jan-Philip Gehrcke added the comment:
I'd love to find an agreement here. I think we are quite close to getting this
closed, so further input is very welcome.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
Jan-Philip Gehrcke added the comment:
Thanks for your feedback Antoine.
I'm not sure what the doc patch achieves.
Let me try to bring things in order. It should achieve two things:
1. Properly describe the stderr-writing behavior of sys.exit().
Antoine Pitrou added the comment:
I'm not sure what the doc patch achieves. It only states more verbosely what is
already said in the current version.
Also, warnings are really for important issues (such as security issues); using
them too liberally is a disservice to the reader.
--
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Added file: http://bugs.python.org/file37988/issue6634_py35.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Removed file: http://bugs.python.org/file37986/issue6634_py35.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Removed file: http://bugs.python.org/file19006/thread_sys_exit_test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Jan-Philip Gehrcke added the comment:
For Python 3.5, I have attached a patch that
- adds relevant test cases to test_threading.py which probe
the interpreter's stderr output for compliance with what
the docs state.
- makes sys.exit(msg) write msg to stderr, even if called
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Removed file: http://bugs.python.org/file37988/issue6634_py35.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Removed file: http://bugs.python.org/file37983/issue6634_py27.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Martin Panter added the comment:
New patches look fine. BTW SystemExit.code is also documented at
https://docs.python.org/dev/library/exceptions.html#SystemExit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
Jan-Philip Gehrcke added the comment:
Regarding the documentation patch: I like to start sentences
with a capital letter. Perhaps change it to start
“Calling :func:`exit` only terminates . . .”.
Thanks for feedback. Have now used Invocation of to not repeat call*
in the sentence,
Changes by Jan-Philip Gehrcke jgehr...@gmail.com:
Added file: http://bugs.python.org/file37990/issue6634_py27.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
Jan-Philip Gehrcke added the comment:
For Python 2.7, we will not change behavior, even if unexpected. Instead, the
sys.exit-docs should be adjusted and
- warn about the fact that nothing is written to stderr
if sys.exit(msg) gets called from a non-primary thread, and
- note
Martin Panter added the comment:
Regarding the documentation patch: I like to start sentences with a capital
letter. Perhaps change it to start “Calling :func:`exit` only terminates . . .”.
With the code change patch, it might be neater to use the SystemExit.code
attribute rather than
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
David Manowitz david.manow...@gmail.com added the comment:
I have a couple of issues with that argument:
1.) Until fairly recently, the fact that sys.exit() when called from a
non-primary thread only causes the thread to die, was not clearly
documented (and still isn't in the python2.6 docs).
Antoine Pitrou pit...@free.fr added the comment:
I don't see why this should be considered acceptable behavior. Why
don't threads have their own ThreadExit exception, rather than
overloading the use, and therefore, the meaning, of the SystemExit
exception? As indicated by their names,
David Manowitz david.manow...@gmail.com added the comment:
I don't see why this should be considered acceptable behavior. Why don't
threads have their own ThreadExit exception, rather than overloading the use,
and therefore, the meaning, of the SystemExit exception? As indicated by their
Changes by Daniel Stutzbach stutzb...@google.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6634
___
___
Python-bugs-list
Jan-Philip Gehrcke jgehr...@gmail.com added the comment:
Sorry for the delay.
Before suggesting a doc change to correct/complete the description of the
*current* situation, we actually should consider changing this situation. I
think this is reasonable and I feel encouraged by Gabriel
Terry J. Reedy tjre...@udel.edu added the comment:
I do not use threads so I cannot comment on the technical issue.
Since the current behavior is not clearly a bug, I do not think a change would
or know that it should be applied to 2.7/3.1. So I suggest that you both
1. Suggest a doc patch on
Terry J. Reedy tjre...@udel.edu added the comment:
Please suggest a specific doc change at a specific location.
IE, how *should* they read, not just what is wrong.
--
assignee: georg.brandl - d...@python
nosy: +d...@python, tjreedy -georg.brandl
stage: - needs patch
versions: +Python
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
I agree with you; the docs should be improved, and I see no reason for
sys.exit(msg) NOT to write to stderr inside a child thread.
--
nosy: +gagenellina
___
Python tracker
New submission from Jan-Philip Gehrcke jgehr...@gmail.com:
Hey there,
hopefully I fill out this form in an adequate way!
I ran into some problems while using sys.exit('msg') together with
threads, which could have been avoided with slightly more information in
the docs here:
27 matches
Mail list logo