Peter Donis added the comment:
Re my msg110822, I think I have a better solution:
have the test create a temporary txt file with
intentionally mismatched newlines, and use that as
the doctest. That means we can control the exact byte
by byte content of the txt file, without worrying about
how
Peter Donis added the comment:
Uploaded doctest-fixes5.diff with one minor correction:
removed some comments that were reminders for the py3k
version (which I'll upload shortly).
--
Added file: http://bugs.python.org/file18118/doctest-fixes5
Peter Donis added the comment:
Uploaded doctest-fixes5-py3k.diff, diff against py3k
branch implementing same improved test method as
doctest-fixes5.diff.
--
Added file: http://bugs.python.org/file18119/doctest-fixes5-py3k.diff
___
Python tracker
Peter Donis added the comment:
I don't normally run Windows, so it will take a little time
for me to set up a Windows build environment. However, I've
made a number of other improvements as a result of further testing
on Linux, and I've uploaded the improved patch as doctest-fixe
Peter Donis added the comment:
Uploaded revised diff against py3k branch, doctest-fixes6-py3k.diff,
with same improvements as doctest-fixes6.diff. Tests still pass on
my Linux box.
--
Added file: http://bugs.python.org/file18134/doctest-fixes6-py3k.diff
Peter Donis added the comment:
@Mark, I'm probably stubborn, yes. :-) Could you post verbose
output from your testing on Windows? I'd at least like to be
able to duplicate your findings; it's possible there's
somethin
Peter Donis added the comment:
@Mark, no problem, thanks for keeping up with all my patches. :-)
--
___
Python tracker
<http://bugs.python.org/issue1812>
___
___
New submission from Peter Häring :
test_distutils fails with 2.7 on a shared build (at least if building outside
the source tree), 2.6 versions work. The reason for this is, that the test
tries to link and doesn't find libpython-2.7.so.1.
A solution (or workaround) is to add LDFLAGS=-
New submission from Peter Häring :
There are systems out there, wich don't have ndbm, but gdbm and ndbm.h directly
in the include-path (usually /usr/include), not in the subdirectory i.e. gdbm.
setup.py at the moment assumes, that there is ndbm on the system, if there is
ndbm.h in the in
Changes by Peter Häring :
--
type: -> compile error
___
Python tracker
<http://bugs.python.org/issue9420>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Peter Boström :
When reading from piped stdin, python has trouble decoding some special
characters.
To reproduce, run the following command from cmd.exe:
echo ü | C:\Python31\python.exe pycat.py
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8
Peter Eckersley added the comment:
Thanks for your feedback Paul! I agree your proposed implementation strategy
would probably be saner; I'll revise the patch to use that approach or
something like it.
As for the question of necessity, there are definitely more cases than jus
Peter Waller added the comment:
I have just hit this bug and independently invented the exact fix of changing
the zero for a one. Any chance of getting this merged?
--
nosy: +Peter.Waller
___
Python tracker
<http://bugs.python.org/issue15
Peter Eckersley added the comment:
OK, here's another solution following paul.j3's suggestion. I think this is
much better:
https://gist.github.com/pde/817a00378d3f6ed73747dfffce323ae5
Tests & documentation included.
--
___
Python
Peter Otten added the comment:
Here's another way to reproduce the error. The problem seems to be in the C
implementation of _lru_cache_wrapper() / bounded_lru_cache_wrapper().
$ cat test.py
import functools
import threading
import time
@functools.lru_cache(maxsize=2)
def f(v):
time.
New submission from Peter Ebden:
In Python 2.7.13, using zipfile.ZipFile to write into a file with some initial
preamble produces a zip file that cannot be read again by some zip
implementations.
Our use case is using pex (https://github.com/pantsbuild/pex) which writes a
zip that begins with
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue29287>
___
___
Python-bugs-list mailing list
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue29290>
___
___
Python-bugs-list mailing list
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue16623>
___
___
Python-bugs-list mailing list
Peter McCormick added the comment:
Fork at
<https://github.com/pdmccormick/cpython/tree/bpo-28909-adding-lttng-ust> with
Francis' original patch, plus a revert for the DTrace provider name change.
Here are instructions I used to try this out:
## LTTng installation
Full i
Peter McCormick added the comment:
A few suggestions:
* Disallow `--with-lttngust` on anything other than Linux (on macOS
`configure` dies due to differences in acceptable `mktemp` arguments if you
even attempt it)
* Rename `cpython_inst.h` to `pytrace.h` and rename `pylttngust_probes.h` to
Peter McCormick added the comment:
Hi Łukasz, thank you for the feedback!
> "PyTrace" is already a name in use for a different purpose. I understand the
> itch to make the name more "right" but I am in general not a fan of renaming
> "PyDTrace" to anyth
New submission from Peter Cawley:
In the implementation of the IMPORT_STAR opcode, if the call to
PyFrame_FastToLocalsWithError fails, or f_locals is NULL, then control flow
jumps to the error handler without performing a decref on the "from" variable.
As the "from" variab
New submission from Peter Eisentraut:
The file Python-3.6.0a2.tgz contains paths that start with "..", e.g.,
$ tar tf Python-3.6.0a2.tgz | head
../Python-3.6.0a2/
../Python-3.6.0a2/Doc/
../Python-3.6.0a2/Grammar/
../Python-3.6.0a2/Include/
../Python-3.6.0a2/LICENSE
../Python-3
Peter Eisentraut added the comment:
The affected tar is indeed a BSD-ish tar (OS X). With GNU tar I can proceed.
It says "gtar: Removing leading `../' from member names".
So with that I agree that it's not worth re
Peter Williams added the comment:
I'm experiencing a variation of this problem on a project where I'm trying to
make an application that will work with both 2.7.x and 3.4.x
and am mostly successful. The application uses a number of pickle files
and I want to make it so that it does
Peter Eisentraut added the comment:
I understand the reasoning here, but I want to say booh to this change in
3.6.0a2 because it breaks my tests. It used to be that type(x) returned a
predictable string, and that was an easy way to verify the result types of
things.
Perhaps a __str__
Peter Otten added the comment:
Your code relies on the assumption that when the lambda is invoked the global t
is still bound to the Thread instance you are starting. It seems that this is
not always the case, and I don't see why it should be guaranteed either.
I don't know whether i
New submission from Peter Tomcsanyi:
In Python 3.4.4 (64-bit) and in many previous versions it worked like this:
>>> "%02x" % 12.99
'0c'
Now in Python 3.5.2 (64-bit) it shows an error:
>>> "%02x" % 12.99
Traceback (most recent call last):
File
Peter Tomcsanyi added the comment:
So it is even worse, it is an "intentional break".
I will need to review a few thousands lines of code because of this.
I think that breaking others' code by redefining a "built-in" operator is
acceptable when changing major versions
Changes by Peter Lovett :
--
nosy: +PeterLovett
___
Python tracker
<http://bugs.python.org/issue10716>
___
___
Python-bugs-list mailing list
Unsubscribe:
peter recore added the comment:
Here is a patch that implements Eric's suggestion. I am a new contributor and
would welcome feedback on if this is correct or not.
--
keywords: +patch
nosy: +peterrecore
Added file: http://bugs.python.org/file29815/issue9538.
peter recore added the comment:
George,
When I build the docs with my changes, the links from the method names seem to
work the same way as they do in the existing docs.
--
___
Python tracker
<http://bugs.python.org/issue9
New submission from Peter Saveliev:
Important: only Python2 versions are affected. Python3 works OK.
Possibly related issue: http://bugs.python.org/issue12378 (differs: see the
line above)
Having a server with SSLSocket waiting for connections, the incoming
connection, failed on automatic
Peter Saveliev added the comment:
Possible solution would be something like that in SSLSocket.do_handshake():
try:
self._sslobj.do_handshake()
except SSLError as e: # or even any Exception?
self._sock.close()
raise e
Peter Otten added the comment:
This is not a bug; the signature of re.sub() is
sub(pattern, repl, string, count=0, flags=0)
and the fourth argument thus the 'count' delimiting the number of substitutions
that you accidentally specify as
>>> import re
>>> re.S
16
New submission from Peter Korsgaard:
The build/real prefix handling using sed breaks if build != real and the
standard include / lib directories are used ($prefix/include and $prefix/lib).
E.G.
prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include&
New submission from Peter Santoro:
It appears that installation order matters when installing both 32bit and 64bit
versions of Python. If you install the 32bit version first, the 64bit version
will uninstall the 32bit version. Here are the steps I used:
1. Starting point (Windows 7 64bit
Peter Inglesby added the comment:
I've just hit this. Is there anything I can do to help get this fixed?`
--
nosy: +inglesp
___
Python tracker
<http://bugs.python.org/is
Shinto Peter added the comment:
please attach MIB file also
--
nosy: +shinto
___
Python tracker
<http://bugs.python.org/issue23386>
___
___
Python-bugs-list mailin
Peter Landry added the comment:
I realized my formatting was poor, making it hard to quickly test the issue.
Here's a cleaner version:
import cgi
from io import BytesIO
BOUNDARY = "JfISa01"
POSTDATA = """--JfISa01
Content-Disposition
New submission from Peter Landry:
`cgi.FieldStorage` can't parse a multipart with a `Content-Length` header set
on a part:
```Python 3.4.3 (default, May 22 2015, 15:35:46)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.49)] on darwin
Type "help", "copyright", &
Peter Lovett added the comment:
Updated patch to 3.6
urlretrieve now has a decent docstring; this patch just adds a docstring to
urlcleanup.
--
nosy: +PeterLovett
versions: +Python 3.6 -Python 2.7
Added file: http://bugs.python.org/file40121/issue-24021.patch
Peter Lovett added the comment:
Tiny change on case of Windows file 'mercurial.ini'
Although Windows is case-insensitive on filenames, the file itself is named in
lowercase (I'm using TortoiseHg v3.4.2; I'm assuming older versions of
TortoiseHg also name it in this wa
Peter Lovett added the comment:
Also a similar change to patch.rst
./python.exe
should be:
PCbuild\\python.exe
--
Added file: http://bugs.python.org/file40124/issue17570-2.patch
___
Python tracker
<http://bugs.python.org/issue17
Peter Otten added the comment:
The sniffer actually changes its "mind" in the fourth line:
Python 3.4.0 (default, Jun 19 2015, 14:20:21)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>&g
New submission from Peter Eastman:
The following script demonstrates a bug in the exec() function in Python 3.4.
(It works correctly in 2.7).
script = """
print(a)
print([a for i in range(5)])
"""
exec(script, globals(), {"a":5})
It produces the fol
Peter Eastman added the comment:
I don't believe that explanation is correct. You can just as easily get the
same problem without explicitly passing a map to exec(). For example:
def f():
script = """
print(a)
print([a for i in range(5)])
"""
a
Peter Eastman added the comment:
Then fix the documentation. This behavior directly contradicts the
documentation of the exec() function. The question is not what scope the
comprehension runs in, it's what scope the script runs in. See my third
example. A comprehension in the f() fun
Peter Landry added the comment:
Yeah, I think that makes the most sense to me as well. I tried to make a
minimum-impact patch, but this feels cleaner.
If we remove the Content-Length header, the `limit` kwarg might occur at an odd
place in the part itself, but that feels unavoidable if
Peter Landry added the comment:
A new patch that simply removes Content-Length from part headers when present.
--
Added file: http://bugs.python.org/file40145/cgi_multipart.patch
___
Python tracker
<http://bugs.python.org/issue24
Peter Otten added the comment:
Have you considered writing your own little sniffer? Getting it right for your
actual data is usually easier to achieve than a general solution.
The following simplistic sniffer should work with your samples:
def make_dialect(delimiter):
class Dialect
Peter Landry added the comment:
Pradeep, that error seems to be in Barbican. This bug and patch only addresses
content-length headers in MIME multipart messages.
--
___
Python tracker
<http://bugs.python.org/issue24
Peter Bray added the comment:
While I have not tested the patch provided, the following ls(1) command on Sun
Solaris 10 Update 8 and Oracle Solaris 10 Update 11, show that on (at least)
X86 systems, there is no -lcrypt for 64-bit builds. So a patch is required on
64-bit builds, and possibly
Peter Law added the comment:
Awesome, thanks for fixing this.
--
nosy: +PeterJCLaw
___
Python tracker
<http://bugs.python.org/issue23600>
___
___
Python-bug
New submission from Peter Brady:
The SymPy project (https://github.com/sympy/sympy) makes heavy use of caching
to speed up the creation of symbols and expressions. If available, we make use
of the fastcache library (https://github.com/pbrady/fastcache) - an lru_cache
written in C. Otherwise
Peter Brady added the comment:
As a sanity check I removed the stored hashvalue in Raymond Hettinger's
backported lru_cache (which we use to support 2.6-3.2) and end up with errors
as well. So it seems like 24483 is the appropriate fix to restore the old
behavior. Thanks for looking
Changes by Peter Funk :
--
nosy: +pefu
___
Python tracker
<http://bugs.python.org/issue20658>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Changes by Peter Funk :
--
nosy: +pefu
___
Python tracker
<http://bugs.python.org/issue4926>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Peter Donis added the comment:
I am having the same problem; the error occurs in the call to the login method
of the smtplib.SMTP object. That method takes two arguments, username and
password, and that is what I am calling it with.
--
nosy: +pdonis
Peter Donis added the comment:
Investigating further, the problem appears to be with the SSLFakeFile object
used for SSL/TLS connections. Here is a console session showing the issue (I
have redacted the host name and port number used for privacy reasons):
>>> import smtplib
Peter Donis added the comment:
It looks like this was fixed some time in between my Python 3.2 version (3.2.3)
and the current one (3.2.6); the code in the current 3.2 head in the repository
has a size parameter in the readline function for SSLFakeFile:
https://hg.python.org/cpython/file/3.2
New submission from Peter Wirtz:
After changeset http://hg.python.org/lookup/dbed7cacfb7e, calling the
crawl_delay method for a robots.txt files that has a crawl-delay for *
useragents always returns None.
Ex:
Python 3.6.0a0 (default:1aae9b6a6929+, Oct 9 2015, 22:08:05)
[GCC 4.2.1
Peter Wirtz added the comment:
This fix breaks the unit tests though. I am not sure how to go about checking
those as this would be my first contribution to python and an open source
project in general.
--
___
Python tracker
<h
Peter Wirtz added the comment:
On further inspection of the tests, it appears that the way in which the tests
are written, a test case can only be tested for one useragent at a time. I will
attempt to work on the tests so work correctly. Any advice would be much
appreciated
Peter Wirtz added the comment:
Ok, for the mean time, I reworked the test so it appears to test correctly and
tests passes. There does seem to be some magic, so I do hope I did not overlook
anything. Here is the new patch.
--
Added file: http://bugs.python.org/file40784
Peter Wirtz added the comment:
I would like to tackle this issue. Should I wait for issue25400 to be resolved
first?
--
nosy: +pwirtz
___
Python tracker
<http://bugs.python.org/issue21
Peter Wirtz added the comment:
Here is a patch that provides support for the Sitemap extension.
--
keywords: +patch
Added file: http://bugs.python.org/file40791/robotparser_site_maps_v1.patch
___
Python tracker
<http://bugs.python.org/issue21
New submission from Peter Pan:
When handling the transfer socket manually the asynchronous status message "226
transfer complete" on the control socket is falsely taken as response for the
last sent command.
ftplib reads the response too late and the command/response order becomes
i
Peter Otten added the comment:
How would you disambiguate -1 and (for example) 2**64-1 on a 64-bit machine?
Python's int is not limited to a specific number of bits.
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/is
Peter Otten added the comment:
There seems to be a connection to hash randomization. I consistently get
$ PYTHONHASHSEED=1 python3.6 ./normbug.py
BUG ('The aenid oevre', '!=', 'The AEnid oevre')
$ PYTHONHASHSEED=0 python3.6 ./normbug.py
OK ('The A
Peter Otten added the comment:
Not a bug. In your XFORMS dict you have
>>> ord("Æ") == 0xC6
True
Whether the value of "Æ" or 0xC6 is used by str.maketrans() depends on the
order of the dict entries which in turn is determined by the keys' hash. Remove
Peter Brady added the comment:
Yes. The patch you suggested restores the old behavior of the lru_cache.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Peter Pan added the comment:
The problem in my example is ftplib reports a "226" response to command "NOOP"
which is nonsense. ftplib received "226" before "ftp.sendcmd('NOOP')" was
called.
Since "transfercmd()" returns a soc
Peter Pan added the comment:
I've updated "ftplib.py" from the 3.5.1 source code release.
This should fix issues:
http://bugs.python.org/issue25458
http://bugs.python.org/issue25491
--
Added file: http://bugs.python.org/file
Peter Pan added the comment:
Here is a small test for the new version.
(To see the original ftplib.py version failing copy+paste the code from my
initial post into a python file and run)
--
Added file: http://bugs.python.org/file42100/test_ftp.py
New submission from Peter Inglesby:
The line:
assert int(status[:3]),"Status message must begin w/3-digit code"
should be something like:
assert status[:3].isnumeric(), "Status message must begin w/3-digit code"
--
components: Library (Lib)
messages: 261773
no
Peter Inglesby added the comment:
I can reproduce it reliably.
I ran ./configure with --with-pydebug.
I'm not using NFS, and I'm not aware of anything else unusual about my
filesystem.
The fact that a timestamp overflows in the failing test is a red herring -- the
following also f
Peter Inglesby added the comment:
The problem is that I have PYTHONDONTWRITEBYTECODE set in my environment.
Should the setUp and tearDown methods ensure that PYTHONDONTWRITEBYTECODE is
cleared and reset?
--
___
Python tracker
<h
Peter Inglesby added the comment:
I found it while reading the source. Patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file42188/issue26560.patch
___
Python tracker
<http://bugs.python.org/issue26
New submission from Peter Inglesby:
I get the following test failure against changeset 100576 on OSX 10.9.5:
$ ./python.exe -m test test_import
[1/1] test_import
test test_import failed -- Traceback (most recent call last):
File "/Users/peteringlesby/src/cpython/Lib/test/test_import/__i
New submission from Peter L:
Cross-compiling python-3.5.x fails with "Parser/pgen: Parser/pgen: cannot
execute binary file" (CBUILD="x86_64-pc-linux-gnu" and
CHOST="armv7a-hardfloat-linux-gnueabi").
python-3.5.x requires "pgen" and "_freeze_imp
Peter L added the comment:
Originally posted:
https://bugs.gentoo.org/show_bug.cgi?id=581304
--
keywords: +patch
Added file: http://bugs.python.org/file42654/python-3.5-crosscompile.patch
___
Python tracker
<http://bugs.python.org/issue26
Peter L added the comment:
Hmmm. Solves half the problem. Still fails when trying to run
"_freeze_importlib".
This works though:
https://hg.python.org/cpython/rev/66e40df31fac
--
___
Python tracker
<http://bugs.python.o
Peter L added the comment:
Gonna close it since it seems to be related to
http://bugs.python.org/issue22359
and solved with
https://hg.python.org/cpython/rev/66e40df31fac
--
resolution: -> duplicate
status: open -> closed
___
Python t
New submission from Peter Norvig:
mean([True, True, True, False]) should be 0.75, but it returns 0.25.
The fix is to change _sum so that when the type is bool, the result should be
coerced to int, not bool.
Why it is important for statistics.mean to work with bools:
It is natural to say
Peter Inglesby added the comment:
Given the difference between the documented and the actual behaviours, and
given that it's apparently not obvious what the correct fix should be, would a
patch that updates the docs (to say that %Z only matched GMT and UTC) be
welcome?
--
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue23551>
___
___
Python-bugs-list mailing list
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue23495>
___
___
Python-bugs-list mailing list
Changes by Peter Otten <__pete...@web.de>:
--
nosy: +peter.otten
___
Python tracker
<http://bugs.python.org/issue23639>
___
___
Python-bugs-list mailing list
New submission from Peter Marsh:
Hello,
Reasonably frequently I find myself needing to pass a date as a command line
argument to a Python script I've written. Currently, argparse does not have a
built support for dates - this adds a new class to argparse (much like the
existing Fil
Peter Marsh added the comment:
The consensus seems to be that this is simple enough for people to implement
themselves (if they need it) and it's probably not worth adding to argparse, so
I've closed this :)
--
resolution: -> rejected
status: o
Changes by Peter McCormick :
--
nosy: +pdmccormick
___
Python tracker
<http://bugs.python.org/issue10933>
___
___
Python-bugs-list mailing list
Unsubscribe:
Peter McCormick added the comment:
Removed unrelated doc changes.
--
Added file: http://bugs.python.org/file38909/issue_10933-2.patch
___
Python tracker
<http://bugs.python.org/issue10
Peter McCormick added the comment:
I am working on revising the Argument Clinic definitions for socketmodule.c.
--
nosy: +pdmccormick
___
Python tracker
<http://bugs.python.org/issue20
Changes by Peter McCormick :
--
nosy: +pdmccormick
___
Python tracker
<http://bugs.python.org/issue23935>
___
___
Python-bugs-list mailing list
Unsubscribe:
Peter McCormick added the comment:
This definitely works for the _socket.listen use case!
In terms of generating such a signature using Argument Clinic, currently this
is required:
backlog: int(py_default="builtins.min(SOMAXCONN, 128)",
c_default="Py_MIN(SOMAXCONN, 128
Peter McCormick added the comment:
I missed the fact that Larry's patch obviates the need for the `builtins.`
prefix, shortening the Argument Clinic parameter specification into:
backlog: int(py_default="min(SOMAXCONN, 128)", c_default="Py
Changes by Peter McCormick :
--
nosy: +pdmccormick
___
Python tracker
<http://bugs.python.org/issue20175>
___
___
Python-bugs-list mailing list
Unsubscribe:
Peter McCormick added the comment:
The smallest of typo fixes.
--
Added file: http://bugs.python.org/file39068/pdm-iofile_typo-v1.patch
___
Python tracker
<http://bugs.python.org/issue20
501 - 600 of 672 matches
Mail list logo