Larry Hastings added the comment:
Yury, can you look in to this?
I have been modifying inspect.signature, but (almost) exclusively in
from_builtin. If this is my fault I'll be happy to fix it.
--
nosy: +larry
___
Python tracker
Larry Hastings added the comment:
I just tried it in 3.3 (3.3.1rc1) and it had the same problem.
--
___
Python tracker
<http://bugs.python.org/issue20401>
___
___
New submission from Larry Hastings:
The documentation for heapq.nsmallest and heapq.nlargest:
http://docs.python.org/3.3/library/heapq.html#heapq.nlargest
claim that they accept three arguments: n, iterable, and key=None. In fact,
the implementations of both these functions only accept two
Changes by Larry Hastings :
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue20407>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Larry Hastings:
The documentation for the memoryview constructor says it takes memoryview(obj).
Oddly, memoryview accepts keyword arguments (for its one required value), and
the name of the argument is "object", not "obj".
--
messages: 20943
Larry Hastings added the comment:
For what it's worth: I figured out how this happened. Maybe it's obvious to
you, but this behavior baffled me until I went back and looked at the revision
history.
In revision e260d6daf784, the argument parsing for itertools.repeat looks
Larry Hastings added the comment:
(With a Misc/NEWS entry of course.)
--
___
Python tracker
<http://bugs.python.org/issue20308>
___
___
Python-bugs-list mailin
Larry Hastings added the comment:
Looks perfect! Please check it in.
--
___
Python tracker
<http://bugs.python.org/issue20308>
___
___
Python-bugs-list mailin
Larry Hastings added the comment:
Attached is a second patch.
* Now includes input and output checksums. Checksums are now
truncated to 16 characters each, otherwise the line is >80 columns.
* Fixes the doubled-up signature lines for type object slot default
signatures. I ran &quo
Larry Hastings added the comment:
I've attached a script here that uses the new tweaked format of Clinic
blocks. The new tweaked format isn't checked in yet--that change is being
tracked with #20326.
Once that's checked in, though, the attached script will check that both
Larry Hastings added the comment:
I'm surprised it made a review link. It didn't apply cleanly for me here.
While merging I noticed that the imperative declension fix had snuck out of the
diff somehow. So I redid that.
Attached is an updated patch.
Also I should mention:
Changes by Larry Hastings :
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Larry Hastings added the comment:
Yeah. I did a pretty terrible job of articulating why the "("
signature was a bad idea in the first place ;-)
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
Yup, sorry about that. We're moving pretty fast with the Derby right now, and
sometimes we don't figure out something important until later, and sometimes
that means wasted effort. Sorry!
--
___
Pyth
Larry Hastings added the comment:
I expect to be pretty lenient when it comes to asyncio, as it has no installed
base yet and is marked provisional. Also it has a lot of eyes on it right now,
so I'm kind of assuming the vetting process for changes at this late date is
getting a l
Changes by Larry Hastings :
--
nosy: +larry
___
Python tracker
<http://bugs.python.org/issue17162>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Larry Hastings:
While working on posixmodule.c today I noticed that some functions that accept
file descriptors call PyObject_AsFileDescriptor(). This function accepts ints.
It *also* accepts objects that expose a .fileno() attribute, calling that
attribute and using the
Larry Hastings added the comment:
The functions that use PyObject_AsFileDescriptor() also call _PyVerify_fd(),
which magically determines whether or not the file descriptor is valid. Only
works on Windows though.
--
___
Python tracker
<h
New submission from Larry Hastings:
If you have:
module.f1
path: path_t
...
module.f2 = module.f1
Then the initializer for "path" in module_f2 will supply "f1" as the function
name for error messages.
--
assignee: larry
messages: 209615
Larry Hastings added the comment:
Submitting this just so I beat the deadline. I'm *about* half done, but I'm
still working on it, so I'm just going to keep going--should only be another
couple of hours.
(If somebody else pulls this stunt, I guess I'll accept t
Larry Hastings added the comment:
Here's a complete patch, converts everything that I think should be converted
for 3.4. With this patch applied, all unit tests pass on my 64-bit Linux box.
I plan to also run tests with the buildbots before checking it in.
The patch... well, it
Larry Hastings added the comment:
By the way, my plan is to turn on the file preset just before checkin. The
patch is *much* easier to read without turning that on first; with the file
preset, now you have to keep two windows in sync to compare calls to PyArg_
Larry Hastings added the comment:
LGTM. If it compiles cleanly and passes the unit test suite--which obviously
it should--you may check the 3.4 patch to trunk.
--
nosy: +larry
___
Python tracker
<http://bugs.python.org/issue20
Larry Hastings added the comment:
Sorry for the fresh update, but here's revision 3. Only changes:
* Gave os.access a -> bool return converter.
* Fixed up a lot of whitespace. Now, major "things" are separated by
two empty lines, but removed whitespace between
#if
Larry Hastings added the comment:
Actually, forget about the file output preset. It wouldn't work for
posixmodule. > 80% of the entry points are #ifdef conditional on platform
functionality. Which means the Clinic generated stuff needs to be #ifdef too.
It wouldn't be that ha
Larry Hastings added the comment:
That's a really good idea! I'm still thinking about how I'd do it, but I think
I'm gonna give it a try.
--
___
Python tracker
<http://bug
Larry Hastings added the comment:
I thought I replied to this... weird.
Do I understand correctly that it's basically impossible to write a proper
custom deallocator in the limited API right now, because you can't get access
to your base class's tp_free?
(If so, why didn
Larry Hastings added the comment:
Also, isn't it reasonable to pass in non-heap type objects? I realize
supporting this would complicate the implementation a great deal.
--
___
Python tracker
<http://bugs.python.org/is
Larry Hastings added the comment:
Yup!
--
assignee: -> larry
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python
Larry Hastings added the comment:
parser_body_fields is initialized to () these days, which should make this
problem go away. Do you still have the issue in current trunk?
Again, if you'd attached a reproducable test case, I could have independently
verified the problem, and that i
Larry Hastings added the comment:
I was thinking of a subclass of an existing class, both implemented in C.
collections.Counter does that, but it uses _PyType_LookupId() which is in the
limited API.
Would it be possible to achieve equivalent functionality by using
_PyType_LookupId()? If so
Larry Hastings added the comment:
(And, I freely admit I don't understand all this that well and that could be a
very dumb question.)
--
___
Python tracker
<http://bugs.python.org/is
Changes by Larry Hastings :
--
nosy: -larry
___
Python tracker
<http://bugs.python.org/issue20328>
___
___
Python-bugs-list mailing list
Unsubscribe:
Larry Hastings added the comment:
Could you give this issue a more descriptive name please?
--
nosy: +larry
___
Python tracker
<http://bugs.python.org/issue20
New submission from Larry Hastings:
Probably the last rollup patch for a while; I need to move on to code
reviewing.
Here's a list of changes in this patch:
* I added the oft-requested "rename the C variable for a parameter"
functionality. That works as follows:
Larry Hastings added the comment:
Tell you what. If this *specifically* is a fix for Cython, please add a some
text saying that to the comment for the duck-type test function.
If you do that, and assuming that test_inspect still passes, then you may check
it in
Larry Hastings added the comment:
Updated the patch.
* The "methoddef_ifndef" template is now sent to the "buffer"
destination by default. I expected posixmodule to have an #ifndef,
I was surprised to find _import had one too. Both files touched
to move the buffer to
New submission from Larry Hastings:
Yury: In revision 9433b380ad33 you changed inspect.Signature so that it cannot
handle builtin classes. Please fix it.
>>> import _pickle
>>> import inspect
>>> str(inspect.signature(_pickle.Pickler))
Larry Hastings added the comment:
I'd like to investigate this, but I can't reproduce it. So far it only happens
on the "AMD64 FreeBSD 9.0 3.x" buildbot.
Is there a way I can get remote access to that machine?
--
assignee: -> larry
___
Larry Hastings added the comment:
Checked in! I think that's the last new feature for Argument Clinic until
after 3.4 ships.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python
Larry Hastings added the comment:
Because slots like tp_init and tp_call don't have docstrings. So it has to go
in the class's docstring.
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
I meant to say "slots like tp_new and tp_init". But fwiw it's true of tp_call
too.
--
___
Python tracker
<http://bugs.pyt
Larry Hastings added the comment:
And, I don't see how your changes to inspect.py could have caused the failures
on the buildbot either. But, then, I don't see how *anything* could cause the
failures on the buildbot. And your changes to inspect.py happened at (I think)
roughly the
Larry Hastings added the comment:
Good thinking! I don't know when I can get to it though, maybe Sunday.
--
___
Python tracker
<http://bugs.python.org/is
Larry Hastings added the comment:
Stefan Krah suggests that the failure in 20473 is because that platform builds
without docstrings, and the test requires them. So that should be an easy fix.
--
___
Python tracker
<http://bugs.python.
Larry Hastings added the comment:
In case a little background would help: while developing support for
'__text_signature__' I had to move the test and the from_builtin() call to the
top. It used to be more in the middle-ish. I don't have notes specifically on
why I moved
Larry Hastings added the comment:
> That's likely true for CPython itself, at least currently.
> I don't think it's generally a safe assumption in the CPython
> ecosystem, which includes things like Cython, Numba, Nuitka and others,
While I'm happy to accommodate
Larry Hastings added the comment:
What semantics are unsettled?
--
___
Python tracker
<http://bugs.python.org/issue20473>
___
___
Python-bugs-list mailin
Larry Hastings added the comment:
I don't think __text_signature__ should ever be a documented public API.
--
___
Python tracker
<http://bugs.python.org/is
Larry Hastings added the comment:
That buildbot is happy now. Thanks for pointing it out!
--
___
Python tracker
<http://bugs.python.org/issue20308>
___
___
Pytho
Larry Hastings added the comment:
> What I'm saying is that the existing function introspection API
> would have provided a much better way to do these things,
> and that it's good to finally have the meta data available in the
> source code so that that API can be made a
Larry Hastings added the comment:
> Not for builtin functions, but it's unclear to me why the API of
> builtin functions should be different from that of Python functions
> (except, as I said, for the existence of byte code).
I really don't follow you. You see
Larry Hastings added the comment:
Yyou have just answered the question "How do you determine signature
information for functions written in Python?". A shorter way to express this
answer: functions written in Python are implemented as a "function object" (in
C, PyFu
Larry Hastings added the comment:
> > Also also, I remember specifically that the isinstance(type) code
> > would fail builtin classes.
>
> Could you please find an example of this?
This was during the development of the original feature. I changed the if
statement for the f
Larry Hastings added the comment:
As release manager, I would be willing to consider this patch. However, as
original author of the code in question, I don't like it. Showing zero
filenames, while potentially less confusing, is also far less helpful. A
better solution would be to show
Larry Hastings added the comment:
If it's fixed in 3.4, then the first step would be to ask Georg if he will
accept a fix for 3.3. If he will not, then we don't need to go any further.
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
Mark Lawrence: you can remove it yourself, by directly editing the "nosy" list
on the page for the bug. If you want to remove yourself from all issues on the
tracker, click on the "Followed by you" link on the left side and work you
Larry Hastings added the comment:
Nope, we can't fix it in zlib. As far as I can tell, the problem is that
method_get() in descrobject.c passes in NULL for the module to
PyCFunction_NewEx(). method_get gets the type as part of the descriptor
protocol, but type objects in C don't
Larry Hastings added the comment:
BreamoreBoy: why did you remove Arfrever from this issue?
--
___
Python tracker
<http://bugs.python.org/issue15027>
___
___
Pytho
Larry Hastings added the comment:
I'm not sure I need to be on this issue. As a rule, Windows build concerns for
3.4 are delegated to Martin von Lowis.
--
___
Python tracker
<http://bugs.python.org/is
Larry Hastings added the comment:
I assumed that you guys took responsibility for the binary installers, and the
decision was up to you. But I'm happy to take ultimate responsibility for the
decision to ship SQLite 3.8.3 with 3.4 if that's what policy demands, and yes I
give it m
Larry Hastings added the comment:
Ned, yeah I recall the discussion, and I didn't think you needed a further
pronouncement from me. I was just saying, I'm not sure you *ever* needed a
pronouncement from me. ;-)
Everything's perfectly alright now. We're fine... we're
New submission from Larry Hastings:
There are a bunch of functions provided by Python, e.g.
PyErr_SetFromErrnoWithFilenameObject(), that allow specifying a filename
associated with the error. But there are some errors that really need two
filenames, like copy(), symlink(), and rename(). The
Larry Hastings added the comment:
I probably should have continued with this issue instead of creating a new
issue for it, sorry. But there's a new issue tracking this change, where I
propose to add new error-reporting functions that support two filenames.
That's happening
Larry Hastings added the comment:
Serhiy: I'm not sure if it's the language barrier, but that came across kind of
mean. It's not that I can do whatever I want as release manager, but that I
have the say in whether something is a "bug fix" or a "new feature",
New submission from Larry Hastings:
Following a new discussion of the format of the text signature, I decided to go
with this:
(...)\n--\n\n
See here for the discussion:
https://mail.python.org/pipermail/python-dev/2014-February/132271.html
Patch attached implementing this approach
Larry Hastings added the comment:
Whoops, forgot to fix all the breakage in clinic_test.py. It's good now.
--
Added file:
http://bugs.python.org/file33942/larry.even.newerer.signature.syntax.1.diff
___
Python tracker
<http://bugs.py
Changes by Larry Hastings :
Removed file:
http://bugs.python.org/file33941/larry.even.newerer.signature.syntax.1.diff
___
Python tracker
<http://bugs.python.org/issue20
Larry Hastings added the comment:
Thanks for noticing the "(/)", that's fixed.
Yes, the signature for type() was wrong. type() can accept either one
parameter or three parameters--in other words, it uses optional groups. And we
can't represent optional groups in
Larry Hastings added the comment:
Nick: I made the same fix on the plane, except I also added an assert that end
- start >= 2. ;-)
I'm going to go through everyone's feedback, and if there are any significant
changes I'll post a new patch, otherwise I think this patch
Larry Hastings added the comment:
I made a couple final tweaks to what was essentially Nick's patch:
* Argument Clinic wraps parameters in the signature at 72 columns
instead of 79 columns. There are a couple extra characters that
get emitted, so this ensures that the generated line
Larry Hastings added the comment:
This checkin appears to be causing a regression in the Windows buildbots.
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4040
test_streamreaderwriter (test.test_codecs.WithStmtTest) ... test test_codecs
failed
ok
Changes by Larry Hastings :
--
resolution: fixed ->
stage: committed/rejected -> needs patch
status: closed -> open
___
Python tracker
<http://bugs.python.or
Larry Hastings added the comment:
And to be clear: I'm currently waiting on this before tagging 3.4rc1. If
someone who understands the issue could fix this soon, I would appreciate it.
--
___
Python tracker
<http://bugs.python.org/is
Larry Hastings added the comment:
Here's a first cut at a patch. With this applied Python passes the whole test
suite.
I was surprised at how ticklish the OSError object was about adding a fifth
member, with this weird "exception tuples can only have two members"
Larry Hastings added the comment:
Marking as closed and opening a new issue as per Serhiy's suggestion.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
New submission from Larry Hastings:
The Windows buildbots are currently broken due to a codec issue. I populated
the "nosy" list based on the "unicode" experts from the Experts Index.
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4040
tes
Larry Hastings added the comment:
Note that this appears to be in Windows-specific code ("CP_UTF8"), rather than
being cross-platform code which happens to only fail on Windows. So we need
someone who does both Windows and Unicode.
--
Larry Hastings added the comment:
Use #3.
--
___
Python tracker
<http://bugs.python.org/issue20283>
___
___
Python-bugs-list mailing list
Unsubscribe:
Larry Hastings added the comment:
"pattern" should be keyword-only, and if used the function should generate a
DeprecationWarning.
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
Added a test checking that the error messages show up properly.
--
assignee: -> larry
stage: needs patch -> patch review
Added file: http://bugs.python.org/file34005/larry.oserror.add.filename2.2.diff
___
Larry Hastings added the comment:
Serhiy said on IRC that he doesn't have a Windows development environment, so
he didn't think he could help.
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
There aren't any deprecation warnings in the code.
--
___
Python tracker
<http://bugs.python.org/issue20517>
___
___
Pytho
Larry Hastings added the comment:
But the PyErr_ functions that accept Py_UNICODE aren't marked deprecated.
http://docs.python.org/3.4/c-api/exceptions.html#unicode-exception-objects
--
___
Python tracker
<http://bugs.python.org/is
New submission from Larry Hastings:
I just realized that the signatures for builtin slot functions (__iadd__,
__delitem__, etc) only accept positional-only arguments. But when I added the
signatures by hand to all the slots I didn't mark them as positional-only. The
attached patch rem
Larry Hastings added the comment:
Attached is patch #3. This one has been tested on Linux, Windows 7 64-bit, and
Snow Leopard 64-bit. Windows Server 2008 32-bit and 64-bit
are running now, looking good so far.
Changes:
* The order of arguments for OSError is now:
(errno, string
Larry Hastings added the comment:
New patch incorporating Serhiy's suggestions. Thanks, Serhiy!
Did more testing with the buildbots. Windows Server 2008 32-bit and 64-bit
were both fine. So were ARMv7, OpenIndiana 64-bit, Gentoo 32-bit, FreeBSD 10
64-bit, and PowerLinux PPC 64-bit.
Larry Hastings added the comment:
One more tweak from Serhiy.
--
Added file: http://bugs.python.org/file34015/larry.oserror.add.filename2.5.diff
___
Python tracker
<http://bugs.python.org/issue20
Larry Hastings added the comment:
Okay. I have revived the Py_UNICODE functions I removed in patch #3. The
patch now works fine on my Ubuntu 13.10 64-bit box, and at least compiled on a
Windows buildbot. It's now building on nine buildbots.
Assuming the buildbots look good, can I
Larry Hastings added the comment:
It's in! And the buildbots look healthy.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
Larry Hastings added the comment:
I used a different issue number in Misc/NEWS, but this was fixed in revision
28aef6e22736 checked in just a little while ago.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -&g
Larry Hastings added the comment:
Talked it over with Victor in IRC. I agree it's best to only add the
WithFilenameObjects functions, as best practice requires using the original
PyObject * passed in when creating the OSError.
The attached patch removes all the new WithFilename
Larry Hastings added the comment:
Buildbots are basically happy with it. It's checked in. This was the last
checkin before 3.4.0rc1 was tagged!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.
Larry Hastings added the comment:
This isn't a release blocker. And it's not really viable to remove it.
Since it's been in several releases, I suspect our only option is to throw a
deprecation warning. And, since deprecations aren't turned on by default,
maybe the be
Larry Hastings added the comment:
My suggestion for documenting it was to document the fact that it's
unsupported, unrecommended, deprecated, has poor semantics, etc. If a user
discovers it, and finds it's not documented, they'll probably think they can
get away with u
Larry Hastings added the comment:
Yes, this can go in.
--
___
Python tracker
<http://bugs.python.org/issue20594>
___
___
Python-bugs-list mailing list
Unsub
Larry Hastings added the comment:
Is this more than a theoretical problem?
--
___
Python tracker
<http://bugs.python.org/issue20595>
___
___
Python-bugs-list m
Larry Hastings added the comment:
Let's be a little smarter. PATH_MAX isn't used anymore. Just remove the
#defines entirely.
--
___
Python tracker
<http://bugs.python.o
Larry Hastings added the comment:
Assuming you keep an eye on the buildbots, this has my permission to go in.
Martin: While we don't officially support those compilers, I don't see the harm
of removing unused #defines, so I'm willing to ac
Larry Hastings added the comment:
What bad thing will happen if I don't accept this for 3.4?
--
___
Python tracker
<http://bugs.python.org/issue20414>
___
___
1501 - 1600 of 2389 matches
Mail list logo