New submission from Jan-Philip Gehrcke :
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: http://docs.python.o
New submission from Jan David Mol :
The shlex module does not function as expected in the presence of
comments when newlines are not whitespace. An example (attached):
>>> from shlex import shlex
>>>
>>> lexer = shlex("a \n b")
>>> print ",&q
Jan David Mol added the comment:
Attached is a patch which fixes this for me. It basically does a
fall-through using '\n' when encountering a comment. So that may be a
bit of a hack (who says '\n' is the only newline char in there, and not
'\r'?) but I'll le
Changes by Jan David Mol :
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue7089>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jan David Mol added the comment:
As there seems to be some interest, I've continued working on patching
this issue.
Attached is an improved version of the patch, including additions to
test_shlex.py. Improved in the sense that newlines after a comment are
not considered to be actually pa
New submission from Jan David Mol :
The shlex parser parses "foo#bar" as "foo", discarding the rest as a
comment. This is actually one of the test cases, even in POSIX mode.
However, POSIX (see below) only allows comments to start at the
beginning of a token, so "fo
Jan David Mol added the comment:
Attached a program which shows the relevant behaviour:
import shlex
tests = [ "foo#bar", "foo #bar" ]
for t in tests:
print "%s -> %s" % (t,[x for x in shlex.shlex(t,posix=True)])
results in
$ python lexer_test.py
foo
Jan Niklas Hasse added the comment:
Actually in a new Docker container, the LANG variable isn't set at all.
Defaulting to UTF-8 in that case should be easier to reason about, shouldn't it?
--
___
Python tracker
<http://bugs.python.o
Jan Niklas Hasse added the comment:
https://sourceware.org/glibc/wiki/Proposals/C.UTF-8#Defaults mentions that
C.UTF-8 should be glibc's default.
This bug report also mentions Python:
https://sourceware.org/bugzilla/show_bug.cgi?id=17318
It hasn't been fixed y
Jan Niklas Hasse added the comment:
> Usually, when a new option is added to Python, we add a command line option
> (-X utf8) but also an environment variable: I propose PYTHONUTF8=1.
>
> Use your favorite method to define the env var "system wide" in your docker
>
Jan Niklas Hasse added the comment:
Only important case for me: What when LANG is unset?
--
___
Python tracker
<http://bugs.python.org/issue28180>
___
___
Pytho
Jan Niklas Hasse added the comment:
> Can you please tell me if these variables are set and if yes, give me their
> value?
None of these variables are set (with `docker run -it fedora:25 /bin/bash`).
--
___
Python tracker
<http://bugs.p
Jan-Philip Gehrcke added the comment:
Hello!
Like everybody in this thread I would love to see this land and have prepared a
new patch, hoping that we can process this still for 3.6.
Antoine summarized the core task here very well:
> Let's stay focused on what is
> necessary to
Jan-Philip Gehrcke added the comment:
Windows is the only Python-supported platform where utime did not work for
directories, ages ago, right?
If that is the case, I support Larry Hastings' approach of removing the entire
sentence:
"Whether a directory can be given for path
Changes by Jan-Philip Gehrcke :
--
keywords: +patch
Added file: http://bugs.python.org/file37979/issue20709_py27.patch
___
Python tracker
<http://bugs.python.org/issue20
Changes by Jan-Philip Gehrcke :
Added file: http://bugs.python.org/file37980/issue20709_tip.patch
___
Python tracker
<http://bugs.python.org/issue20709>
___
___
Python-bug
Jan-Philip Gehrcke added the comment:
I have added patches for the documentation, where I removed the sentence in
question and re-wrapped the paragraph.
--
___
Python tracker
<http://bugs.python.org/issue20
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
Changes by Jan-Philip Gehrcke :
Removed file: http://bugs.python.org/file19006/thread_sys_exit_test.py
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Pytho
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 c
Changes by Jan-Philip Gehrcke :
Added file: http://bugs.python.org/file37988/issue6634_py35.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Python-bug
Changes by Jan-Philip Gehrcke :
Removed file: http://bugs.python.org/file37986/issue6634_py35.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Pytho
Changes by Jan-Philip Gehrcke :
Removed file: http://bugs.python.org/file37988/issue6634_py35.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Pytho
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 "
Changes by Jan-Philip Gehrcke :
Removed file: http://bugs.python.org/file37983/issue6634_py27.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Pytho
Changes by Jan-Philip Gehrcke :
Added file: http://bugs.python.org/file37990/issue6634_py27.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Python-bug
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
Jan-Philip Gehrcke added the comment:
First, I want to address the situation in 2.7. Please have a look at my patch
and my reasoning.
This is my setup.py test file content:
from distutils.core import setup
setup(name='foo', version='1.0', packages=['tes
Changes by Jan-Philip Gehrcke :
Added file: http://bugs.python.org/file38006/issue18454_py27_prompt_test.patch
___
Python tracker
<http://bugs.python.org/issue18
New submission from Jan-Philip Gehrcke:
When Python is invoked with the `-c command` switch, the command string does
not get exposed in sys.argv:
$ python -c "import sys; print(sys.argv)"
['-c']
$ python -c "import sys; print(sys.argv)" arg1
[
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
<http://bugs.python.org/i
Jan-Philip Gehrcke added the comment:
Can these super-small doc patches get applied or should we change something?
Thanks!
--
___
Python tracker
<http://bugs.python.org/issue20
Jan-Philip Gehrcke added the comment:
Victor,
I support the idea of sys.command. However, it would be unpopulated most of the
time (e.g. set to None by default). Now, is that something we should push
forward or not? I would work on a patch, but we should have an agreement first,
I guess
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 :
Added file: http://bugs.python.org/file38096/issue6634_py27.patch
___
Python tracker
<http://bugs.python.org/issue6634>
___
___
Python-bug
New submission from Michał Jan Warecki:
This should speak for itself:
>>> 3*4.35
13.049
>>>
The error is reproducible, and applies to all decimal numbers ending with
\.[0-9]5, and \.[0-4] as well as \.[6-9], when multiplied by 3. Examples:
>>> 3*4.1
1
Changes by Michał Jan Warecki :
--
components: +Interpreter Core
___
Python tracker
<http://bugs.python.org/issue25378>
___
___
Python-bugs-list mailing list
Unsub
New submission from Jan Niklas Hasse:
Working with Docker I often end up with an environment where the locale isn't
correctly set. In these cases it would be great if sys.getfilesystemencoding()
could default to 'utf-8' instead of 'ascii', as it's the encoding
Jan Niklas Hasse added the comment:
Unfortunately no, as this would mean I'll have to change all my python
invocations in my scripts and it wouldn't work for executable files with
#!/usr/bin/env python3
would it?
--
___
Python trac
Jan-Philip Gehrcke added the comment:
Thanks Christian, much appreciated. Just responded to your review.
--
___
Python tracker
<http://bugs.python.org/issue16
Jan Niklas Hasse added the comment:
Why not?
--
___
Python tracker
<http://bugs.python.org/issue28180>
___
___
Python-bugs-list mailing list
Unsubscribe:
Frens Jan Rumph added the comment:
Would be nice if 3.4 could also be patched, not just 3.5 and 3.6, since python
in EPEL currently is python34-3.4.3-7.el7.x86_64. The patch can be applied
without conflict and resolves some serious cases of segfaults.
--
nosy: +Frens Jan Rumph
Jan-Philip Gehrcke added the comment:
Christian, Senthil, would appreciate if I got another round of feedback (in the
review thread) :-)
--
nosy: +orsenthil
___
Python tracker
<http://bugs.python.org/issue16
401 - 443 of 443 matches
Mail list logo