STINNER Victor added the comment:
Oh, by the way, using 32 bits unsigned integers would avoid all the
0x everywhere.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23488
___
STINNER Victor added the comment:
The (unsigned long) declaration should probably be replaced with (uint32_t)
Would it be possible to benchmark this change, to ensure that it doesn't kill
performances?
A quick micro-benchmark using timeit should be enough ;)
I agree with the change, I
Serhiy Storchaka added the comment:
PC/python_ver_rc.h now is not compatible with clinic.py.
$ ./python Tools/clinic/clinic.py --make
Traceback (most recent call last):
File Tools/clinic/clinic.py, line 4204, in module
sys.exit(main(sys.argv[1:]))
File Tools/clinic/clinic.py, line 4184,
Berker Peksag added the comment:
Terry, would you like to move this forward with the Python.org webmasters ?
This is now a content issue and can be handled on GitHub:
https://github.com/python/pythondotorg/issues
--
nosy: +berker.peksag
resolution: - fixed
stage: needs patch -
New submission from juj:
When Multiprocessing.Pool.map is used for a script that registers atexit
handlers, the atexit handlers are not executed when the pool threads quit.
STR:
1. Run attached file in Python 2.7 with 'python task_spawn.py'
2. Observe the printed output.
Observed:
Console
Serhiy Storchaka added the comment:
May be document this recommendation somewhere? If there is crossplatform script
that tests buildbot configuration, may be add checks for locales in it?
--
___
Python tracker rep...@bugs.python.org
Alex Shkop added the comment:
Replaced %s;%s;%s with ';'.join() call.
--
Added file: http://bugs.python.org/file38184/wsgiref_test_environ_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23477
Antoine Pitrou added the comment:
Yes, I noticed this when reimplementing the random module in Numba.
*Theoretically*, I think you need long to ensure ints are at least 32 bits.
But in practice, I think CPython already needs 32-bit C ints.
(note Numpy also uses C longs internally)
Would it
Changes by Antoine Pitrou pit...@free.fr:
--
versions: -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23488
___
___
Antoine Pitrou added the comment:
Unfortunately, this is the kind of thing that must be asked individually to
each buildbot owner.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23472
___
Martin Panter added the comment:
Issue 4395 is already open for the != delegating to __eq__ issue that Guido
pointed out earlier.
Yet another issue that this doc patch should solve: Issue 22000.
I am posting v13 of the patch that works with the current “default” (3.5)
branch. Minor
Berker Peksag added the comment:
This is a different issue than #23439. BaseHTTPRequestHandler.headers
documentation mentions about parse_headers function, the function itself is not
documented. See
https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler.headers
juj added the comment:
This was tested on Python 2.7.9 64-bit on Windows 8.1, however I believe that
it occurs equally on OSX and Linux, since I am running servers with those OSes
that also exhibit temp file leaking issues (although I did not specifically
confirm if the root cause is the same
Ethan Furman added the comment:
Oh, and the slowdown dropped from 20 to 3 (for non-DynamicClassAttributes --
which is probably more than 99% of them).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23486
Ethan Furman added the comment:
Out of curiousity I tried: took two new lines, one modified line, and one
comment. :)
--
keywords: +patch
Added file: http://bugs.python.org/file38182/issue23486.stoneleaf.01.patch
___
Python tracker
Changes by Ned Deily n...@acm.org:
--
nosy: +davin, sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23484
___
___
Python-bugs-list mailing list
STINNER Victor added the comment:
I don't understand the patch, but 3x slower instead of 20x slower is a huge
optimization :-) Do you plan to change Python 3.5 *and* Python 3.4?
--
nosy: +haypo
versions: +Python 3.5
___
Python tracker
Roundup Robot added the comment:
New changeset 43641e03692a by Berker Peksag in branch '2.7':
Issue #21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty
https://hg.python.org/cpython/rev/43641e03692a
--
___
Python tracker
Changes by Berker Peksag berker.pek...@gmail.com:
--
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21548
___
New submission from Raymond Hettinger:
The Modules/_randommodule.c implements the 32-bit version of the
MersenneTwister and its struct uses (unsigned long) for each of the 624
elements of the state vector.
On a 32-bit build, the unsigned longs are 4 bytes. However, on a 64-bit build,
they
Serhiy Storchaka added the comment:
Messages tend to be abbreviated, so I think that it would be better to just
omit the article.
I agree, but this is came from standard error messages which are not
consistent. I opened a thread on Python-Dev.
expected a bytes-like object and expected str
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
components: +Extension Modules
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23488
___
R. David Murray added the comment:
What is your objection to len(b)? When I read len(b) I know exactly what
it means. When I read the number of bytes in b, I have to think about it it,
because it could mean the number of bytes that that b is long or the number
of bytes that have been
paul added the comment:
And a nice error:
Debug memory block at address p=0x805fc028: API 'o'
0 bytes originally requested
The 3 pad bytes at p-3 are FORBIDDENBYTE, as expected.
The 4 pad bytes at tail=0x805fc028 are not all FORBIDDENBYTE (0xfb):
at tail+0: 0x00 *** OUCH
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23350
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
stage: - patch review
versions: -Python 3.3, Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22931
___
New submission from Paul Moore:
This is the patch for PEP 441 (Zip Application Support).
Steve, could you check the installer changes, please? I haven't managed to get
a setup where I can test the installer, and I'm not aware of any WiX coding
tools, so I just edited the XML files by hand
Berker Peksag added the comment:
Fixed. Thanks to both of you :)
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23442
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +benjamin.peterson, haypo, serhiy.storchaka
type: crash - security
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23490
___
Berker Peksag added the comment:
LGTM. I left a comment for Serhiy on Rietveld.
--
stage: needs patch - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21793
___
New submission from paul:
# Bug
# ---
#
# Py_UNICODE *
# PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size)
# {
# ...
# #endif
# wchar_t *w;
# wchar_t *wchar_end;
#
# ...
# 1 _PyUnicode_WSTR(unicode) = (wchar_t *)
PyObject_MALLOC(sizeof(wchar_t) *
#
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
stage: - patch review
versions: -Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22928
___
Roundup Robot added the comment:
New changeset 52d37efaf939 by Berker Peksag in branch 'default':
Issue #23442: Rename two member names to stay backward compatible
https://hg.python.org/cpython/rev/52d37efaf939
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
Because it is not len(b). I fixed several bugs in Python code which called
len() for bytes-like argument and failed with array.array or memoryview with
non-byte items.
The term bytes-like object is slightly misleading. In some cases it implies
indexing and
Serhiy Storchaka added the comment:
Does not changing __str__ to decimal representation (and in this case __str__ =
int.__str__ may be better) lost a part of the point of converting HTTP status
codes to enums?
--
___
Python tracker
Steve Dower added the comment:
I haven't looked closely at the rest, btw. Will try and find time today or
tomorrow.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23491
___
R. David Murray added the comment:
How about the length of b in bytes?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20699
___
___
Martin Panter added the comment:
Using len(b) is fine if b is a bytes() or bytearray() object, but a bytes-like
object can be anything that you can pass to memoryview(). In general len(b) is
not part of that protocol, so can return some other value, or even be
unimplemented:
from array
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23491
___
___
Steve Dower added the comment:
The installer changes look fine, though there shouldn't be PATH related strings
in exe/, so there's probably a separate issue there. Wix doesn't really have
any editors that aren't just XML editors.
We probably want to update the ContentType value from
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +davin, sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23489
___
___
New submission from Serhiy Storchaka:
Proposed patch improve generated parsers for functions with single positional
argument. Now they always generated as METH_O and PyArg_Parse() is used to
parse single argument.
To avoid code churn in this and following changes it would be worth to extract
Roundup Robot added the comment:
New changeset f4f2096ab6f8 by Brett Cannon in branch 'default':
Issue #22834: Fix a failing test under Solaris due to the platform not
https://hg.python.org/cpython/rev/f4f2096ab6f8
--
___
Python tracker
Wolfgang Maier added the comment:
am I correct that when a script contains a shebang line like:
#! python3
or
#! python3.4
i.e., one indicating just a version of, but not a full path to the interpreter,
the current patch would not use an active virtualenv even if it has a suitable
version
Serhiy Storchaka added the comment:
Sorry, I didn't find any issues with the last patch. Could you please point on
them?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11145
___
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/issue21934
___
R. David Murray added the comment:
the tzinfo object is responsible for handling daylight savings time. This
looks like a bug in pytz.
--
components: +Library (Lib) -Distutils
nosy: +belopolsky, r.david.murray -dstufft, eric.araujo
___
Python
John Nagle added the comment:
The fix in Ubuntu was to the Ubuntu certificate store, which is a directory
tree with one cert per file, with lots of symbolic links with names based on
hashes to express dependencies. Python's SSL isn't using that. Python is
taking in one big text file of SSL
juj added the comment:
While the test case can be 'fixed' by changing the code to use if __name__ ==
'__main__', and I'm ok to do it in my code to work around the problem, I would
argue the following:
1) calling this not a bug (or solving it only at documentation level) does not
at all feel
Martin Panter added the comment:
+1 to EINVAL, also the bug reference comment is redundant with the one at the
top of the test case :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22834
Roundup Robot added the comment:
New changeset 7052206ad381 by Serhiy Storchaka in branch '2.7':
Issue #5700: io.FileIO() called flush() after closing the file.
https://hg.python.org/cpython/rev/7052206ad381
New changeset 36f5c36b7704 by Serhiy Storchaka in branch '3.4':
Issue #5700:
Demian Brecht added the comment:
On Feb 20, 2015, at 2:50 PM, Serhiy Storchaka rep...@bugs.python.org wrote:
if isinstance(code, HTTPStatus):
code = '%d' % code
That’s what I’m intending on doing. It’s definitely not as contained as
changing the __str__ implementation of HTTPStatus.
Davin Potts added the comment:
Interesting! The documentation in 3.4 as well as 2.7 indicates that the
keyword should be 'blocking' yet the code implements this as 'block'.
Code to reproduce empirically what is actually implemented:
import multiprocessing
dummy_lock = multiprocessing.Lock()
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/issue23374
___
Davin Potts added the comment:
There are at least two issues at play here.
Running the attached file on OS X produces starkly different results -- console
prints:
CREATED TEMP DIRECTORY
/var/folders/s4/tc1y5rjx25vfknpzvnfh1b14gn/T/temp_z6I0BA
task1
task2
ATEXIT: REMOVING TEMP DIRECTORY
Serhiy Storchaka added the comment:
Agree, the test in test_fileio is redundant.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5700
___
___
R. David Murray added the comment:
The error message could indeed be made clearer by turning it into a message
that tokenize itself requires bytes input. Or, more likely, the additional
error handling needs to be in detect_encoding.
--
___
Python
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/issue5700
___
New submission from Steven Barker:
The documentation for the csv.writer.writerows method says that it expects a
list of row objects, when it really will accept any iterable that yields rows
(such as a generator). While it's often nice for code to be more accepting than
the documented
Roundup Robot added the comment:
New changeset e7b6b1f57268 by Serhiy Storchaka in branch '3.4':
Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
https://hg.python.org/cpython/rev/e7b6b1f57268
New changeset affe167a45f3 by Serhiy Storchaka in branch 'default':
Issue
Roundup Robot added the comment:
New changeset af8089217cc6 by Serhiy Storchaka in branch '2.7':
Issue #23215: Multibyte codecs with custom error handlers that ignores errors
https://hg.python.org/cpython/rev/af8089217cc6
New changeset 4dc8b7ed8973 by Serhiy Storchaka in branch '3.4':
Issue
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/issue23215
___
Martin Panter added the comment:
Posting a new patch, rebased against the recent “default” (3.5) branch:
* Tweaked so that sentences start with a capital letter
* Added _Pointer.contents
--
Added file: http://bugs.python.org/file38195/arrays-pointers.v3.patch
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.r
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23492
___
___
Davin Potts added the comment:
Of course, there's code in the wild that expects and uses the parameter named
'block' so simply changing this keyword will result in breaking others' code.
Two potentially appealing options:
1) Document that acquire in multiprocessing differs from threading in
Martin Panter added the comment:
I think you will find the error logging was already fine, since it already uses
%d:
127.0.0.1 - - [21/Feb/2015 04:02:06] code 404, message File not found
127.0.0.1 - - [21/Feb/2015 04:02:06] GET /nonexistant HTTP/1.1
HTTPStatus.NOT_FOUND -
The new codes in
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20204
___
___
Davin Potts added the comment:
You make an overall valid point that despite reading the documentation, the
resulting behavior of your code was not what you expected -- I take that
specific complaint very seriously anytime anyone makes it.
Regarding your recommendations:
I) Unfortunately
Steven Barker added the comment:
Another Stack Overflow user pointed out that the DictWriter's writerows
implementation (in pure Python) unnecessarily converts whatever its argument is
into a list in memory before passing it on to the builtin writer.writerows
method which would accept any
Serhiy Storchaka added the comment:
Benjamin, what are your thoughts as RM?
Something similar should be applied to 3.x because PyObject_AsWriteBuffer()
is deprecated and not safe.
Done in issue22896.
--
nosy: +benjamin.peterson
___
Python
Josh Rosenberg added the comment:
Is it even legal to have non-string keys in a JSON object? If they must be
strings, and they must be unique, I don't think a key argument is necessary
(and it would save the generation of the key array; not doing the work is
faster than doing the work more
Demian Brecht added the comment:
Latest patch should address all comments. It also fixes the same issue in error
logging which wasn’t previously accounted for. The test file has also been
updated with using HTTPStatus where possible rather than hard coded ints. This
is consistent with other
Pavel Roskin added the comment:
I have tested the patch. It fixes the problem for me.
You are right, new programs would just supply translated help to the version
action. No effort would be saved.
But the programs updated from the deprecated syntax may rely on a separate
string list for
Nikolaus Rath added the comment:
Attached is a patch for the bz2 module.
--
Added file: http://bugs.python.org/file38194/issue15955_bz2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15955
Paul Moore added the comment:
Thanks for checking, Steve. I don't get an installer because of the checksum
error quoted, although I did get the component msi files.
As far as content type is concerned, I wasn't sure what effect it had so I just
copied what was there. I guess application/zip
Brett Cannon added the comment:
Thanks for the suggestion, Martin. Went with a variant of what you proposed.
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22834
Paul Moore added the comment:
That's correct. The problem here is that it's not possible to know what version
of Python a virtualenv has (at least, not without running it, which isn't
appropriate in the launcher). So the only case it's possible to support is
#!python.
--
Demian Brecht added the comment:
On Feb 20, 2015, at 3:10 AM, Berker Peksag rep...@bugs.python.org wrote:
This is a different issue than #23439. BaseHTTPRequestHandler.headers
documentation mentions about parse_headers function, the function itself is
not documented.
Not entirely sure
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23422
___
Wolfgang Maier added the comment:
isn't the pyvenv.cfg file specifying the version ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23465
___
Changes by Demian Brecht demianbre...@gmail.com:
Added file: http://bugs.python.org/file38190/issue22928_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22928
___
Paul Moore added the comment:
Hmm, I didn't know that (although virtualenv-based environments don't have an
equivalent to pyvenv.cfg).
But there's some confusion here. This patch only affects command line usage
(running py.exe to start Python). I don't really see a use case for making
py -3
Steve Dower added the comment:
Either application/zip or application/x-zip-compressed, I'm not sure
exactly what the difference is, but the default .zip association has the latter.
The CRC error may be your machine or it may be because we're currently running
on unstable WiX releases (hey,
New submission from Wouter Bolsterlee:
The JSON encoder uses a lambda function for the sort(key=...) invocation used
to sort the keys in a JSON object in case sort_keys=True is passed:
https://hg.python.org/cpython/file/46bfddb14cbe/Lib/json/encoder.py#l352
Instead of having a lambda,
Roundup Robot added the comment:
New changeset 46bfddb14cbe by Brett Cannon in branch 'default':
Issue #23422: Clarify some things around importlib.import_module()
https://hg.python.org/cpython/rev/46bfddb14cbe
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
Here is a patch. There is yet one similar bug in unicodeobject.c.
--
keywords: +patch
stage: - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file38189/issue23490.patch
___
Python tracker
Demian Brecht added the comment:
On Feb 19, 2015, at 8:08 PM, Martin Panter rep...@bugs.python.org wrote:
I guess you saying RemoteDisconnected effectively means the same thing as
ConnectionResetError.
Exactly.
Would it help if it was derived from ConnectionResetError, instead of the
Serhiy Storchaka added the comment:
May be better use errno.EINVAL?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22834
___
___
Steve Dower added the comment:
Digging around the likely encodings to be running on Windows machines, it looks
like 0xA9 is always the right symbol, so that change should be fine.
--
___
Python tracker rep...@bugs.python.org
Wolfgang Maier added the comment:
Hmm, I didn't know that (although virtualenv-based environments don't have an
equivalent to pyvenv.cfg).
Well, that complicates things then :(
But there's some confusion here. This patch only affects command line usage
(running py.exe to start Python).
Serhiy Storchaka added the comment:
I afraid that adding source file that can't be easy handled by Unix text tools
(such as diff) is not good idea. Does \xa9 work?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23018
Serhiy Storchaka added the comment:
I think it looks fine except why do you cast PyUnicode_LENGTH to size_t in
the comparison?
To silence compiler warning. PyUnicode_LENGTH is signed, right hand is
unsigned.
I also wonder if we should have PyObject_NEW now.
We have PyObject_NEW.
Steve Dower added the comment:
Looks like the .rc files should actually be UCS-2, since that's how the strings
are going to be stored into the executables.
If I rename the .h file to .h_ (and change the encoding to UCS-2 with BOM),
will it be ignored by argument clinic?
--
Demian Brecht added the comment:
The updated patch addresses comments which I’d somehow missed previously, but
keeps the log fix to the __str__ implementation of HTTPStatus (using
int.__str__ rather than format()).
Does not changing __str__ to decimal representation (and in this case __str__
Paul Moore added the comment:
Thanks. Updated patch with the new mime-type.
Looks like there's disk errors on that file with the CRC check. Lovely :-)
--
Added file: http://bugs.python.org/file38192/pep441.patch
___
Python tracker
Paul Moore added the comment:
On 20 February 2015 at 16:31, Wolfgang Maier rep...@bugs.python.org wrote:
The scope of this PEP is just to make the py command (with no explicit
version) use an active virtualenv before falling back to the default Python.
This is specifically to allow people
Benjamin Peterson added the comment:
I think it looks fine except why do you cast PyUnicode_LENGTH to size_t in the
comparison?
I also wonder if we should have PyObject_NEW now.
--
stage: patch review -
versions: -Python 3.5
___
Python tracker
Serhiy Storchaka added the comment:
Here is a patch. It also optimizes getrandbit() and seed() as was originally
proposed in issue16496.
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23488
Roundup Robot added the comment:
New changeset 843a8ee94270 by Steve Dower in branch 'default':
Closes #23018: Replace copyright symbol with escape.
https://hg.python.org/cpython/rev/843a8ee94270
--
resolution: - fixed
stage: - resolved
status: open - closed
Larry Hastings added the comment:
I'm not opposed to the patch in principle. I assume your goal is to make
Python faster--do you have any data on how much faster?
I don't support immediately changing all uses of Argument Clinic to generate
their code into a separate file. I would want to
1 - 100 of 118 matches
Mail list logo