Alexey Kachayev added the comment:
Serhiy, thank you for review. Working further on fixes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
Nick Coghlan added the comment:
Many algorithms that require a sequence only need __len__ and __getitem__. The
term sequence is used to distinguish such containers from mere iterables that
only provide __iter__ (and may be consumed by iteration). The glossary entry
covers this use of the
Nick Coghlan added the comment:
As Amaury notes, implicit ducktyping is not feasible for sequences or mappings,
as the method names overlap - you have to add explicit semantic information to
say which kind of container you're implementing.
--
___
INADA Naoki added the comment:
Thanks, Nick.
I see that the sequence doesn't have strict definition.
Though, I think collections.abc module's document should describe
this manner. For example:
But checking type with these abc may be too strict for most case.
For example, some user defined
Serhiy Storchaka added the comment:
About length_hint():
I were mean something like (even explicit getattr() not needed):
try:
hint = type(obj).__length_hint__
except AttributeError:
return default
try:
val = hint(obj)
except TypeError:
return default
...
This is a little
Serhiy Storchaka added the comment:
zipinfo detects /usr/bin/zip as a zip archive too.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16735
___
Nick Coghlan added the comment:
No, that runs counter to the purpose of ABCs. If you have a type that is good
enough for your purposes, then you can just register it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16728
New submission from Trent Nelson:
Relevant thread:
http://mail.python.org/pipermail/python-dev/2012-December/123225.html
PyOS_StdioReadline features numerous calls that require the GIL to be held.
Ideally, the GIL drop-take should be moved closer to the actual underlying read
system call.
Matthias Klose added the comment:
fixed in experimental, pyvenv's are now handled the same way as
python-virtualenvs. closing the issue here.
--
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
amundell added the comment:
I had a similar issue in Win8, but occured after installing another program. My
issue was related to the TCL_Library environment variable. If it is related to
this error it can be confirmed by opening the command prompt, changing dir to
cd c:\python33\ and typing
INADA Naoki added the comment:
So, I feel the 2nd meaning of sequence should be
collections.abc.(Mutable)Sequence.
sequence types in stdlib have richer API then the ABC. (e.g. comparison, +,
*, etc...)
They are APIs that sequence may have but not APIs makes the type sequence.
--
INADA Naoki added the comment:
And nice symmetry with mapping entry.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16728
___
___
New submission from Marc Schlaich:
Platform: Windows 7 64 bit
Interpreter: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit
Intel)] on win32
Here are the steps to reproduce:
1. Create a big file (5 GB):
with open('big', 'wb') as fobj:
for _ in xrange(1024 * 1024 * 5):
Daniel Shahaf added the comment:
Re the review, yes there is a typo in the comment: the comment in xxlimited.c
should say xxmodule.c rather than xxlimited.c. (Got a traceback from the
review app)
--
___
Python tracker rep...@bugs.python.org
New submission from rappy:
In bug.py print gives
['C:\\Users\\Glenn\\Desktop', 'C:\\Windows\\system32\\python27.zip',
C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
Christian Heimes added the comment:
You have to either quote the backslashes or use raw strings:
\a
'\x07'
\\a
'\\a'
r\a
'\\a'
--
nosy: +christian.heimes
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from Stefan Krah:
This issue is for the _decimal specific parts from #4555. The patch
depends on _Pragma (C99) and gcc = 4.0 for the contents of the pragma.
I think it will work for clang, too.
Should the libmpdec API symbols (i.e. the ones starting with mpd_*)
be hidden for
Éric Araujo added the comment:
FTR, distutils only recommends and supports running “python setup.py”, i.e.
relative path in the script’s directory.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16737
Éric Araujo added the comment:
It’s easy sure, but I think it’s still a bug :)
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16713
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo, loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16731
___
___
Stefan Krah added the comment:
Adding everyone from issue #4555, in case you can think of a different
(portable) solution for hiding symbols (with minimal effort).
--
nosy: +christian.heimes, dmalcolm, doko, lemburg, loewis, pitrou
___
Python tracker
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
___
___
Python-bugs-list
Éric Araujo added the comment:
Oops, sorry I slipped :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16651
___
___
Python-bugs-list mailing
Changes by Meador Inge mead...@gmail.com:
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16745
___
___
Python-bugs-list
Vinay Sajip added the comment:
FTR, distutils only recommends and supports running “python setup.py”, i.e.
relative path in the script’s directory.
Right, but this behaviour is seen even when the script is in the current
directory.
--
___
Python
Alexey Kachayev added the comment:
Fixed my previous patch according to all comments from review, except removing
keyword arguments from lru_cache_new function.
--
Added file: http://bugs.python.org/file28386/14373.v3.diff
___
Python tracker
Meador Inge added the comment:
Personally I prefer using attributes instead of pragmas. The GCC manual
recommends such as well. There are also other sources in Modules/* that use
'__attribute__ ((visibility (hidden)))'. Namely ctypes and zlib.
I can understand that it is more work, but I
Meador Inge added the comment:
I noticed functools in the list. issue14373 was opened somewhat recently to
reimplement functools.lru_cache in C. This issue seems to be promoting have
more things implemented in pure Python. Someone involved in this issue might
want to weigh in on issue14373
Philip Jenvey added the comment:
The guidelines for this are in PEP 399. Basically, adding 'accelerated'
implementations when necessary isn't a bad thing as long as there are pure
Python equivalents (unless it's a special case) and both are tested.
issue14373's latest patch seems to be
Mark Dickinson added the comment:
Whoops. int.from_bytes doesn't exist in Python 2.7.
--
Added file: http://bugs.python.org/file28387/pyc_mtime4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13863
Stefan Krah added the comment:
Meador Inge rep...@bugs.python.org wrote:
Personally I prefer using attributes instead of pragmas. The GCC manual
recommends such as well.
I followed www.akkadia.org/drepper/dsohowto.pdf . Drepper seems to be fine
with the use of pragmas in internal headers.
Zachary Ware added the comment:
Here's another new version. Changes include:
- Address Serhiy's Rietveld comments
- Fix length_hint() the way it was meant to be fixed last time.
- Remove __getitem__ check on 'b' in concat and iconcat. More notes on this
below.
- Fix methodcaller as Serhiy
Meador Inge added the comment:
Ah, I missed how big of a line range these pragmas are covering when I scanned
the patch before. In that case, I agree with the current patch.
--
___
Python tracker rep...@bugs.python.org
New submission from Chris Jerdonek:
Currently, PEP 1 can be read to mean that p...@python.org should be CC'ed on
all e-mails related to PEPs. However, this isn't the intent because, for
example, it is okay to have discussions about PEPs on python-dev or
python-ideas without involving
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file28389/issue-16746-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16746
Changes by Antoine Pitrou pit...@free.fr:
--
components: +Library (Lib), Windows -None
nosy: +brian.curtin, tim.golden
versions: +Python 3.2, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16743
Serhiy Storchaka added the comment:
I'm involved in both issues and I think it's good to have so much simple Python
implementations as possible and to have C accelerators for any performance
critical code.
--
___
Python tracker
Serhiy Storchaka added the comment:
Good work, Zachary. I have no more nitpicks for you. ;)
LGTM.
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
Roundup Robot added the comment:
New changeset db75553ff333 by Mark Dickinson in branch 'default':
Simplify random_seed to use _PyLong_AsByteArray. Closes issue #16496.
http://hg.python.org/cpython/rev/db75553ff333
--
nosy: +python-dev
___
Python
Changes by Mark Dickinson dicki...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16496
___
Serhiy Storchaka added the comment:
One comment to a committer. Don't forget to run `hg rename Modules/operator.c
Modules/_operator.c` before applying the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
Zachary Ware added the comment:
Nits are no fun; thank you for picking them, Serhiy ;)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
___
Alexey Kachayev added the comment:
Added additional Py_DECREF(s) for key and value.
--
Added file: http://bugs.python.org/file28390/14373.v4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
Roundup Robot added the comment:
New changeset 24f6c6f3b7bf by Stefan Krah in branch '3.3':
Issue #16745: Hide a couple of symbols by making them local.
http://hg.python.org/cpython/rev/24f6c6f3b7bf
--
nosy: +python-dev
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
assignee: - brett.cannon
nosy: +brett.cannon
priority: normal - low
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16746
R. David Murray added the comment:
The editors do more than your sentence suggests. They also (sometimes) edit
peps, (sometimes) provide advice about preparing one, and commit and update
peps when the author(s) do not have commit access.
The distinction in the types of email that PEP 1 is
Terry J. Reedy added the comment:
Patch looks good to me, all three occurrences of 'string' are fixed.
--
nosy: +terry.reedy
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16682
Éric Araujo added the comment:
FYI Mercurial can use the extended diff format invented by git, which supports
renames, changes to file permissions, etc.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16694
Éric Araujo added the comment:
The base test class should not inherit from TestCase: it will be picked up by
test discovery and then will break, as self.module will be None.
Typical usage:
class OperatorTestsMixin:
module = None
class COperatorTests(OperatorTestsMixin,
Terry J. Reedy added the comment:
This seems like a plausible request to me. The three dicts comprise 70
code-alias pairs. If unicodedata had a Python version (should it?), the
simplest thing would be to add bididict, eawdist, and gcdict to that version
(and not to the C version). I don't
Zachary Ware added the comment:
Did not know that about test discovery, thank you Éric. Fixed in v6.
A few other test modules may need the same fix; I based my changes to
Lib/test/test_operator.py on Lib/test/test_heapq.py which has the same issue.
I'll open a new report for it and any
New submission from Zachary Ware:
Here's a patch that changes the reference to :class:`file` in the iterable
entry in Doc/glossary.rst to :term:`file objects file object`, along with
minor grammatical fixes to make it fit, and reflowing of the text.
--
assignee: docs@python
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16686
___
___
Python-bugs-list
Terry J. Reedy added the comment:
Is that really the simplest example that will exhibit the cited behavior?
Why do you think this is a Python issue rather than a Windows issue?
What happens, for instance, with a C program than alternately outputs to stdout
and stderr?
--
nosy:
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 3.1, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16709
___
___
New submission from Zachary Ware:
As pointed out by Éric Araujo in msg177908 of issue16694, tests using the idiom
presented in PEP 399 are subject to breakage of test discovery. This issue's
goal is to root out and fix all usages of this idiom.
So far, only test_heapq is known to be
Terry J. Reedy added the comment:
I would expect that the default method of reversed() and
collections.abc.Sequence.__reverse__ are more or less the same. If so, this
should be closed as invalid. But I want to hear from the abc experts.
--
nosy: +rhettinger, stutzbach, terry.reedy
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 2.6, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
___
___
Matthew Barnett added the comment:
Python takes a long way round when converting strings to int. It does the
following (I'll be talking about Python 3.3 here):
1. In function 'fix_decimal_and_space_to_ascii', the different kinds of spaces
are converted to and the different kinds of digits
Terry J. Reedy added the comment:
The immediate fix is to use a 64 bit build. That aside, what change in behavior
are you suggesting? (and for 32 bit builds only?)
Should mmap.mmap warn if the file is longer that would be supported?
This could be added to all current versions.
Should it raise
R. David Murray added the comment:
Given the error message, my guess would be that there is a bug in the
Solidoodle Python extension module. That is, it is unlikely to be a bug in
Python.
--
nosy: +r.david.murray
___
Python tracker
Leonardo DaVinci added the comment:
Ok thanks for the quick reply. I'll check with them.
Regards
Ciro
On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray rep...@bugs.python.orgwrote:
R. David Murray added the comment:
Given the error message, my guess would be that there is a bug in the
INADA Naoki added the comment:
I believe that using Sequence ABC as mix-in is recommended when implementing
custom sequence.
But mixing-in it violates should only provide __reversed__() if they can
provide an implementation that is more efficient than the one
provided by reversed().
Leonardo DaVinci added the comment:
Hi David,
I keep trying to unsuccessfully. Here's the problem details
Problem signature:
Problem Event Name: APPCRASH
Application Name: python.exe
Application Version: 0.0.0.0
Application Timestamp: 4f84a6c8
Fault Module Name: python27.dll
Changes by Brett Cannon br...@python.org:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list
anatoly techtonik added the comment:
I don't know. I don't write C.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16689
___
___
New submission from pleed:
The code class implements the __eq__ operator which is known to be
uncomputable.
--
messages: 177923
nosy: pleed
priority: normal
severity: normal
status: open
title: Python Code module implements uncomputable function
type: behavior
versions: Python 2.7
67 matches
Mail list logo