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 rep...@bugs.python.org
http://bugs.python.org/issue16482
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
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.
If this gets installed with make
Changes by Peter p.j.a.c...@googlemail.com:
--
nosy: +maubp
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21872
___
___
Python-bugs-list mailing
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
I recommend that you use a keyword
New submission from Peter Wu:
Files created by `git archive` are not understood by the Python interpreter.
This could be caused by the additional comment (for the commit hash) in the
file.
echo 'print(1)' __main__.py
git init git add __main__.py git commit -m init
git archive --format=zip
Peter Bray added the comment:
Terry,
I no longer have easy access to SPARC64 systems (they are in boxes), so
unfortunately I will not be able to contribute to this issue in the near
future.
Peter
--
components: -Tests
___
Python tracker rep
Changes by Peter Otten __pete...@web.de:
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22240
___
___
Python-bugs-list
New submission from Peter Wu:
I had a stale ~/.gdbinit file which tried to executed python code causing an
exception. The tests should probably run with `-nx` or `-nh` to avoid reading
~/.gdbinit.
--
components: Tests
messages: 225245
nosy: lekensteyn
priority: normal
severity: normal
New submission from Peter Inglesby:
A script called token.py that imports anything that ends up importing tokenize,
such as logging, triggers the following error when the script is run:
$ cat token.py
import tokenize
$ python3 token.py
Traceback (most recent call last):
File token.py, line
Peter Santoro added the comment:
I believe I may have hit a related issue yesterday. I'm using Python 3.3.5 (32
and 64 bit) and 3.4.1 (32 and 64 bit) releases all on the same Windows
7SP1/64bit PC (patched with latest MS updates). The Tkinter applications that
I wrote and have been using
Changes by Peter Otten __pete...@web.de:
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5950
___
___
Python-bugs-list mailing
Peter Otten added the comment:
Here's a simpler demo for what I believe you are experiencing:
$ mkdir package
$ cd package/
$ touch __ini__.py module.py
$ export PYTHONPATH=..
$ python3
Python 3.3.2+ (default, Feb 28 2014, 00:52:16)
[GCC 4.8.1] on linux
Type help, copyright, credits or license
Peter Kruse added the comment:
Fascinating, you are right, very good, thanks for your time and looking into
this.
Peter
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19186
Peter Inglesby added the comment:
It was actually through playing with aiohttp that I first hit this issue. I
think I originally hit the problem with something like:
import asyncio
import aiohttp
@asyncio.coroutine
def do_work(future):
response = yield from aiohttp.request('get', 'http
New submission from Peter Inglesby:
The following code causes a segfault when run under Python3.4+ on OSX10.9.
# segfaulter.py
import asyncio
class A:
pass
class B:
def __init__(self, future):
self.future = future
def __del__(self):
self.a = None
Peter Otten added the comment:
As every beginner will learn about (and probably overuse) range() pretty soon I
think it's OK to use that form.
The math-inspired notation [0, 255] may be misinterpreted as a list. You also
lose the consistency of preferring half-open intervals everywhere
Peter Santoro added the comment:
It seems clear to me that the logic in shutil._unpack_zipfile that silently
skips paths that start with '/' (indicates absolute path) or that contain
references to the parent directory ('..') was added to prevent malicious zip
files from making potential
Peter Kruse added the comment:
Hello,
it seems that the solution to this issue causes the failure to
compile the pyexpat extension in my case. If I do not include
pyexpatns.h in expat_external.h then the compile succeeeds.
I will attach the output for both cases. There was no problem
Changes by Peter Kruse pjo...@gmail.com:
Added file: http://bugs.python.org/file34510/without-pyexpatns.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19186
Peter Eisentraut added the comment:
No, the second use should not be converted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11122
New submission from Peter Santoro:
Since Python 3.3.1, ZipFile.extractall was enhanced to better handle absolute
paths and illegal characters. The associated logic within
shutil._unpack_zipfile essentially skips zip members with these issues.
If a zip file contains all absolute paths
Peter Santoro added the comment:
I've attached a zip file which contains a test script and test zip files for
the previously submitted Python 3.3.5 patch. See the included README.txt for
more information. To view the contents of the included bad.zip file, use the
following command:
unzip
New submission from Peter Otten:
The documentation for
copyreg.pickle(type, function, constructor=None)
has the sentence
TypeError will be raised if *object* is a class or *constructor* is not
callable.
It's not clear to me what object refers to. I believe it refers to the first
arg
Changes by Peter Otten __pete...@web.de:
--
keywords: +patch
Added file: http://bugs.python.org/file34263/copyreg.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20823
Peter Otten added the comment:
No, that's not an error. Given a class MyClass and an instance x of that class
class MyClass:
... def f(self): return 42
...
x = MyClass()
you usually invoke a method like so:
x.f()
42
But it is also possible to break that in two steps
(1) get the bound
Peter Otten added the comment:
From looking at the sentinel code it appears a sentinel's identity is
controlled by its name alone, i. e.
sentinel.foo is sentinel.foo
If that's the desired behaviour it is well possible to make that indentity
survive pickling. I have attached a demo script
Peter Otten added the comment:
I have no experience with unittest.mock, so I'm in no position to contradict...
Vlastimil, could you give your use case?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20804
Peter Otten added the comment:
Assuming that the current behaviour is by accident here's a patch that adds the
bytes type to the _copy_dispatch registry.
--
keywords: +patch
nosy: +peter.otten
Added file: http://bugs.python.org/file34244/copy_bytes.patch
Peter Otten added the comment:
This is expected. You cannot run/import 2.6 .pyc files in python 2.7 because
the file format has changed.
$ echo 'print hello' tmp.py
$ python2.6 -c 'import tmp'
hello
$ rm tmp.py
$ python2.7 -c 'import tmp'
Traceback (most recent call last):
File string
Peter Otten added the comment:
I did sign today (and received the confirmation email).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20791
Peter Funk added the comment:
A recently posted proof of concept exploit got a lot of attention:
https://www.trustedsec.com/february-2014/python-remote-code-execution-socket-recvfrom_into/
I suggest some Python core developer should clarify here whether people running
some publically
Peter Otten added the comment:
Perhaps a look at the competition is still in order: Java silently breaks such
an invalid CDATA in two, as suggested.
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.htm says
No lexical check is done on the content of a CDATA section
Peter Otten added the comment:
Hm, I would expect that in 99 times out of 100 the extra list(...) would be
removed in a manual step following the automated conversion.
I'd really like to see the non-contrived example with a justified use of this
evil side effect ;)
--
nosy
Changes by Peter Otten __pete...@web.de:
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20714
___
___
Python-bugs-list
Peter Otten added the comment:
Do you expect many use cases that rely on items(), keys(), and values() being
lists?
Maybe it would be acceptable to make these lazy in 3.5, but keep the iterXXX()
variants as aliases indefinitely.
--
nosy: +peter.otten
Peter Ingebretson added the comment:
Thanks Mark, I agree.
I thought that assigning to tp_dictoffset in inherit_special was redundant with
the assignment in inherit_slot and the assignment I added, but I see that
COPYSLOT and COPYVAL are slightly different and extension types won't go
New submission from Peter Ingebretson:
PEP 412 shared keys are not created for subclasses in Python 3.3 and 3.4:
import sys
class A:
... pass
...
class B(A):
... pass
...
a, b = A(), B()
sys.getsizeof(vars(a))
96
sys.getsizeof(vars(b))
288
(Actual sizes depend on platform
Changes by Peter Ingebretson pinge...@yahoo.com:
--
nosy: +pingebretson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16465
___
___
Python-bugs
Peter Otten added the comment:
Are you sure that the converter is called in Python 2.5?
I've looked into the source (Modules/_sqlite/cursor.c), and if I understand the
code correctly it uses the sqlite3_column_decltype() function from the sqlite3
API to determine the column type.
So Python
Peter Santoro added the comment:
As requested, I published this for review on
http://code.activestate.com/recipes/578817-lru_timestamp-cache-entry-aging-for-functoolslru_c/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
New submission from Peter Santoro:
Now that zipfile.ZipFile supports the context manager protocol, shouldn't
shutil._make_zipfile make use of it to avoid the possibility of the archive
file not being closed properly if an exception occurs? It should be noted that
shutil._unpack_zipfile does
New submission from Peter Otten:
I ran into this when trying to trigger rereading the column names with
$ cat tmp.csv
alpha,beta
1,2
gamma,delta,epsilon
3,4,5
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type help, copyright, credits or license for more
Peter Otten added the comment:
Setting the fieldnames attribute of an existing DictReader is not documented.
Eric, there is no need for an enhancement (other than for the documentation) as
this already works in Python 3 where newstyle classes are the default. The
heart of the bug is really
Peter Otten added the comment:
The proposed patch looks fine to me.
And for the record, I don't think setting fieldnames should be promoted in the
3.x documentation. Along the lines of Eric's suggestion I should have written
something like
import csv
with open(tmp.csv) as f:
... for i
Peter Otten added the comment:
I think the prompt can easily be treated differently because it is written to
stderr.
I don't see a difference for user input between input() and raw_input() on
Linux with Python 2.7.2+ -- syntax-highlighting is applied to both
New submission from Peter Otten:
For example when you type
input(What shall I do? )
Run for your life!
in its shell window IDLE shows the 'for' as if it were a keyword. The same
happens if you run a script that requires user interaction.
--
components: IDLE
messages: 204566
nosy
Changes by Peter Otten __pete...@web.de:
--
title: IDLE applys syntax highlighting to user input in its shell - IDLE
applies syntax highlighting to user input in its shell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19808
Peter Otten added the comment:
I believe you are misinterpreting what you are seeing. Empty lines read from a
file do not produce an empty string, you get \n instead which is true in a
boolean context.
Try
[line.split()[0] for line in lines if line.strip() and not line.startswith(#)]
or add
Peter Otten added the comment:
Simon, in your code you build the config file with
'''...
args=('{0}', 'a', 131072, 10)
...
'''.format(filename)
The logging module uses eval() to process the args tuple, and a filename
containing a bashlash will not roundtrip that way. Have a look at the .conf
New submission from Peter Harris:
Documentation on python website says:
xml.etree.ElementTree.iterparse(source, events=None, parser=None)
Parses an XML section into an element tree incrementally, and reports what’s
going on to the user. source is a filename or file object containing XML
Peter Harris added the comment:
Yeah it would make sense to accept any iterable, but I'm only proposing a
documentation fix not a feature enhancement.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19452
New submission from Peter Graham:
On Windows, subprocess.Popen requires the executable name and working directory
to be ascii. This is because it calls CreateProcess instead of CreateProcessW.
--
components: Library (Lib), Unicode, Windows
messages: 199976
nosy: ezio.melotti, peter0
Peter Otten added the comment:
Be aware that for a 1-tuple the trailing comma is mandatory:
print (uäöü) # this is a string despite the suggestive parens
äöü
print (uäöü,) # this is a tuple
(u'\xe4\xf6\xfc',)
--
nosy: +peter.otten
___
Python
New submission from Peter:
Much like how iterator style filter, map and zip are available via
future_builtins (issue #2171), it would be natural to expect range to be there
too, e.g.
from future_builtins import range
range(5)
range(0, 5)
The 2to3 fixers would need to be modified
Peter added the comment:
Thinking about this, perhaps the bug is that Python 3 doesn't have a
future_builtins module? Consider:
$ python2.6
Python 2.6.8 (unknown, Sep 28 2013, 12:09:28)
[GCC 4.6.3] on linux3
Type help, copyright, credits or license for more information.
from __future__
New submission from Peter:
The 2to3 script should remove lines like this:
from future_builtins import zip
after running the zip fixer which respects the meaning of this command (issue
217). It does not, which results in an ImportError when trying to use the
converted code under Python 3
Peter Otten added the comment:
David means you should replace the line
conn.commit
in your script which does not invoke the method with
conn.commit()
Side note: as long as you are a newbie it is a good idea to ask on the python
mailing list first before adding a report to the bug tracker
Peter Otten added the comment:
a bare expression is not call
Wouldn't that silently swallow a lot of bare
print
statements?
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18788
Peter Otten added the comment:
Note that set operations on dict views work with lists, too. So the only change
necessary is to replace
wrong_fields = [k for k in rowdict if k not in self.fieldnames]
with
wrong_fields = rowdict.keys() - self.filenames
(A backport to 2.7 would need to replace
Peter Santoro added the comment:
I updated my proposed lru_timestamp function with the following change:
1) raise TypeError instead of ValueError
--
Added file: http://bugs.python.org/file31079/lru.py
___
Python tracker rep...@bugs.python.org
http
New submission from Peter Santoro:
The attached proposed lru_timestamp function provides developers with more
control over how often lru_cache entries are refreshed. Doc string follows:
def lru_timestamp(refresh_interval=60):
Return a timestamp string for @lru_cache decorated functions
Peter Santoro added the comment:
I updated my proposed lru_timestamp function with the following changes:
1) restricted refresh_interval to int type
2) updated doc string
Updated doc string follows:
def lru_timestamp(refresh_interval=60):
Return a timestamp string for @lru_cache
Peter Santoro added the comment:
As requested, I've attached a small test script called shadow.py. Steps to
reproduce:
1) pyvenv.py bugtest
2) copy the attached shadow.py script to bugtest and bugtest\scripts
3) cd bugtest
4) run shadow.py (first entry in sys.path is refers to bugtest
New submission from Peter Santoro:
I've recently hit an issue with pyvenv in Python 3.3.2 that is causing
AttributeErrors in other packages on Windows (see
https://groups.google.com/forum/?fromgroups#!topic/pylons-discuss/FpOSMDpdvy4).
Here's what I believe is going on:
On Windows
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 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.patch
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 rep...@bugs.python.org
http://bugs.python.org/issue9538
Peter added the comment:
Reopening: The same regression issue affects Python 3.2.4 as well, so if the
fix could be committed to that branch as well that would be great.
Long term, I infer that there are no GZIP files in the test suite which use the
GZIP header to store metadata (otherwise
New submission from Peter:
Regression in Python 3.3.0 to 3.3.1, tested under Mac OS X 10.8 and CentOS
Linux 64bit.
The same regression also present in going from Python 2.7.3 from 2.7.4, does
that need a separate issue filed?
Consider this VALID GZIP file, human link:
https://github.com
Peter Otten added the comment:
This could be a duplicate of issue14591.
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17020
New submission from Peter Stahl:
Yesterday, I opened a question on Stackoverflow that explains my problem in
detail. Please read this page first:
http://stackoverflow.com/questions/14287051/german-number-separators-using-format-language-on-osx
A short summary: I'm on OSX 10.8.2. I wanted
Peter Stahl added the comment:
Using the locale 'de_DE', the output is:
{'mon_decimal_point': ',', 'int_frac_digits': 2, 'p_sep_by_space': 0,
'frac_digits': 2, 'thousands_sep': '', 'n_sign_posn': 1, 'decimal_point': ',',
'int_curr_symbol': 'EUR ', 'n_cs_precedes': 1, 'p_sign_posn': 1
Peter added the comment:
Apologies again for the noise, but I've just made the first public release of
the lzma backport at http://pypi.python.org/pypi/backports.lzma/ with the
repository as mentioned before at https://github.com/peterjc/backports.lzma
I have tested this on Python 2.6, 2.7
New submission from L. Peter Deutsch:
I've read a number of reports of exponential-time regexp matching, but this
regexp uses no unusual features, requires no backtracking, and only loops
forever on certain input strings.
I listed the Python version # as 2.6; I actually observed the behavior
L. Peter Deutsch added the comment:
It never occurred to me that the regexp package would be so poorly designed
that a pattern that so clearly never requires backtracking could require
exponential time. I'll change the pattern (taking out the + has no effect on
what strings it matches
Peter added the comment:
Apologies for noise, but since a backport was discussed, I'm mentioning this
here.
I've started implementing a backport, currently working and tested on Mac OS X
and Linux, back to Python 3.0 - supporting Python 2 would be nice but probably
significantly more work
Changes by Peter Eisentraut pete...@gmx.net:
--
nosy: +petere
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue444582
___
___
Python-bugs-list
Peter Eisentraut added the comment:
I ran into a similar instance of this problem today and would like to add my
support for just getting rid of the rpm calls and just call rpmbuild in all
cases. The last release where rpm was used for building was more than 10
years ago.
--
nosy
Peter Würtz added the comment:
x * 2 - 1 is less clear than x*2 - 1
I don't feel this. Anyone else feel this?
I strongly feel so. And if you don't take my word for it, just open any math
book or look at any formula and recognize that it is the general consensus that
the elements
New submission from Peter Würtz:
I think the PEP8 examples for arithmetic expressions are a bit misleading.
(http://www.python.org/dev/peps/pep-0008/#id20)
The text clearly says that it should add spaces around operators of low(est)
priority, which means that I'm encouraged to visually group
Peter Inglesby added the comment:
Ok, I've now attached a patch with tests.
--
Added file: http://bugs.python.org/file27353/issue16055-fix-with-tests.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16055
Peter Inglesby added the comment:
This behaviour is correct. Years divisible by 4 are leap years, except years
divisible by 100, except years divisible 400.
Source http://en.wikipedia.org/wiki/Leap_year.
--
nosy: +inglesp
___
Python tracker rep
Changes by Peter Inglesby peter.ingle...@gmail.com:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16078
___
___
Python-bugs-list
Peter Inglesby added the comment:
The attached patch updates the error message to:
int(base=100, x='123')
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: int() base must be = 2 and = 36, or 0
--
keywords: +patch
nosy: +inglesp
Added file: http
Peter Inglesby added the comment:
Ah, sorry about that. Are you happy for me to write the test?
Poking around the C API docs suggests that I should call PyErr_Fetch() to get
the value of the a raised exception, but I can't see any precedent for this in
existing test code. Can you point me
Peter Inglesby added the comment:
Have attached a patch with suggested update.
Have also grepped for similar issues elsewhere in documentation, and haven't
found anything, but may have missed something.
--
keywords: +patch
nosy: +inglesp
Added file: http://bugs.python.org/file27332
Peter Russell added the comment:
Attached is a patch which adds a reference to the doseq parameter to urlencode
to the documentation for parse_qs
--
keywords: +patch
nosy: +qwertyface
Added file: http://bugs.python.org/file27331/Issue-15593.patch
Peter Russell added the comment:
I can confirm that the current equivalent to Mark's original test case works as
expected on default.
I recommend closing this issue.
--
nosy: +qwertyface
___
Python tracker rep...@bugs.python.org
http
New submission from Peter Eisentraut:
The documentation for the csv.DictReader constructor is
.. class:: DictReader(csvfile, fieldnames=None, restkey=None, restval=None,
dialect='excel', *args, **kwds)
but the implementation is
def __init__(self, f, fieldnames=None, restkey=None, restval
Peter Otten added the comment:
Here's a minimal fix that modifies the sql in sqlite3.dump._iterdump() to sort
the tables by name. It is then no longer necessary to sort the resultset in
Python for the unit tests to pass.
--
keywords: +patch
nosy: +peter.otten
Added file: http
Peter Donis peterdo...@alum.mit.edu added the comment:
I recently noticed that there has been a minor code change in the
_load_testfile function in doctest, so I generated a new patch against the
latest pull from Mercurial (cpython). No actual changes to the issue fix, but
this patch should
Peter Donis peterdo...@alum.mit.edu added the comment:
Updated patch to ensure that tests pass when the -v flag is set running the
test suite. This is done by having the helper script, doctest_testfile.py, call
doctest.testfile with verbose=False to ensure there is no output if the test
Peter Otten __pete...@web.de added the comment:
Not a python bug. You are ommitting an important detail of the stackoverflow
example in your code:
# we want to treat '/' as part of a word, so override the delimiters
readline.set_completer_delims(' \t\n;')
Please turn to the Python mailing
New submission from Peter VG pete...@gmail.com:
Since strings cannot reliably be converted to floats and back, plistlib should
provide an option to treat the real datatype as strings/data or to use the
Decimal library class. Currently, reading and then writing a real value can
change its
New submission from Peter Norvig pnor...@google.com:
PEP 289 says the semantic definition of a list comprehension in Python 3.0
will be equivalent to list(generator expression). Here is a counterexample
where they differ (tested in 3.2):
def five(x):
Generator yields the object x five
Peter Norvig pnor...@google.com added the comment:
I agree with R. David Murray -- if correct means following the PEP 289
semantics, then
list(next(F) for _ in range(10))
should be the same as
def __gen(exp):
for _ in exp:
yield next(F)
list(__gen(iter(range(10
and indeed
New submission from Peter Marheine taric...@gmail.com:
Cross-compiling the interpreter for a system without a definition for ssize_t
fails in PyType_FromSpec (Object/typeobject.c:2380 in the 3.2.3 release, line
2409 in hg 6b8f34a1cb22).
It appears the type of len should be corrected to size_t
Changes by Peter Kleiweg pklei...@xs4all.nl:
--
nosy: -pebbe
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11352
___
___
Python-bugs-list mailing
301 - 400 of 656 matches
Mail list logo