New submission from Anthony Scopatz:
Classes that have an abstract base class somewhere in their hierarchy have a
significantly reduced depth with respect to the recursion limit. In the
attached minimal example, the class hierarchy is only able to be 245 deep past
the ABC before a recursion
Changes by Anthony Sottile <asott...@umich.edu>:
--
nosy: +Anthony Sottile
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28700>
___
Anthony Sottile added the comment:
That doesn't seem to be the problem though, that occurs in both the successful
and failure case
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Anthony Sottile added the comment:
Stepping through the code, it seems under ndbm it is creating a file with a
'.db' extension:
```
(Pdb) list
47 'g': b'intended',
48 }
49
50 def init_db(self):
51 import pdb; pdb.set_trace()
52
Anthony Sottile added the comment:
I'm seeing this same failure in python3.5 on 16.04 about 20% of the time:
```
$ python3.5 -m test -v test_dbm
== CPython 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
== Linux-4.4.0-57-generic-x86_64-with-Ubuntu-16.04-xenial little-endian
Changes by Anthony Zhang <azha...@gmail.com>:
Added file:
http://bugs.python.org/file46088/fix_aifc_leak_and_file_object_close.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Anthony Zhang:
Summary
---
This shows up as two closely-related issues:
* ``aifc.open`` leaks file object when invalid AIFF file encountered. This is
probably a bug.
* ``aifc.close`` closes file object even when it didn't open the file object to
begin with. While
Anthony Flury added the comment:
Assuming the reader knows the details of how Python works is not a great
assumption when those documents are being used (by the most part) by people
like me who are reasonable developers but who don't know, and for most cases
don't care about the internals
Anthony Flury added the comment:
Not sure I agree with closing this. I am not convinced (as a reasonably
seasoned developer) that the documentation is clear.
It may not be a bug in the code, resulting as it does from a change in the way
methods are implemented in Python 3.5, but I do think
New submission from Anthony Flury:
Consider the following code in Python2.7 & Python3.5
import inspect
class a(object):
def m(self):
pass
in Python 2.7
inspect.ismethod(a.m) returns True
in Python 3.5
inspect.ismethod(a.m) returns F
Anthony Sottile added the comment:
Seems I've named the patchfile incorrectly -- Hopefully this is correct this
time?
--
keywords: +patch
nosy: +Anthony Sottile
Added file: http://bugs.python.org/file42675/2.patch
___
Python tracker <
Anthony Sottile added the comment:
I have a hunch that this fix here may be causing this:
https://github.com/spotify/dh-virtualenv/issues/148
Minimally:
echo 'from setuptools import setup; setup(name="demo")' > setup.py
echo 'import pytest' > tests/__init__.py
$ python setup
Anthony Sottile added the comment:
PEP states that environ variables are str variables decoded using
latin1:
https://www.python.org/dev/peps/pep-/#id19
Therefore, to get the original bytes, one must encode using latin1
On Apr 20, 2016 3:46 AM, "Александр Эри" <rep...@bu
Changes by Anthony S Valencia <anthonysvalen...@gmail.com>:
--
nosy: +antvalencia
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Anthony Sottile added the comment:
Forgot to remove the pyver code (leaning a bit too much on pre-commit)
--
Added file: http://bugs.python.org/file42405/patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Anthony Sottile added the comment:
Updates after review.
--
Added file: http://bugs.python.org/file42404/patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Anthony Sottile added the comment:
Oops, broke b'/%80'.
Here's a better fix that now takes:
(on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)->
b'\xc2\x80' -(decode latin1)-> u'\xc2\x80'
to:
(on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode latin1
Anthony Sottile added the comment:
A few typos in my previous comment, pressed enter too quickly, here's an
updated comment:
Patch attached with test.
In summary:
A request to the url b'/\x80' appears to the application as a request to
b'/\xc2\x80' -- The issue being the latin1 decoded
New submission from Anthony Sottile:
Patch attached with test.
In summary:
A request to the url b'/\x80' appears to the application as a request to
b'\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as
UTF-8 and then decoded as latin1
(on the wire) b'\x80' -(decode
Anthony Sottile added the comment:
Here's an improved patch which:
- passes the tests
- puts the test in the correct place
I'm not entirely happy with the approach -- open to suggestions :)
--
Added file: http://bugs.python.org/file42387/patch2
Anthony Sottile added the comment:
The root cause seems to be that autospecced functions return a function object
(not a Mock instance) which a '.mock' attribute which is a MagicMock ( assigned
here:
https://github.com/python/cpython/blob/ae775ab1eb72f42de2d070158bade4bf261ac04f/Lib/unittest
New submission from Anthony Sottile:
Originally from https://github.com/testing-cabal/mock/issues/350
## Example
```python
from unittest import mock
class C(object):
def f(self):
pass
c = C()
with mock.patch.object(c, 'f', autospec=True):
with mock.patch.object(c, 'f
Anthony Sottile added the comment:
Here's the workaround I'm opting for:
if sys.platform =='win32':
distutils.spawn.find_executable(cmd[0]) + cmd[1:]
--
nosy: +Anthony Sottile
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Changes by Anthony Foglia <afog...@gmail.com>:
--
nosy: +afoglia
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25136>
___
__
New submission from Anthony Tuininga:
These methods are completely missing from the documentation found here:
https://docs.python.org/3/c-api/typeobj.html
--
assignee: docs@python
components: Documentation
messages: 260154
nosy: atuining, docs@python
priority: normal
severity: normal
Anthony Tuininga added the comment:
Ah yes. The fields are still there, though, just marked as not used.
Interestingly enough they aren't documented in the Python 2 documentation
eitherand they are in the Python 2.7 headers I have (not marked as unused
either).
Your suggestion makes
Anthony Sottile added the comment:
Breaks this function:
```
def rmtree(path):
"""On windows, rmtree fails for readonly dirs."""
def handle_remove_readonly(func, path, exc): # pragma: no cover (windows)
excvalue = exc[1]
i
Anthony Sottile added the comment:
When calling shutil.rmtree on windows on a readonly directory, the error
handler is called with os.unlink as the first argument `func` which fails the
check `func in (os.rmdir, os.remove)` which succeeded on previous python
versions
New submission from Anthony Sottile:
I've confirmed this bug is present on both windows and linux, the outputs below
are from linux however.
Compare:
```
$ python3.4 --version
Python 3.4.3
$ python3.4 -c 'import os; print(os.unlink == os.remove)'
True
```
```
$ python3.5 --version
Python
Changes by Anthony Green <phon...@gmail.com>:
--
assignee: docs@python
components: Documentation
nosy: anthonygreen, docs@python, pitrou
priority: normal
severity: normal
status: open
title: Documentation for threading.enumerate / threading.Thread.is_alive is
contradictory.
ve
Anthony Green added the comment:
The following example comes from IRC user ztane:
> import threading, time
>
> main_thread = threading.current_thread()
>
> def foo():
> time.sleep(10)
> print(main_thread.is_alive())
> print(list(threading.enumerate()))
&
New submission from Anthony Green:
The documentation at
https://docs.python.org/3/library/threading.html#threading.Thread.is_alive
relates:
> The module function enumerate() returns a list of all alive threads.
The documentation at
https://docs.python.org/3/library/threading.h
Anthony Sottile added the comment:
It *is* in my path (otherwise it wouldn't produce any output at all). I'm not
trying to use the shell builtin, I'm trying to use the executable.
--
resolution: not a bug ->
status: closed -> open
___
Anthony Sottile added the comment:
To clarify further, the echo.exe on my path reacts correctly:
```
Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit
(allow_curly_braces_in_args)
$ /usr/bin/echo hi{1}
hi{1}
Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit
New submission from Anthony Sottile:
First some expected output:
```
# from cmd.exe
C:\Users\Anthony>echo hi{1}
hi{1}
# from MINGW
$ echo hi{1}
hi{1}
```
```
# On ubuntu
$ echo 'hi{1}'
hi{1}
$ python3.5 -c "import subprocess; print(subprocess.check_output(('echo',
'hi{1}')))&qu
Anthony Sottile added the comment:
```
C:\Users\Anthony> C:\Users\Anthony\AppData\Local\Programs\Git\usr\bin\echo.exe
hi{1}
hi1
```
Must be the provider of echo.exe. I'll take it up with them
Sorry for the trouble!
--
resolution: -> not a bug
status: open -&g
Anthony Sottile added the comment:
I'm still seeing a very large difference:
asottile@work:/tmp$ python repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.pyc'
72604
VmHWM: 72604 kB
VmRSS: 60900 kB
asottile@work:/tmp$ rm *.pyc; python repro.py
ready
module 'city_hoods' from
Anthony Sottile added the comment:
Ah, then 3.4 still has the problem:
$ rm -rf __pycache__/ *.pyc; python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py'
1112892
VmHWM: 1112892 kB
VmRSS:127196 kB
asottile@work:/tmp$ python3.4 repro.py
ready
module 'city_hoods' from '/tmp
Anthony Sottile added the comment:
Attached is repro2.py (slightly different so my editor doesn't hate itself when
editing the file)
I'll attach the other file in another comment since it seems I can only do one
at a time
--
Added file: http://bugs.python.org/file39257/repro2.py
Anthony Sottile added the comment:
3.4 seems happier:
asottile@work:/tmp$ rm *.pyc; python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py'
77472
VmHWM: 77472 kB
VmRSS: 65228 kB
asottile@work:/tmp$ python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py
Changes by Anthony Sottile asott...@yelp.com:
Added file: http://bugs.python.org/file39259/anon_city_hoods.tar.gz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
Anthony Sottile added the comment:
Adding `import gc; gc.collect()` doesn't change the outcome afaict
--
nosy: +asottile
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
Gijsbert Anthony van der Linden added the comment:
Updated the patch and added tests. Fixed a problem with the previous patch:
result of map function was assumed to be list, however map in Python3 returns
an interator. So I replaced it with a list comprehension.
--
nosy
New submission from Anthony Ryan:
The scgi protocol is not included in urllib.parse.uses_netloc list, while other
less common protocols are (such as gopher).
I would like to see scgi get added to this list.
--
components: Library (Lib)
files: py3bug
messages: 237831
nosy: Anthony Ryan
Changes by Anthony Ryan anthonyry...@gmail.com:
Added file: http://bugs.python.org/file38435/py2bug
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23636
Changes by Anthony Sottile asott...@yelp.com:
--
nosy: +asottile
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16806
___
___
Python-bugs-list
Anthony Sottile added the comment:
Any updates on this? I'm running into this as well (still a problem in 3.4)
```$ python3.4
Python 3.4.2 (default, Oct 11 2014, 17:59:27)
[GCC 4.4.3] on linux
Type help, copyright, credits or license for more information.
import ast
ast.parse('''foo\n
New submission from Anthony Mayer:
After discussion about extraneous whitespace around colons in a list slice not
being an error on the pep8 checker project (see
https://github.com/jcrocholl/pep8/issues/321#issuecomment-53649841), ncoghlan
suggested filing a ticket here to get the issue added
Anthony Tuininga added the comment:
I note that this patch has still not been accepted! Please let me know what
needs to be done. I just tried against Python 3.4 and the patch works as
expected -- other than the starting line number is now 715. I have signed the
contributor agreement
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22116
___
___
Python-bugs
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13272
___
___
Python-bugs
New submission from Anthony LaTorre:
I get a segfault when trying to cast a string to a structure.
import ctypes
class Struct(ctypes.Structure):
... _fields_ = [('a', ctypes.c_uint32)]
...
s = '0'*100
ctypes.cast(s,Struct)
Segmentation fault
The docs (https://docs.python.org/2/library
Changes by Anthony LaTorre tlator...@gmail.com:
--
components: +ctypes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21983
___
___
Python-bugs
New submission from Anthony Bartoli:
From the library's introduction page:
This manual is organized “from the inside out:” it first describes the
built-in data types...
The library manual first describes built-in functions, not data types.
After built-in functions, it describes built
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19771
___
___
Python-bugs
Anthony Baire added the comment:
The patch is fine, but it is hard to rely on it to prevent bugs from happening
because that requires cooperation from all modules registering signal handlers.
Anyway it facilitates reusing code that was not written for an event-driven
context (and many will do
Anthony Baire added the comment:
I confirm the fix.
It is clear that the separation between BaseChildWatcher and its subclasses is
far from ideal. The first implementation was clean, but as the patch evolved
interactions got complex to the point that BaseChildWatcher should not be
considered
Anthony Baire added the comment:
I put a cleaner patch here:
https://codereview.appspot.com/26220043/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19566
New submission from C Anthony Risinger:
http://hg.python.org/cpython/file/d499189e7758/Tools/scripts/gprof2html.py#l1
...should be self explanatory.
i didn't run into this myself, but i saw that the Archlinux package was fixing
it via `sed`, without the customary link to upstream... so here
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5038
___
___
Python-bugs
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue935117
___
___
Python-bugs
New submission from Anthony Lozano:
If you create a asynchat subclass with a SSL socket asyncore can hang when data
larger than the ac_in_buffer_size comes in.
What (I think) happens is that asyncore uses a select.select call to determine
when to read more data from the socket. On the first
Changes by Anthony Lozano amloza...@gmail.com:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16976
___
___
Python-bugs
New submission from Anthony Tuininga:
With Python 3.3, the ability to create a Python interpreter independent of a
Python installation (as is done with cx_Freeze and other such freezing tools)
has become more difficult to accomplish. Py_Initialize() requires the presence
of a frozen importlib
Anthony Tuininga added the comment:
The file importlib.h is used when building the Python interpreter but it is
*not* available in a standard (non-source) distribution of Python. I have
copied the file from a source distribution of Python and that does in fact
work, but I don`t want to make
Anthony Tuininga added the comment:
Thanks to Amaury for his suggestion. It resolves the problem completely and
answers the question I had about how to proceed. For others who may come across
this, the key was to generate the importlib._bootstrap module (which is what is
found in importlib.h
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4188
___
___
Python-bugs
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13241
___
___
Python-bugs
Anthony Kong anthony.hw.k...@gmail.com added the comment:
Which os? windows or linux or osx?
It actually sounds like a support question. You probably should take the
question to the python newsgroup
(https://groups.google.com/forum/?fromgroups#!forum/comp.lang.python).
--
nosy
New submission from Anthony Long antl...@gmail.com:
http://pypi.python.org/pypi
The copyright in the footer says 2011.
--
components: None
messages: 160928
nosy: antlong
priority: normal
severity: normal
status: open
title: Copyright date in footer of /pypi says 2011
New submission from Anthony Long antl...@gmail.com:
http://python.org/community/jobs/
http://python.org/community/jobs/www.austinfraser.com
\_ error code: 404 (not found)
http://python.org/lumino.so
\_ error code: 404 (not found)
http
Anthony Long antl...@gmail.com added the comment:
http://maw.liquifire.com/maw?set=image[2302.000.13314%20a]call=url[file:325x445]
works properly. Notice the %20 instead of ' '
--
nosy: +antlong
___
Python tracker rep...@bugs.python.org
http
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14658
___
___
Python-bugs
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14399
___
___
Python-bugs
Anthony Tuininga anthony.tuini...@gmail.com added the comment:
All, I have trimmed this patch down to the bare minimum required to solve this
problem. Please review this as I would dearly love to have this committed. The
error received without this patch is
MSIError: unknown error 103
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13641
___
___
Python-bugs
Changes by Anthony Kong anthony.hw.k...@gmail.com:
--
nosy: +Anthony.Kong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12853
___
___
Python-bugs
New submission from Anthony Briggs anthony.bri...@gmail.com:
Unlike Python 2, Python 3 warns when files aren't closed properly, which raises
lots of warnings when running tabnanny:
~/devinabox/cpython$ ./python -m tabnanny Lib/
/home/anthony/devinabox/cpython/Lib/tabnanny.py:93
Changes by Anthony Briggs anthony.bri...@gmail.com:
--
nosy: +anthonyb, ncoghlan
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6484
Anthony Briggs anthony.bri...@gmail.com added the comment:
Added ncoghlan to the nosy list - we're reviewing/fixing unit test coverage as
part of the sprints at PyconAU. Thanks Gnofi!
--
___
Python tracker rep...@bugs.python.org
http
Anthony Long antl...@gmail.com added the comment:
I'll have a doc patch shortly.
Also, I am working on defining a solid range. Memory is not an issue like it
was back in 1991 when this range was originally implemented, so we can go
higher and get a bigger performance boost. This will be very
Anthony Long antl...@gmail.com added the comment:
My plan is to document it, as it exists, in the current implementation. That's
a start atleast, and will provide an entry point for further documentation in
the future should it be changed again
New submission from Anthony Long antl...@gmail.com:
http://docs.python.org/c-api/int.html
The current implementation keeps an array of integer objects for all integers
between -5 and 256, when you create an int in that range you actually just get
back a reference to the existing object. So
Changes by Anthony Tuininga anthony.tuini...@gmail.com:
--
nosy: +atuining
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6501
___
___
Python-bugs
New submission from Anthony Long antl...@gmail.com:
I ran
python test_time.py
and python immediately crashed.
This is the trace from mac's error reporter:
http://dpaste.de/Jsw7/
--
components: Tests
messages: 129502
nosy: antlong
priority: normal
severity: normal
status: open
Anthony Long antl...@gmail.com added the comment:
Tests trying all positions and expecting an appropriate TypeError should be
included.
--
nosy: +antlong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11014
Changes by Anthony Long antl...@gmail.com:
--
nosy: -antlong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11014
___
___
Python-bugs-list mailing
Anthony Long antl...@gmail.com added the comment:
Strange, I didn't see it until this email came. Probably an old browser cache.
Either way, looks good to me. No issues on mac SL.
--
nosy: +antlong
___
Python tracker rep...@bugs.python.org
http
Anthony Long antl...@gmail.com added the comment:
Are there tests for this?
--
nosy: +antlong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5863
Anthony Long antl...@gmail.com added the comment:
Works for me, py2.7 on snow leopard.
--
nosy: +antlong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10976
New submission from Anthony Long antl...@gmail.com:
On pypi, when you are inside of your packages' files area, the link that is
attached to
1. Use the setup.py upload command. # upload
is broken, it links to http://www.python.org/doc/dist/package-upload.html which
returns a 404.
http
Anthony Long antl...@gmail.com added the comment:
Patched my installation of python27 (via macports, snow leopard) and the patch
was successful. Verified patch works in a limited capacity, using yolk.
--
nosy: +antlong
___
Python tracker rep
New submission from Anthony Long antl...@gmail.com:
import unittest
from selenium import selenium
class SetupSomething(unittest.TestCase):
def setUp(self, URL):
self.selenium = selenium(localhost, , *firefox, self.URL)
def tearDown(self):
pass
class
New submission from Anthony Long antl...@gmail.com:
I would like to add docstrings to dicts and named tuples. Dicts can be used to
hold many different kinds of information, and docstrings would help to shed
light on what the dict does to others.
Named tuples also should have docstrings, since
Anthony Foglia afog...@gmail.com added the comment:
I could see adding a doc parameter to the collections.namedtuple. So that
---
Point = collections.namedtuple(Point, (x, y), doc=My point class)
Point.__doc__
My point class
---
(Or it could keep the currently created docstring and append
Anthony Long antl...@gmail.com added the comment:
I disagree. It's expected that the function will return valid data. This
doesn't return valid data so isalpha() is compromised.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Anthony Long antl...@gmail.com added the comment:
The locale is set incorrectly though - so it is not valid data. Valid data is
a-Z. nothing more nothing less, and the locale and the alphabet should not be
changed.
--
___
Python tracker rep
New submission from Anthony Long antl...@gmail.com:
install a distro of without sqlite3 support. now you should have a
/usr/lib/python2.6/sqlite3, which obviously isn't usable.
now if you install sqlite3, and try a 'import sqlite3' it still doesn't work.
so you have to compile/install
Anthony Long antl...@gmail.com added the comment:
Same behaviour on python 3,
http://pastebin.ca/1907343
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9365
New submission from Anthony Long antl...@gmail.com:
On mac 10.5, python 2.6.4 (via mac ports) performing
len(string.letters) will produce 117 instead of 52.
from terminal:
along-mb:~ along$ locale
LANG=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY
601 - 700 of 734 matches
Mail list logo