Serhiy Storchaka added the comment:
What about bytearrays and other byte-like objects?
However I'm not sure this enhancement is worth to be accepted. Many other
high-level functions in os and shutil modules do not support bytes paths. For
shutil.which() there is no backward compatibility with
Martin v. Löwis added the comment:
I stand by that comment: IsWhiteSpace should use the Unicode White_Space
property. Since FS/GS/RS/US are not in the White_Space property, it's correct
that the int conversion fails. It's incorrect that .isspace() gives true.
There are really several bugs
anatoly techtonik added the comment:
..and still I miss:
with os.chdir(path):
do_something()
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9097
___
Marc-Andre Lemburg added the comment:
I agree with Martin.
At the time Unicode was added to Python, there was no single Unicode property
for white space, so I had to deduce this from the other available properties.
Now that we have a white space property in Unicode, we should start using it.
STINNER Victor added the comment:
The idea was discussed many times, and there are existing implementations:
http://mail.python.org/pipermail/python-ideas/2013-January/018756.html
http://www.astropython.org/snippet/2009/10/chdir-context-manager
STINNER Victor added the comment:
What about bytearrays and other byte-like objects?
However I'm not sure this enhancement is worth to be accepted. Many other
high-level functions in os and shutil modules do not support bytes paths. For
shutil.which() there is no backward compatibility with
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18283
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
___
Python-bugs-list
STINNER Victor added the comment:
And stat_filemode() should detect integer overflow.
Attached stat_mode_overflow.patch should fix this issue.
(I would also suggest to inline fileperm() into stat_filemode(), or pass buf
instead of buf[1]. But you may not agree, as you want :-))
--
Roundup Robot added the comment:
New changeset ef5175d08e7e by Victor Stinner in branch '3.3':
Issue #18137: Detect integer overflow on precision in float.__format__() and
http://hg.python.org/cpython/rev/ef5175d08e7e
New changeset 81fef2666ebb by Victor Stinner in branch 'default':
(Merge 3.3)
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18137
___
Roundup Robot added the comment:
New changeset f0d934732ab1 by Victor Stinner in branch '3.3':
Issue #18135: Fix a possible integer overflow in ssl.SSLSocket.write()
http://hg.python.org/cpython/rev/f0d934732ab1
New changeset f90d82a75a43 by Victor Stinner in branch 'default':
(Merge 3.3) Issue
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18135
___
anatoly techtonik added the comment:
an anti-pattern and encouraging a bad habit are subjective non-arguments as
long as they fail to answer why.
With or without the helper you still write this code:
prev = os.getcwd()
os.chdir(SDKPATH)
...
os.chdir(prev)
And because
Antoine Pitrou added the comment:
I'm sorry to chime in a bit late, but I think this isn't the correct solution.
Right now partial writes are not possible on a SSL socket, but this commit
makes them possible. See http://bugs.python.org/issue8240 and
http://bugs.python.org/issue12197 for some
STINNER Victor added the comment:
an anti-pattern and encouraging a bad habit are subjective non-arguments
as long as they fail to answer why.
The reasons are explained in the python-idea thread. Please read it.
With or without the helper you still write this code:
Adding more functions
STINNER Victor added the comment:
My changeset e5427b0b2bf7 is not enough: import _stat still fail on Windows.
See for example:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2164/steps/test/logs/stdio
STINNER Victor added the comment:
test_stat.test_devices() fail on Solaris: it looks like os.devnull is a
symlink. You should probably use os.stat() instead of os.lstat() for this
specific test.
Antoine Pitrou added the comment:
I think the right solution here would be to raise OverflowError, not
truncate the output.
Do you mean always? Or only if the SSL_MODE_ENABLE_PARTIAL_WRITE option is
not set?
SSL_MODE_ENABLE_PARTIAL_WRITE is never set.
--
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
hgrepos: +201
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
___
STINNER Victor added the comment:
Right now partial writes are not possible on a SSL socket, but this commit
makes them possible.
Oh, I didn't know (forgot) that SSL does allow partial write by default.
I think the right solution here would be to raise OverflowError, not truncate
the
STINNER Victor added the comment:
I think the right solution here would be to raise OverflowError, not truncate
the output.
Here is a new patch (for Python 3.3) always raising OverflowError if the string
is longer than INT_MAX bytes.
--
Added file:
STINNER Victor added the comment:
I cannot reproduce this isuse, was it fixed?
$ ./python -m test test_warnings
[1/1] test_warnings
1 test OK.
Also, I don't understand how test_filename_none is supposed to check for
issue #12467 (it doesn't use a subprocess).
You don't need a subprocess to
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file30677/5c934626d44d.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
Christian Heimes added the comment:
I have addressed the Windows build issue in
http://hg.python.org/cpython/rev/838f04e5a690 and the failing test on Solaris
in http://hg.python.org/cpython/rev/6c23ca1982b3 (also 2.7 and default).
--
___
Python
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: test needed - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7267
___
___
New submission from Niklas Koep:
I noticed that defining a new type where the tp_name field is NULL causes
segfaults, for instance, when calling pydoc on the extension module. This
particular segfault traces back to type_module() in Objects/typeobject.c where
tp_name is passed to strrchr().
Alexander Belopolsky added the comment:
I have updated the title to focus this issue on the behavior of str.isspace().
I'll pick up remaining int/float issues in #10581.
--
assignee: - belopolsky
title: int() and float() do not accept strings with trailing separators -
str.isspace
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
Added file: http://bugs.python.org/file30679/3ed5bb7fcee9.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
Removed file: http://bugs.python.org/file30677/5c934626d44d.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
Changes by Brian Curtin br...@python.org:
--
nosy: -brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9097
___
___
Python-bugs-list
anatoly techtonik added the comment:
On Sun, Jun 23, 2013 at 4:32 PM, STINNER Victor rep...@bugs.python.orgwrote:
STINNER Victor added the comment:
an anti-pattern and encouraging a bad habit are subjective
non-arguments as long as they fail to answer why.
The reasons are explained in
R. David Murray added the comment:
I would prefer that Haypo spend his time contributing code to Python. If
someone else wants to summarize the arguments in the thread for this issue,
that would be great. Absent that, the link to the discussion is sufficient for
the curious.
In any case,
Alexander Belopolsky added the comment:
Martin v. Löwis wrote at #18236 (msg191687):
int conversion ultimately uses Py_ISSPACE, which conceptually could
deviate from the Unicode properties (as it is byte-based). This is not
really an issue, since they indeed match.
Py_ISSPACE matches Unicode
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10581
___
___
Serhiy Storchaka added the comment:
No, I don't feel motivated right now (and this is a case when even never is
better than right now).
I checked other format methods and found a bug only in PyUnicode_FromFormatV().
I had added test for 3.3+ because 3.3+ already have a test for
Roundup Robot added the comment:
New changeset 56c1227f21f5 by Łukasz Langa in branch '3.3':
Fixed issue #18260: configparser TypeError on source name specified as bytes
http://hg.python.org/cpython/rev/56c1227f21f5
New changeset 06e70937364b by Łukasz Langa in branch 'default':
Merged fix for
Łukasz Langa added the comment:
1. Duplicate sections and options are consciously reported as errors now. This
is a documented backwards-incompatible change [1]_. If you wish to revert to
previous behaviour, you can set strict=False on parser creation.
2. It's really just a coincidence that
Roundup Robot added the comment:
New changeset f8ede55cf92b by Serhiy Storchaka in branch '3.3':
Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
http://hg.python.org/cpython/rev/f8ede55cf92b
New changeset 42def600210e by Serhiy Storchaka in branch 'default':
Issue
frattaroli.nicolas added the comment:
It's cool that you guys are discussing semantics of who said what and how, but
that still doesn't fix this very simple issue that breaks compiling for
everyone on Windows who uses MinGW.
-mno-cygwin, was, as far as I know, only ever required to build from
Alexander Belopolsky added the comment:
Rather than adding a new method to unicodedata, what do you think about adding
a type keyword argument to unicodedata.name()? It can default to canonical
and have possible values control, abbreviation, etc.
See also #12753.
--
Roundup Robot added the comment:
New changeset ae802dc4dcd4 by R David Murray in branch 'default':
#11390: convert doctest CLI to argparse and add -o and -f options.
http://hg.python.org/cpython/rev/ae802dc4dcd4
--
nosy: +python-dev
___
Python
R. David Murray added the comment:
Committed. Thanks for the review, Barry.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11390
Serhiy Storchaka added the comment:
I agree, a ValueError may be better than OverflowError, but all other
formattings raise OverflowError, and we should support them consistent.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
Serhiy Storchaka added the comment:
Can a character or sequence have multiple aliases? What will be a result type
of unicodedata.name() with abbreviation keyword value?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18234
Serhiy Storchaka added the comment:
For the last discrepancy see issue16741. It have a patch which should fix this.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10581
New submission from Terry J. Reedy:
This is a 2.7 only bug.
F:\Python\mypy\tem2.py
print (__file__)
__file__ should be set to relative or absolute path.
From command line:
F:\Python\mypy c:/programs/python27/python.exe tem2.py
tem2.py
F:\Python\mypy c:/programs/python27/python.exe -m
Francisco Martín Brugué added the comment:
What the status of this issue?:
the changeset http://hg.python.org/distutils2/rev/1e0ca4594a2a mentioned in
msg155480 seems to add tests (but it hasn't been add to the issue explicitly).
Can the issue be closed?
--
nosy: +francismb
Francisco Martín Brugué added the comment:
On Debian:
* Command line 2.7.3
~/Prog/mypy$ python2.7 tem2.py
tem2.py
~/Prog/mypy$ python2.7 -m tem2
/home/ci/Prog/mypy/tem2.py
* IDLE 2.7.3
print(__file__)
Traceback (most recent call last):
File pyshell#0, line 1, in module
Alexander Belopolsky added the comment:
Can a character or sequence have multiple aliases?
Yes, for example, most control characters have two aliases (and no name).
;NULL;control
;NUL;abbreviation
0001;START OF HEADING;control
0001;SOH;abbreviation
0002;START OF TEXT;control
Francisco Martín Brugué added the comment:
From Idle editor window (F5):
Traceback (most recent call last):
File /home/ci/Prog/mypy/tem2.py, line 1, in module
print(__file__)
NameError: name '__file__' is not defined
--
___
Python tracker
Roundup Robot added the comment:
New changeset 3685d8074203 by R David Murray in branch '3.3':
#18179: document the local_hostname parameter.
http://hg.python.org/cpython/rev/3685d8074203
New changeset b10fae8c185c by R David Murray in branch 'default':
Merge #18179: document the local_hostname
R. David Murray added the comment:
Thanks Berker. I edited your patch to (a) use 'Otherwise' instead of 'By
default', which is a change from the original docstring that I think makes it
clearer, (b) add words about what the local_hostname is used for (the HELO/EHLO
commands) and (c) in
STINNER Victor added the comment:
anatoly techtonik added the comment:
The reasons are explained in the python-idea thread. Please read it.
This operation is time consuming. I counted +5 votes for the idea and then
it turned into some complicated reading.
If you know the reasons, why can't
Alexander Belopolsky added the comment:
unicodedata.name() was discussed in #12353 (msg144739) where MvL argued that
misspelled names are better than corrected because they are more likely to
appear misspelled in other sources. I am not sure I buy this argument.
Someone googling for
Roundup Robot added the comment:
New changeset 44c8a9d80595 by Victor Stinner in branch 'default':
Issue #11016: Detect integer conversion on conversion from Python int to C
mode_t
http://hg.python.org/cpython/rev/44c8a9d80595
--
___
Python tracker
STINNER Victor added the comment:
I've attached an updated patch that reuses the _py_tmp variable for those
temporary assignments thus keeping the required stack size down.
I don't understand how it would change the size of the C stack, could you
please explain? object.patch looks like
Bernhard Reiter added the comment:
Andrew,
thanks for caring!
Seeing your fix 2a3bc6eb2e13 I believe it does not fully resolv the issue.
Now the code reads
return x // y
multicall.divide(7,3)
and the client prints
7/3=2
I think you probably should change 7/3= to 7//3= in the client code as
Alexander Belopolsky added the comment:
I mistyped issue reference above it should be #12753, not 12353.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18234
___
Changes by anatoly techtonik techto...@gmail.com:
--
nosy: +techtonik
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13276
___
___
Python-bugs-list
anatoly techtonik added the comment:
@Pierre.Raybaut: Looking at the stage of this ticker, I believe you need to
write unittest. Then attach a patch. If patch is attached, the issue is more
visible among developers.
--
___
Python tracker
Jeffrey Armstrong added the comment:
...the fact that this issue has been open for almost 2 years is quite
ridiculous.
I thought that I'd add a little statistic for everyone that might put this bug
into perspective. Since this bug was opened, the MinGW installer has been
downloaded about
Changes by Jeffrey Armstrong jeffrey.armstr...@approximatrix.com:
--
nosy: +Jeffrey.Armstrong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11723
___
Roundup Robot added the comment:
New changeset 75bc0ae02bcd by Christian Heimes in branch 'default':
Issue #11016: Don't define macros and constants that are already set by pyport.h
http://hg.python.org/cpython/rev/75bc0ae02bcd
--
___
Python tracker
Alexander Belopolsky added the comment:
about the problems you mentioned in msg144836, can you report
it in a new issue or, if there are already issues about them,
add a message there?
I believe that would be #4610.
--
nosy: +belopolsky
superseder: - Unicode case mappings are
Alexander Belopolsky added the comment:
There has been a relatively recent discussion of case mappings under #12753
(msg144836).
I personally agree with Martin: str.upper/lower should remain the way it is - a
simplistic 1-to-1 mapping using UnicodeData.txt fields. More sophisticated
case
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
Added file: http://bugs.python.org/file30680/42973dfea391.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
Removed file: http://bugs.python.org/file30679/3ed5bb7fcee9.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18236
___
Alexander Belopolsky added the comment:
I would like someone review this change:
https://bitbucket.org/alexander_belopolsky/cpython/commits/92c187025d0a8a989d9f81f2cb4c96f4eecb81cb?at=issue-18236
The patch can go in without this optimization, but I think this is the right
first step towards
Alexander Belopolsky added the comment:
It looks like at least the OP issue has been fixed in #12736:
'ß'.upper()
'SS'
--
resolution: - out of date
status: open - closed
superseder: - Request for python casemapping functions to use full not simple
casemaps per Unicode's
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15223
___
New submission from Max Kaye:
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
print round(1.123456, 3)
1.123
print round(1.123756, 3)
Segmentation fault: 11
This
Ned Deily added the comment:
The crash report indicates that the operating system is a OS X 10.9 Developer
Preview (which is under NDA at the moment) and that you are using the
python2.7.3 from the python.org 64-bit/32-bit 2.7.3 installer. The readline
module include with that installer
Changes by Ned Deily n...@acm.org:
--
components: +Macintosh
nosy: +ronaldoussoren
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18289
___
___
Antti Haapala added the comment:
My mistake in writing, json ofc does specify that control characters be
escaped. Then, it needs to be pointed out that JSON module DOES not currently
escape \u007f-\u009f as it maybe strictly should
unicodedata.category('\u007f')
'Cc'
json.dumps({'a':
Martin v. Löwis added the comment:
-1 on that patch. It's using trickery to implement the test, and it's not clear
that it is actually as efficient as the previous version. The previous version
was explicitly modified to use a table lookup for performance reasons.
I'd be fine with not
Terry J. Reedy added the comment:
Thanks, not specifically Windows then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18288
___
___
77 matches
Mail list logo