Serhiy Storchaka added the comment:
Usually converters are named by the C type of the result. May be rename the
str converter to pchar?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
VanL added the comment:
Given the generally positive comments, here are patches for 2.7, 3.3, 3.4, and
3.5 (3.5 patch updated to also include urllib.request).
--
Added file: http://bugs.python.org/file39153/recommend_requests_2.patch
___
Python
Changes by Yury Selivanov yseliva...@gmail.com:
--
dependencies: +PEP 479: Change StopIteration handling inside generators
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
___
Terry J. Reedy added the comment:
I agree. The resolution is that help fails for objects that do not exist on
the platform. We do not supply non-functional dummy objects that only exist to
document non-support. Any objects with undocumented platform-specific behavior
should be handled on a
STINNER Victor added the comment:
Does the implementation depends on the implementation of the PEP 479? (issue
#22906)
Attaching a patch generated with mercurial
Next time, if possible, try to skip generated files. Maybe write a script for
that, but sorry I don't know how :-(
--
Changes by Łukasz Langa luk...@langa.pl:
--
assignee: - lukasz.langa
nosy: +lukasz.langa
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24018
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: test needed - patch review
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12606
___
Dmitry Kazakov added the comment:
Here's the documentation patch.
--
Added file: http://bugs.python.org/file39152/traceback_limit_doc.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22619
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24018
___
___
Python-bugs-list
STINNER Victor added the comment:
Reading msg120918 and msg120940 it looks as if work has been completed so
this can be closed as fixed.
Attached patch contains more fixes.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset c9239543235e by Benjamin Peterson in branch '3.4':
recommend requests library (closes #23989)
https://hg.python.org/cpython/rev/c9239543235e
New changeset 3cf2990d19ab by Benjamin Peterson in branch '2.7':
recommend requests library (closes #23989)
Roundup Robot added the comment:
New changeset 1764d42b340d by Greg Ward in branch 'default':
#17445: difflib: add diff_bytes(), to compare bytes rather than str
https://hg.python.org/cpython/rev/1764d42b340d
--
nosy: +python-dev
___
Python tracker
Changes by Greg Ward g...@gerg.ca:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17445
___
___
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23989
___
___
Raymond Hettinger added the comment:
For the other ABCs, if you define the required abstract methods, you get
working versions of all the mixin methods.
In the case of the Generator ABC, throw() and close() are useless empty stub
methods. In the other ABCs, we leave optional methods out
William Orr added the comment:
I've incorporated some of the feedback from the reviews into this new patch. I
used the PyMem_Raw* functions to do allocation to avoid having to acquire the
GIL and also avoid complciations from the builtin memory allocator, since I'm
not using python objects.
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: commit review - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17445
___
___
Raymond Hettinger added the comment:
we *still* have no documented guarantees of reproducibility,
so maybe it's safe to go ahead and change this. Raymond?
It is documented here:
https://docs.python.org/3/library/random.html#notes-on-reproducibility
The idea that is that algorithms (and
Changes by Yury Selivanov yseliva...@gmail.com:
--
assignee: - yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
___
___
Stefan Behnel added the comment:
Here's a new patch that addresses the review comments. I kept throw() and
close() non-abstract and added an example to the tests instead that implements
a minimal generator by inheriting these methods from the Generator base class,
using it as a mixin. It only
New submission from Mahmoud Hashemi:
The encoding keyword argument to the Python 3 str() and Python 2 unicode()
constructors is excessively constraining to the practical use of these core
types.
Looking at common usage, both these constructors' primary mode is to convert
various objects into
Bhuvan Arumugam added the comment:
For the record, this bug is still open.
The proposed patch is not merged in any of branches.
The prompt for raw_input in all versions, go to stderr.
--
nosy: +bhuvan
___
Python tracker rep...@bugs.python.org
Yury Selivanov added the comment:
Attaching a revised patch (all Victor's comments but asyncio changes)
--
Added file: http://bugs.python.org/file39155/await_02.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
Masayuki Yamamoto added the comment:
This issue resolved on default branch in #20597 .
In 3.4 branch latest, PATH_MAX seems unused already in Modules/main.c:12 and
Python/pythonrun.c:35.
I want to cherry-pick #20597 to 3.4 branch.
--
nosy: +masamoto
Stefan Behnel added the comment:
Next question: should inspect.isgenerator() be changed? Or should its usages be
replaced by isinstance(obj, Generator) ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24018
Raymond Hettinger added the comment:
There is a separate report for taking care of the identity check for contains:
https://bugs.python.org/issue23986
I think notes about crazy hashes shouldn't spill all over our docs. At best,
it warrants a FAQ entry about how hash tables work.
The risk
Stefan Behnel added the comment:
Is it a problem that the check can't be done in a fast way from C code?
C code can still quickly special case the generator type in the positive case,
and it will usually be interested in an exact type match anyway. Determining
that an object is *not*
Martin Panter added the comment:
I agree that there is no big reason why we should force generators to stop
working after close(). Your new default implementation of close() is probably
the right thing too. I added a few new comments on Reitveld.
--
Antoine Pitrou added the comment:
Is it a problem that the check can't be done in a fast way from C code?
Other than that, sounds good to me.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24018
Paul Moore added the comment:
Alternatively, return int(self.numerator) / int(self.denominator). After all, a
fraction whose numerator can't be represented as a Python (unlimited precision)
integer is a pretty odd sort of fraction...
--
___
Python
R. David Murray added the comment:
The only 'consistency' fix that would make any sense, IMO, would be to disallow
special methods to be descriptors. We can't do that for backward compatibility
reasons, so that's pretty much case closed.
Eric already mentioned one of the other 'capability'
Yury Selivanov added the comment:
Is there any noticeable performance increase with the patch?
Please attach results from https://hg.python.org/benchmarks
--
nosy: +yselivanov
___
Python tracker rep...@bugs.python.org
Mark Lawrence added the comment:
Reading msg120918 and msg120940 it looks as if work has been completed so this
can be closed as fixed.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10308
Cyd Haselton added the comment:
FYI, I'm on commit c917493dc4ea2c32371da861aca2235f0a08e68e
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
R. David Murray added the comment:
Is there a bug being fixed here? I mean other than socket not handling EINTR,
where I think we agree that handling it is a feature, given the PEP.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
Cyd Haselton added the comment:
Ryan,
There's not a python.c in the ./Programs file?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Paul Moore added the comment:
Is it not reasonable to simply say that implementations of numbers.Rational
which allow the numerator and denominator to have types for which true division
doesn't return a float, have to provide their own implementation of __float__()?
It's certainly less
Eric Snow added the comment:
Also, Python/importlib.h blew up in the diff; should this be included in
the patch?
Yes. It is the frozen bytecode for bootstrapping importlib as the import
system. So changes to bytecode generation like this will propagate there.
--
nosy: +eric.snow
Mark Lawrence added the comment:
As there was no reply to msg109130 (nearly five years ago) can we close this as
won't fix?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6824
Wolfgang Maier added the comment:
Is it not reasonable to simply say that implementations of numbers.Rational
which allow the numerator and denominator to have types for which true
division doesn't return a float, have to provide their own implementation of
__float__()?
Unfortunately,
Ionel Cristian Mărieș added the comment:
My point was about consistency in descriptor handling, not consistency of
fault (eg: broken everywhere). I don't understand why that's not clear
here.
The big idea here is to harmonize capability checking with descriptor
handling. Justifying breakage in
Ionel Cristian Mărieș added the comment:
Also, descriptors are a core mechanism in new-style classes - you can't
have methods without descriptors. Why would you even consider removing
descriptors from the special method lookup if that's part of the object
model design?
On Monday, April 20,
New submission from Joe Jevnik:
There are a lot of optimizations that are being missed by only running a single
pass of PyCode_Optimize. I originally started by trying to optimize for De
Morgan's Laws in if tests; however, I realized that the issue actually went
away if you run the optimizer
Ilia Kurenkov added the comment:
Hi Berker!
I hope all's well on your end. Let me know if you have questions about the
reasoning behind my changes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20362
Wolfgang Maier added the comment:
Good point.
If the numbers ABC guaranteed numerator and denominator to be Integral numbers,
this could be solved by:
return float(int(self.numerator) / int(self.denominator))
but since both could be Rationals again that does not seem to be an option
either.
R. David Murray added the comment:
I in case it wasn't clear, I closed this not because of my case closed
statement, but because as Eric pointed out we *do* have consistency here:
things which check *capabilities* (as opposed to actually *using* the special
methods), like callable and
New submission from Joachim Breitner:
The docs for the timeit command line interface specify
If -n is not given, a suitable number of loops is calculated by trying
successive powers of 10 until the total time is at least 0.2 seconds.
This sounds as if it it first tries 1, then 10, then 100
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/issue23728
___
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/issue23842
___
Ionel Cristian Mărieș added the comment:
On Mon, Apr 20, 2015 at 7:02 AM, Raymond Hettinger rep...@bugs.python.org
wrote:
AFAICT, there isn't a real problem here and the API for better-or-worse
has proven to be usable in practice (the callable() API has been around
practically forever and
Mark Lawrence added the comment:
The 3.x arg.html seems a great improvement to my eye compared to the 2.x
version so I'd guess this can be closed as out of date.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
Robert Collins added the comment:
Ok, so here's whats happening:
the default behaviour is to do discovery of '.', which bypasses the namespace
support code.
Running with tests as the first parameter works because it doesn't require the
directory being directly scanned to be a package.
Tim Golden added the comment:
I can't see anything here which is clearly a Python bug. If the OP or anyone
else cares to come back (after more than 4 years!) with a clearly-reproducible
problem I'm happy to revisit.
I apologise for waking up this issue after so long; we really should have
Alex Shkop added the comment:
Thanks. I understand the code pretty well and I saw issue17457 that fixes
discovery for explicitly specified namespace package.
What I need is to know how discovery has to work. Do we need to discover
namespace packages inside discovery path? And should we do
Roundup Robot added the comment:
New changeset cdadde8396a4 by Serhiy Storchaka in branch '3.4':
Issue #23908: os functions now reject paths with embedded null character
https://hg.python.org/cpython/rev/cdadde8396a4
New changeset bdf13c7dcf7f by Serhiy Storchaka in branch 'default':
Issue
Ionel Cristian Mărieș added the comment:
On Mon, Apr 20, 2015 at 4:50 AM, Eric Snow rep...@bugs.python.org wrote:
We should
simply leave callable alone (and consistent with the other helpers
that inspect the special *capability* of objects).
Which are the other helpers?
Thanks,
-- Ionel
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23485
___
___
Python-bugs-list mailing
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22117
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
The patch for 2.7 should be different and more complex. First at all, s and
u format units don't check for null character (but et and es used in Unix
implementations of os functions do).
--
stage: patch review - needs patch
versions: +Python 2.7
Alex Shkop added the comment:
This script creates following directory structure
issue_23882\
tests\
test_fail.py
If you run from issue_23882 directory
python -m unittest
it doesn't find any tests. If there is __init__.py inside tests folder, same
command finds test_fail.py and runs
Roundup Robot added the comment:
New changeset 8ab077c22fbf by Serhiy Storchaka in branch '2.7':
Issue #16840: Turn on support of bignums only in final release of Tcl 8.5.
https://hg.python.org/cpython/rev/8ab077c22fbf
New changeset 7f1622478d17 by Serhiy Storchaka in branch '3.4':
Issue
Serhiy Storchaka added the comment:
I thought that splitpath() could be used in implementations of realpath(),
relpath(), commonpath(), and in user code. But looks as realpath(), relpath()
and commonpath() should use specialized inlined versions for efficiency, and
user code can use more
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23863
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
There is at least one buildbot that now fails to build _tkinter.
http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%202.7/builds/2457/steps/test/logs/stdio
building '_tkinter' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -g -O0 -Wall
Christian Heimes added the comment:
Thanks, Brett!
--
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23998
___
R. David Murray added the comment:
Because special methods are special.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23990
___
___
Raymond Hettinger added the comment:
I would like to keep the time spent in the optimizer itself to a minimum.
Also, it should keep focused on patterns that actually occur in code as opposed
to contrived bits of code. Tim and Guido let us put it the optimizer only on
the condition that it
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24015
___
___
Python-bugs-list
STINNER Victor added the comment:
See also issue #20611 socket.create_connection() doesn't handle EINTR
properly which was closed as duplicated of this issue.
I'm not sure that #20611 is a duplicate.
--
___
Python tracker rep...@bugs.python.org
Brett Cannon added the comment:
LGTM
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23917
___
___
Christian Heimes added the comment:
How about restricting double pass optimization to code objects that have the
CO_OPTIMIZED bit set? It doesn't affect normal code execution.
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
Ryan Gonzalez added the comment:
Nevermind. I was just being stupid. I kept searching the Python directory
for references to get_codec_name and _PyMem_RawStrdup and completely missed
the Programs directory. Sorry.
Did the updated kbox_fix.patch work?
--
Eric Snow added the comment:
FYI, I'll re-iterate something I said before, there is a different approach you
can take here if this is just an issue of proxying. Use two different proxy
types depending on if the proxied object is callable or not:
class Proxy:
# all the proxy stuff...
Raymond Hettinger added the comment:
My point was about consistency in descriptor handling, not consistency
of fault (eg: broken everywhere). I don't understand why that's not
clear here.
That is clear but also isn't sufficient motivation. The proposed change is
unnecessary and not rooted
Eric Snow added the comment:
Ionel Cristian Mărieș added the comment:
Also, descriptors are a core mechanism in new-style classes - you can't
have methods without descriptors. Why would you even consider removing
descriptors from the special method lookup if that's part of the object
model
Thomas Kluyver added the comment:
Relative paths would be nice for Pynsist - I would prefer to create the config
file at build time and then install it along with the other files. If it needed
absolute paths, then the installer would have to write the config file after
the user selects the
Brett Cannon added the comment:
Just FYI, http://bugs.python.org/issue11549 can act as a tracking issue for an
AST optimization path that runs prior to the peepholer.
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
Cyd Haselton added the comment:
Ryan,
Completely forgot to download and apply it, but based on what I see there are a
few things that need to be corrected.
1) -python3.4m needs to be changed to -python3.5m...or the appropriate
versioning variable.
2) colons at the end of the elif lines in
Larry Hastings added the comment:
Attached is a patch implementing all my proposed changes here:
* types is now renamed accept
* it accepts a set of real Python types
* there are placeholder types for buffer, robuffer, rwbuffer
* nullable=True is gone, replaced with adding NoneType to accept={}
Larry Hastings added the comment:
I've implemented this change in the latest patch (#3) for #24001.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23920
___
Changes by Thomas Kluyver tak...@gmail.com:
--
nosy: +takluyver
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23955
___
___
Python-bugs-list
Joe Jevnik added the comment:
I tried bumping the magic number; however, I still cannot get consistent
results when running benchmark locally. I guess I will close this as I cannot
consistently show an improvement.
--
status: open - closed
___
Yury Selivanov added the comment:
Does the benchmark tool recompile the code every run?
Make sure you've bumped magic number in importlib/bootstrap; then make clean;
make
--
___
Python tracker rep...@bugs.python.org
Ionel Cristian Mărieș added the comment:
On Mon, Apr 20, 2015 at 5:42 PM, Raymond Hettinger rep...@bugs.python.org
wrote:
That is clear but also isn't sufficient motivation. The proposed change
is unnecessary and not rooted in real use cases. It is a semantic change
to a long-standing
New submission from Carol Willing:
Based on feedback from the PyCon 2015 CPython sprints (thank you R. David
Murray and all the CPython contributors there), a sprint organization section
will be added to the devguide.
Here are some suggested subtopics in the Sprints organization section:
*
Mert Bora Alper added the comment:
Thanks for the patch. We'll want a unit test for the behavior before
committing this.
You're welcome. Since I have no experience in writing unit tests, I don't
really know where to start but I will try to do my best.
I added bethard to the Nosy List, as
R. David Murray added the comment:
Yes, that's what I had in mind.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23987
___
___
Python-bugs-list
Ethan Furman added the comment:
So something like:
For container types such as list, tuple, or collections.deque, the expression
'x in y' is equivalent to 'any(x is e or x == e for e in y)'. For container
types such as set, frozenset, and dict, this equivalence expression is modified
by the
Joe Jevnik added the comment:
I am actually getting inconsistent results from running benchmark; I am pretty
surprised by this. I could look into making the second pass only happen if the
code has the CO_OPTIMIZED bit set; however, based on the results I am seeing
from the benchmark runs, I
eryksun added the comment:
To be consistent you'd have to do the attribute check in PyObject_Call as well,
i.e. if an object isn't callable, then trying to call it should raise a
TypeError. I think the cost can be mitigated by only checking heap types (i.e.
tp_flags Py_TPFLAGS_HEAPTYPE).
It
Mark Dickinson added the comment:
There is also no reason to break currently working code
Agreed. To take one example, David Beazley's PyCon 2015 talk would have been
broken by the suggested change! (See
https://www.youtube.com/watch?v=MCs5OvhV9S4, at around the 42:17 mark.)
If there's
Gregory P. Smith added the comment:
I wouldn't make an efficiency argument against it without trying it and
showing reproducible degradation in the hg.python.org/benchmarks suite.
On Sun, Apr 19, 2015, 10:31 PM Serhiy Storchaka rep...@bugs.python.org
wrote:
Serhiy Storchaka added the
Stefan Behnel added the comment:
I was (silently) hoping that this patching would eventually not be necessary
anymore because the one place (currently inspect.isgenerator()) would be
adapted to check for the generator protocol rather than the generator type. But
that was going to go into a
Mark Dickinson added the comment:
Huh. I assumed that timeit was doing this already. +1 from me.
Affects Python 3.4 and 3.5, too.
taniyama:~ mdickinson$ time python -m timeit import time; time.sleep(1.0)
10 loops, best of 3: 1 sec per loop
real0m40.165s
user0m0.040s
sys 0m0.024s
Stefan Behnel added the comment:
I created issue 24018 for adding a Generator ABC to collections.abc.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24004
___
Changes by Stefan Behnel sco...@users.sourceforge.net:
--
nosy: +scoder
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
___
Guido van Rossum added the comment:
It's missing tests. :-)
Otherwise looks quite sensible.
Also, shouldn't you override __subclasshook__ so you don't inherit it from
Iterator?
--
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@gmail.com:
--
hgrepos: -306
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
___
___
Python-bugs-list
New submission from Yury Selivanov:
Here's the first patch (git diff master..await). Should be easier to review and
work from there.
--
keywords: +patch
stage: - patch review
Added file: http://bugs.python.org/file39147/async_01.patch
___
Python
Yury Selivanov added the comment:
Attaching a patch generated with mercurial
--
Added file: http://bugs.python.org/file39148/await_01.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
1 - 100 of 121 matches
Mail list logo