New submission from Julien Maisonneuve:
The link to the Apple Publications Style Guide on this page
https://docs.python.org/3.0/documenting/style.html lniks to a 404 page on
https://developer.apple.com/
Mark Dickinson added the comment:
Serhiy: there's already a small bias inherent in using `int(random() * n)`,
regardless of double rounding, since in general `random()` gives 2**53 equally
likely (modulo deficiencies in the source generator) outcomes and `n` need not
be a divisor of `2**53`.
Ron Barak added the comment:
EDIT 1 (cut and paste had some extraneous data):
I wanted to add Python 2.7 to Unix.
I downloaded the sources to the VirtualBox on which the Unix is installed.
./configure is successful.
make is successful after I manually applied the changes in
New submission from hiroaki itoh:
https://docs.python.org/2/library/cgi.html#cgi.parse
(the file defaults to ``sys.stdin`` and environment
defaults to ``os.environ``)
https://docs.python.org/3/library/cgi.html#cgi.parse
(the file defaults to ``sys.stdin``)
maby this fix had applied only
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - not a bug
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24624
___
R. David Murray added the comment:
Py.exe does not work exactly like unix. Unless you can point to documentation
of py.exe that is wrong or does not cover this, this should be closed as not a
bug.
--
nosy: +r.david.murray
___
Python tracker
Serhiy Storchaka added the comment:
Can't reproduce on 32-bit.
--
components: +Extension Modules
nosy: +serhiy.storchaka
stage: - needs patch
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24620
Changes by Stefan Krah ste...@bytereef.org:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24623
___
___
Tim Peters added the comment:
Hmm. Looks like the answer to my question came before, via Custom collection
can has non-standard behavior with negative indices. Really? We're worried
about a custom collection that assigns some crazy-ass meaning to a negative
index applied to an empty
Antoine Pitrou added the comment:
My weak preference is with Martin’s simpler patch and relying on the
Readline and the terminal to handle questions of tab stops and copied
text.
Fair enough. Still, it would be nice to add a test to test_rlcompleter. Does
someone want to do this?
New submission from Stefan Krah:
While trying to find a possible cause for #24546, I came across this
glitch:
Python 3.6.0a0 (default:02b81a82a57d, Jul 12 2015, 20:33:44)
[GCC 4.8.4] on linux
Type help, copyright, credits or license for more information.
import random
s = (3,
Tim Peters added the comment:
I have a question about this new snippet in choice():
+if i == n and n 0:
+i = n - 1
What's the purpose of the and n 0 clause? Without it, if i == n == 0 then
i will be set to -1, which is just as good as 0 for the purpose of raising
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24621
___
Serhiy Storchaka added the comment:
But I can reproduce the crash with other example.
import random
random.setstate((3, (1,)*624+(-10**9,), None))
random.random()
The index attribute can be set to negative value and this causes reading out of
the buffer.
Here is a patch that fixes this.
Antoine Pitrou added the comment:
ping
Sorry. I do not have time currently to tackle this issue. Feel free to submit
and/or commit improvements if you feel like it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23239
Terry J. Reedy added the comment:
This tracker is for patches to the CPython repository. That includes tkinter,
but does not include tk.
Ned, you know much more about OS variations in tk behavior than. What do you
think? (See initial post.) What happens on Mac. Should we ask Kevin W.
Changes by Konstantin Molchanov moiga...@live.com:
Added file: http://bugs.python.org/file39919/replace_sequence_with_iterable.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24136
___
Konstantin Molchanov added the comment:
I've updated the Calls syntax reference in reference/expressions and the
assignment object description in reference/simple_stmts.
Please tell me if I'm generally doing OK. If I'm not, please guide me to the
right direction.
--
Added file:
New submission from Yasar Luqman Ahmed:
I have a zip-file that can be opened/extracted with 7zip but gives an error
when I try work with it in python:
Py2 (2.7.3 / Linux/Debian7):
Traceback (most recent call last):
File stdin, line 1, in module
File /usr/lib/python2.7/zipfile.py, line 714,
New submission from Stefan Krah:
ELLIPSIS and RARROW are missing in EXACT_TOKEN_TYPES. Patch attached.
--
files: tokenize.diff
keywords: patch
messages: 246663
nosy: meador.inge, skrah
priority: normal
severity: normal
status: open
title: tokenize.py: missing EXACT_TOKEN_TYPES
Added
Terry J. Reedy added the comment:
OK. Both are true for backspace ('\b') and return ('\r').
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23220
___
Tim Peters added the comment:
[Serhiy Storchaka]
... I want to say that double rounding causes not
only bias from ideal distribution, but a difference
between platforms
That's so, but not too surprising. On those platforms users will see
differences between primitive floating addition and
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file39903/handle_double_rounding.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24567
Joe Jevnik added the comment:
updating to address the docs and order of assertions
--
Added file: http://bugs.python.org/file39904/operator_subscript_pyonly.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Removed file: http://bugs.python.org/file39903/handle_double_rounding.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24567
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file39905/handle_double_rounding2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24567
___
Serhiy Storchaka added the comment:
Unfortunately a link to Rietveld is not available for review and inlined
comments.
In sample() the selected set can be initialized to {n} to avoid additional
checks in the loop for large population. In the branch for small population,
non-empty pool can be
Serhiy Storchaka added the comment:
I'm with Martin about tests. Only one assertion per special case is needed, no
need to write exponential number of combinations.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
Joe Jevnik added the comment:
is it normal to get a lot of 500s when using the review system?
--
Added file: http://bugs.python.org/file39906/operator_subscript_pyonly.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
Changes by Joe Jevnik j...@quantopian.com:
Added file: http://bugs.python.org/file39907/operator_subscript_pyonly.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
___
New submission from Stefan Krah:
IMO the string should start at lineno=1, col_offset=0.
$ ./python
Python 3.6.0a0 (default:02b81a82a57d, Jul 12 2015, 20:33:44)
[GCC 4.8.4] on linux
Type help, copyright, credits or license for more information.
import ast
a = ast.parse('''xxx
... yyy
...
Stefan Krah added the comment:
I think it's just a matter of checking for self-index = N in setstate().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24620
___
New submission from Neil Girdhar:
In the description of the consume recipe:
def consume(iterator, n):
Advance the iterator n-steps ahead. If n is none, consume entirely.
# Use functions that consume iterators at C speed.
if n is None:
# feed the entire iterator into a
Nick Coghlan added the comment:
As a possible starting point for this, I'll point to
https://hg.python.org/cpython/file/02b81a82a57d/Lib/test/__main__.py
Now, I'd expected running that in a process that was *already* running regrtest
to fail miserably (it would stomp all over itself).
But
Steven D'Aprano added the comment:
On Mon, Jul 13, 2015 at 01:37:26AM +, Neil Girdhar wrote:
New submission from Neil Girdhar:
In the description of the consume recipe:
[...]
iterator should be replaced with iterable. This function accepts strings for
example, which are not
New submission from 진모씨:
Well. A program linked to .py extension in windows (called py.exe) parses
hashbang line(#!) and tries to execute program.
So hashbang like this:
#!/bin/env python
doesn't works, and
#!calc
executes calculator. I guess it is bug.
--
components: Windows
New submission from Luke Jang:
As title. I installed Python using brew.
$ python
Python 2.7.10 (default, Jul 9 2015, 13:34:07)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type help, copyright, credits or license for more information.
import bsddb
Traceback (most
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24620
___
___
Serhiy Storchaka added the comment:
I originally used the {n} approach but it was less clear and it lead to a
re-selection rather than undoing the rounding. That would change the output.
In normal case j is never equal to n. In very rare cases on platforms with
double rounding the
Berker Peksag added the comment:
Thanks for the report, Julien.
The up-to-date version of the document can be found at
https://docs.python.org/devguide/documenting.html
Also, Python 3.0.1 documentation is really old and I think the The Python
documentation should follow the Apple
Serhiy Storchaka added the comment:
It would be more helpful if you sent text output instead of graphical
screenshot. Just redirect stdout and stderr of the command to the file.
make install make_install_fail.txt 21
--
nosy: +serhiy.storchaka
Raymond Hettinger added the comment:
In sample() the selected set can be initialized to {n}
I originally used the {n} approach but it was less clear and it lead to a
re-selection rather than undoing the rounding. That would change the output.
I like Tim's suggestion about import-time
Changes by Ron Barak bugs_python_org.comve...@9ox.net:
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24615
___
New submission from Ron Barak:
I wanted to add Python 2.7 to Unix.
I downloaded the sources to the VirtualBox on which the Unix is installed.
./configure is successful.
make is successful after I manually applied the changes in
http://bugs.python.org/issue24611
However, 'make install' fails
Changes by Ron Barak bugs_python_org.comve...@9ox.net:
--
components: +Installation -Build
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24615
___
Ron Barak added the comment:
I tried to apply the patch. Alas, I get an Hmm... I can't seem to find a patch
in there anywhere. error.
See attached screenshot.
Did I apply the patch incorrectly?
--
Added file: http://bugs.python.org/file39909/issue24611.PNG
Ron Barak added the comment:
When I try to apply the patch manually, namely - editing Modules/posixmodule.c,
and moving the #endif a few lines up, the make finishes correctly.
So, the patch does work: I'm probably not applying it correctly.
Could you point to my error in applying the patch?
Serhiy Storchaka added the comment:
I'm aware of issue 23974. But I want to say that double rounding causes not
only bias from ideal distribution, but a difference between platforms. The
result of sample() (with the same seed) can vary between platforms.
--
Roundup Robot added the comment:
New changeset d2b8354e87f5 by Serhiy Storchaka in branch '2.7':
Issue #24611: Fixed compiling the posix module on non-Windows platforms
https://hg.python.org/cpython/rev/d2b8354e87f5
--
nosy: +python-dev
___
Python
Changes by Joe Jevnik j...@quantopian.com:
Added file: http://bugs.python.org/file39913/operator_subscript_pyonly.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24379
___
New submission from Ron Barak:
I wanted to add Python 2.7 to Unix.
I downloaded the sources to the VirtualBox on which the Unix is installed.
./configure is successful.
make is successful after I manually applied the changes in
http://bugs.python.org/issue24611
However, 'make install' fails
Julian Sivertsen added the comment:
I bumped into a similar issue with mimetypes.guess_extension on Arch Linux
64-bit in February. The behavior is still present in python 3.4.3.
$ python test.py
.htm
$ python test.py
.html
$ cat test.py
from mimetypes import guess_extension
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24611
___
Serhiy Storchaka added the comment:
I'm not experienced with Unixware's version of the patch (perhaps it differs
from Linux version), but try to use the -p1 option.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24611
New submission from Brad Larsen:
`PyCode_New` can read invalid heap memory.
File Objects/codeobject.c:
PyCodeObject *
PyCode_New(int argcount, int kwonlyargcount,
int nlocals, int stacksize, int flags,
PyObject *code, PyObject *consts, PyObject *names,
New submission from John Jones:
os.makedirs() gives the optional variable mode to set the permissions on the
directories it creates.
While it seems to work for all triplet octal values (777,755,etc) it doesn't
seem to work on values with the sticky bit (1777,1755,etc)
I know that to set the
Stefan Krah added the comment:
The double rounding problem even occurs between different versions
of gcc. I think ultimately we should put our foot down and ship with
sse2 enabled (not possible for 2.7 though, unless an LTS-PEP emerges).
If distributions want to break that, it's their business.
eryksun added the comment:
This is not a bug, but perhaps the documentation could further clarify that the
set of valid values for the mode parameter is platform dependent. The [POSIX
specification][1] for mkdir() states that [w]hen bits in mode other than the
file permission bits are set,
New submission from Stefan Krah:
If I understand the reference manual correctly, these should probably
be rejected by the compiler:
async def f():
... def g(): pass
... async = 10
...
async def f():
... def async():
... pass
...
async def f(): async = 10
...
async def
Ron Barak added the comment:
@Serhiy,
Not only would posting text be clearer, but much easier.
Alas, the Unixware I use is on a VirtualBox, and VitualBox does not support
Guest Extension on Unixware - which means that neither cut-and-paste nor
sharing host filesystem are possible.
So, unless
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24618
___
___
Antoine Pitrou added the comment:
I think ultimately we should put our foot down and ship with
sse2 enabled
That's good for x86 but that wouldn't solve the issue if it exists on other
archs.
I trust Raymond to come up with an acceptable solution; though I think it would
be good to add a
62 matches
Mail list logo