Victor Varvariuc added the comment:
Maybe I should have created another issue for this, but without this issue
being solved, the new issue will not help much.
Here it is:
http://hg.python.org/cpython/file/37caaf21f827/Lib/concurrent/futures/thread.py#l63
After running an work item
New submission from Serhiy Storchaka:
For the default keyword parameter Argument Clinic generates wrong name
default_value in the _keywords array.
/*[clinic]
module spam
spam.ham
default: int = 1
[clinic]*/
...
static PyObject *
spam_ham(PyModuleDef *module, PyObject *args, PyObject
Roundup Robot added the comment:
New changeset e09644eb6b20 by Gregory P. Smith in branch '2.7':
Should fix the issue19081 fix on Windows. Don't let the previous
http://hg.python.org/cpython/rev/e09644eb6b20
--
___
Python tracker
New submission from Serhiy Storchaka:
It will be helpful to add the --clean option for the clinic tool, which removes
all Argument Clinic generated code.
--
messages: 207515
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic: add --clean
Larry Hastings added the comment:
When would you want this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20158
___
___
Python-bugs-list
Larry Hastings added the comment:
I'll fix this but it's low priority for today.
It's not a release blocker; we could release Python 3.4 with this bug.
--
assignee: - larry
priority: release blocker - normal
___
Python tracker
New submission from Serhiy Storchaka:
Here is a patch which converts xml.etree.ElementTree accelerator module to use
Argument Clinic. 34 methods are converted. Not converted __init__ methods (is
Argument Clinic support it?) and the SubElement function which seems can't be
converted.
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +Argument Clinic generates wrong keyword parameter name for
default, Argument Clinic: broken support for 'O!'
___
Python tracker rep...@bugs.python.org
Gregory P. Smith added the comment:
updated 3.3 patch based off the changes made to the 2.7 one.
--
Added file: http://bugs.python.org/file9/issue19081-33-gps05.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19081
Changes by Gregory P. Smith g...@krypto.org:
Removed file: http://bugs.python.org/file33323/issue19081-33-gps04.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19081
___
New submission from Mark Dickinson:
The argument-passing code for passing structs larger than 8 bytes is broken on
64-bit Windows, leading to potential segmentation faults or other unpredictable
behaviour. According to
http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
structs not of
New submission from Serhiy Storchaka:
inspect.signature fails on some functions which use Argument Clinic. For
example after applying issue20133 or issue20151 it fails for audioop.ratecv and
binascii.a2b_qp.
inspect.signature(audioop.ratecv)
Traceback (most recent call last):
File stdin,
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +inspect.signature fails on some functions which use Argument
Clinic
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20151
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +inspect.signature fails on some functions which use Argument
Clinic
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20148
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +inspect.signature fails on some functions which use Argument
Clinic
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20133
Larry Hastings added the comment:
I already noticed this; it'll be fixed in the patch for #20144. But thanks for
the report!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20161
___
Larry Hastings added the comment:
For the record, I'd be very happy to accept a patch for this into 3.4 at any
time.
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20160
___
Serhiy Storchaka added the comment:
As fast as it is possible. This shouldn't be hard task, Argument Clinic
already clean old generated code before inserting new code.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20158
Larry Hastings added the comment:
I meant, under what circumstances would you want to use this?
I don't know why you would ever want --clean. Removing the output from the
Argument Clinic blocks would break any file using it. And Argument Clinic is
sufficiently fast, if you were worried
Larry Hastings added the comment:
Here's a second patch; I think this is ready to go in
I cleaned up the node parsing a lot. It now knows how to parse the following
types of default values:
* Number (this applies to both ints and floats)
* String ('hello')
* Attribute (sys.maxsize)
*
Larry Hastings added the comment:
Oops! I forgot to actually attach the new patch. I'm dumb.
--
Added file:
http://bugs.python.org/file33340/larry.simple.symbolic.constant.default.values.diff.2.txt
___
Python tracker rep...@bugs.python.org
Larry Hastings added the comment:
Antoine just suggested that, if we used this accumulator thing, we'd want a
convention for where the generated text should go. I actually have an answer
for that: near the end, below the implementations of the module / class
methods, but above the
Stefan Krah added the comment:
I think maybe I only showed it to Stefan Krah, who said it wouldn't help his
use case so I dropped it.
I think we were talking about _decimal, where any tool will interfere with the
100% code coverage patches. But that's a special case.
--
Serhiy Storchaka added the comment:
This would just make sources more readable and editable. While I read, write
or edit code, I don't want generated code distract me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20158
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2263
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9307
___
___
Python-bugs-list
Larry Hastings added the comment:
I don't think Argument Clinic should do this. It would leave the file in a
broken state. But if it's an option on clinic.py it might tempt somebody into
using it, then they'd be confused.
If you want this functionality, please hack it up yourself locally.
Larry Hastings added the comment:
Attached is a new, simpler approach for supporting O!. The object() converter
now takes two arguments:
* type, which is the type you want the parameter declared as
(e.g. PyUnicodeObject *)
* subclass_of, which is the PyTypeObject you want to enforce
New submission from Yury V. Zaytsev:
Hi,
When I try the following:
./python -m test -v test_hash
on a self-compiled Python 3.4.0b2 on RHEL 6.5 / ppc64, it fails. Please let me
know which additional information I can supply to diagnose the problem.
The complete traceback below:
==
Changes by Antoine Pitrou pit...@free.fr:
--
components: +Interpreter Core
nosy: +David.Edelsohn, christian.heimes, dmalcolm
priority: normal - high
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20162
Yury V. Zaytsev added the comment:
As requested by Victor Stinner:
./python -c 'import sys; print(sys.hash_info)'
sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0,
imag=103, algorithm='siphash24', hash_bits=64, seed_bits=128, cutoff=0)
--
components:
Yury V. Zaytsev added the comment:
Sorry for accidentally rolling back your changes to the bug, Antoine!
--
components: +Interpreter Core -Tests
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20162
Changes by Yury V. Zaytsev y...@shurup.com:
--
components: +Tests
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20162
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 81f8b4744f1a by Victor Stinner in branch 'default':
Issue #20162: test_hash_distribution() uses subTest() to mention the prefix in
http://hg.python.org/cpython/rev/81f8b4744f1a
--
nosy: +python-dev
___
Yury V. Zaytsev added the comment:
==
FAIL: test_hash_distribution (test.test_hash.HashDistributionTestCase)
(prefix='abc')
--
Traceback (most recent call
Serhiy Storchaka added the comment:
It is marked crash because Argument Clinic generates code which crashes. It
is assigned to docs because this feature documentation is misleading.
--
___
Python tracker rep...@bugs.python.org
Yury V. Zaytsev added the comment:
To check whether the problem is in the _le64toh() macro as suggested by Victor
Stinner, I've tried the attached patch and the problem is gone.
As it turns out, there actually seem to be two problems:
First, HAVE_ENDIAN_H is properly defined, because the
Yury V. Zaytsev added the comment:
I was also asked to mention this:
https://github.com/majek/csiphash/blob/master/csiphash.c
as an alternative implementation of siphash and platform checks.
--
___
Python tracker rep...@bugs.python.org
Larry Hastings added the comment:
Patch attached. I tweaked the punctuation in the last line, from this:
/*[clinic end generated code; checksum: {checksum}]*/
^ ^
to this: | |
v v
New submission from dellair jie:
Hello,
We are using Python 3.3.2 for HPUX11.31.
The following error happens only on HPUX, works on SunOS, RHEL, AIX.
python
Python 3.3.2 (default, Dec 9 2013, 14:04:25) [C] on hp-ux11
Type help, copyright, credits or license for more information.
from
Giampaolo Rodola' added the comment:
I don't think this should be documented as personally I wouldn't expect this
use case to be working in the first place.
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
Try to isolate which field fails. Example:
import time
time.strptime (10-Dec-13.20:07:49, %d-%b-%y.%H:%M:%S)
time.struct_time(tm_year=2013, tm_mon=12, tm_mday=10, tm_hour=20, tm_min=7,
tm_sec=49, tm_wday=1, tm_yday=344, tm_isdst=-1)
time.strptime
Larry Hastings added the comment:
Consider: if you ran clinic.py --clean on a C file, then tried to use make
clinic, the makefile would first try to build the C file. But since the C
file is now broken, the make would fail. And you can't use make clinic to
regenerate the Clinic output.
Larry Hastings added the comment:
There are lots of ways you can crash Python by giving erroneous input to
Argument Clinic. Clinic has no visibility into the C type system, so it has no
way of verifying whether or not the type objects you pass in are correct.
That's unfixable and not really
Larry Hastings added the comment:
At Antoine's suggestion, I added a custom function to testcapi that exercises
all the different possible types for default values in a text signature. Also
the docs have been updated. LGTU?
--
Added file:
dellair jie added the comment:
Victor,
Thanks for the comment.
Isolated, the error happens at:
import time
time.strptime (Dec, %b)
Traceback (most recent call last):
File stdin, line 1, in module
File /python/lib/python3.3/_strptime.py, line 494, in _strptime_time
tt =
dellair jie added the comment:
The output of command:
$ date +'%b'
Jan
$ uname -a
HP-UX test5 B.11.31 U ia64 4201936010 unlimited-user license
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20163
Guido van Rossum added the comment:
The new syntax is fine; I was only giving an example.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19723
___
STINNER Victor added the comment:
time.strptime (Dec, %b)
ValueError: unconverted data remains: Dec
Ok, so what is the name of the December month?
import time
time.strftime(%b, time.gmtime(1387036705))
'Dec'
--
___
Python tracker
New submission from Chris Adams:
This is a more general version of #10496: os.path.expanduser is documented as
returning the unmodified string if it cannot be expanded
(http://docs.python.org/3/library/os.path.html#os.path.expanduser) but there's
one edge case where this can fail: when
dellair jie added the comment:
We get an empty string for the name. :)
time.strftime(%b, time.gmtime(1387036705))
''
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20163
___
Yury V. Zaytsev added the comment:
After lots of fiddling, I can tell you what's wrong with the macro: apparently
it's a compiler bug, visible at -O2 and disappearing at -O1.
Assembly output is attached, unfortunately, I'm no ppc64 expert, so I can't
immediately tell what exactly went wrong.
Yury V. Zaytsev added the comment:
Amusingly, it's also the case on BG/Q compute nodes. Only this morning, I
cooked up the following patch:
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -237,7 +237,11 @@ def expanduser(path):
if i == 1:
if 'HOME' not in os.environ:
Dave Malcolm added the comment:
On Tue, 2014-01-07 at 16:30 +, Yury V. Zaytsev wrote:
Yury V. Zaytsev added the comment:
After lots of fiddling, I can tell you what's wrong with the macro:
apparently it's a compiler bug, visible at -O2 and disappearing at -O1.
Can you reduce the
STINNER Victor added the comment:
We get an empty string for the name. :)
Ok, it's maybe time to upgrade to Linux :-) (How old is HPUX? I didn't know
that it's still in use.)
I don't see how Python could workaround the issue if strftime(%b) doesn't
work. An option would be to reimplemenet
Roundup Robot added the comment:
New changeset e4d98ed54c53 by Brett Cannon in branch 'default':
Issue #20096: Update the Python 2/3 porting HOWTO to focus on
http://hg.python.org/cpython/rev/e4d98ed54c53
--
nosy: +python-dev
___
Python tracker
Yury V. Zaytsev added the comment:
Hi David,
It's gcc from RHEL 6.5 gcc-4.4.7-4.el6.ppc64, the flags are -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes vs. -DNDEBUG -g -fwrapv -O1 -Wall
-Wstrict-prototypes.
The problem is, I can't isolate it. We honestly tried it with Victor, but gcc
Serhiy Storchaka added the comment:
How it differs from the case when you just edit clinic declaration and *_impl
function? Until you run clinic on this source file, it is broken.
I see that peoples already confused by Argument Clinic and manually edit
generated code.
--
Yury V. Zaytsev added the comment:
Look for _le64toh ;-)
--
Added file: http://bugs.python.org/file33347/pyhash.preproc.c
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20162
___
Larry Hastings added the comment:
The problem was an easy fix. However, while fixing it I discovered another
problem (if [clinic]*/ was the last line, and it didn't have an eol, Clinic
would append another [clinic]*/). I fixed that too and added a regression
test.
Okay?
--
Added
Changes by Brett Cannon br...@python.org:
--
assignee: docs@python - brett.cannon
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20096
___
Larry Hastings added the comment:
If you edit the Clinic input and don't run clinic.py on it, it's out-of-date
but not broken.
If you edit the Clinic output and make a mistake, it's *your* fault.
If you ran clinic.py --clean, now you've broken your file *and* the normal
Clinic build system
Yury V. Zaytsev added the comment:
Digging more into it, I guess I know why we couldn't come up with a minimal
reproducer for this problem. If I compile with -O2 instead of -O1, I get the
following warning from gcc:
Python/pyhash.c:413: warning: dereferencing pointer 'pt.32' does break
STINNER Victor added the comment:
Python/pyhash.c:413: warning: dereferencing pointer 'pt.32' does break
strict-aliasing rules
Attached patch siphash_ppc64.patch should fix this aliasing issue.
--
nosy: +haypo
Added file: http://bugs.python.org/file33349/siphash_ppc64.patch
Changes by Yury V. Zaytsev y...@shurup.com:
--
nosy: +zaytsev
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10496
___
___
Python-bugs-list mailing
Arfrever Frehtes Taifersar Arahesis added the comment:
New changeset 37caaf21f827 by Eric Snow in branch 'default':
Issue 19713: Add PEP 451-related deprecations.
http://hg.python.org/cpython/rev/37caaf21f827
...
-spec.loader.load_module(spec.name)
+try:
+
Larry Hastings added the comment:
Incorporated suggestions from Serhiy. Thanks, Serhiy!
--
Added file:
http://bugs.python.org/file33348/larry.simple.symbolic.constant.default.values.diff.4.txt
___
Python tracker rep...@bugs.python.org
Yury V. Zaytsev added the comment:
Related issue where memcpy() was discussed: http://bugs.python.org/issue19183 .
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20162
___
STINNER Victor added the comment:
Attached patch siphash_ppc64.patch should fix this aliasing issue.
It looks like memcpy was discussed in the initial issue #19183 for
performances. IMO the function must first produce the good result, and
then be fast :-)
--
Roundup Robot added the comment:
New changeset 2d81d0d42ae2 by Serhiy Storchaka in branch '3.3':
Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
http://hg.python.org/cpython/rev/2d81d0d42ae2
New changeset 1628cd94db52 by Serhiy Storchaka in branch 'default':
Issue
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18515
Christian Heimes added the comment:
Oh heck ... I didn't run into this issue when I was testing siphash on all
platforms. Could it be a compiler bug? I'd rather not change the code and
deviate from the reference implementation. It's a performance critical part...
--
dellair jie added the comment:
Victor,
HPUX 11.31 was first released in 2007, we keep upgrading and the latest update
is in 2013. ^_^
A workaround sounds fine. By re-implementing strftime(), do you mean to patch
it from: http://bugs.python.org/issue1777412?
--
Serhiy Storchaka added the comment:
Looks as 2.7 is not affected.
If there are no objections I will commit this patch tomorrow.
--
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20078
Serhiy Storchaka added the comment:
On platforms where unaligned access is not an issue, gcc produces for memcpy()
an optimal binary code equivalent to simple assignment of 32-bit value. Only
MSVC produces slow code, but Windows works only on platforms where unaligned
access is not an issue.
Yury V. Zaytsev added the comment:
Hi Christian,
Dave says it's not a compiler bug; the code is slightly violating the C
standard, and the compiler optimizes based on a strict reading of the rules.
If I compile with -O2 and higher (while -O3 is the default for Python, as far
as I can
Serhiy Storchaka added the comment:
Benjamin, current version (without switch) looks more clean to me. Are you
insist?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18960
___
STINNER Victor added the comment:
Only MSVC produces slow code, but Windows works only on platforms where
unaligned access is not an issue.
My patch uses Py_MEMCPY() which uses a loop to copy bytes on Visual
Studio for length smaller than 16 bytes (SipHash copies 4 bytes).
--
Serhiy Storchaka added the comment:
If you ran clinic.py --clean and then not ran clinic.py without --clean, it's
*your* fault. And you will noticed this when run make.
I have named this option --clean because it is similar to 'make clean' and
'make distclean'.
If you want make automatically
Chris Adams added the comment:
Other than hoisting the warnings import to the top (PEP-8) that seems entirely
reasonable to me. The user report which we got was confusing because it was
non-obvious where it came from - a warning or other pointer would have helped
the original reporter get an
Larry Hastings added the comment:
I must admit I am losing patience with this conversation. Argument Clinic is
not going to provide an attractively-named option that breaks your build and
requires fixing by hand. The bug is closed, the feature is not happening, it's
my hope that we can now
Antoine Pitrou added the comment:
Here is simpler patch with a test.
--
Added file: http://bugs.python.org/file33350/builtins_cleanup.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19255
New submission from Gregory P. Smith:
Python 3.3.3+ (3.3:28337a8fb502+, Jan 7 2014, 01:32:44)
[GCC 4.6.3] on linux
Type help, copyright, credits or license for more information.
import unittest
r = unittest.result.TestResult()
r.wasSuccessful()
True
r.addUnexpectedSuccess(weird!)
Gregory P. Smith added the comment:
somewhat related - https://code.google.com/p/unittest-ext/issues/detail?id=22
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20165
___
New submission from jarod:
After installing python3.4.0b2.amd64 and rebuild modules, most of them stoped
works. List of modules is [psutil, ujson].
Exception occurs on importing module:
import error: dynamic module does not define init function PyInit_module_name
and I found solution
Roundup Robot added the comment:
New changeset c96dba33f019 by Larry Hastings in branch 'default':
Issue #20144: Argument Clinic now supports simple constants as parameter
http://hg.python.org/cpython/rev/c96dba33f019
--
nosy: +python-dev
___
Python
Larry Hastings added the comment:
Argument Clinic now supports simple constants like sys.maxsize as default
values for arguments for builtins. I'm assuming this gets you basically what
you wanted; if this isn't sufficient please open a new issue.
--
assignee: - larry
resolution: -
Roundup Robot added the comment:
New changeset ddb5cd3e0860 by Larry Hastings in branch 'default':
Issue #20141: Improved Argument Clinic's support for the PyArg_Parse O!
http://hg.python.org/cpython/rev/ddb5cd3e0860
--
nosy: +python-dev
___
Python
Larry Hastings added the comment:
Argument Clinic's support for O! is now simpler and more flexible. It's not
as convenient as the previous API, but that API wasn't really sustainable. I'm
assuming this fixes your problem; if not please open a new issue.
--
resolution: - fixed
Roundup Robot added the comment:
New changeset f61c63ec4e70 by Larry Hastings in branch 'default':
Issue #20157: When Argument Clinic renames a parameter because its name
http://hg.python.org/cpython/rev/f61c63ec4e70
--
nosy: +python-dev
___
Python
Changes by Larry Hastings la...@hastings.org:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20157
___
Roundup Robot added the comment:
New changeset e8307cf23af4 by Larry Hastings in branch 'default':
Issue #19273: The marker comments Argument Clinic uses have been changed
http://hg.python.org/cpython/rev/e8307cf23af4
--
___
Python tracker
Larry Hastings added the comment:
I'm assuming this is sufficient. If further bikeshedding is needed please
reopen the issue.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brian.curtin, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20166
___
___
Roundup Robot added the comment:
New changeset 21786a7f8036 by Brett Cannon in branch 'default':
Issue #19719: Update various finder and loader ABCs such that their
http://hg.python.org/cpython/rev/21786a7f8036
--
nosy: +python-dev
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19719
___
Larry Hastings added the comment:
Fixed as a side effect of fixing #20144. And by the way this was never a
release blocker.
--
assignee: - larry
priority: release blocker - normal
resolution: - fixed
stage: - committed/rejected
status: open - closed
Larry Hastings added the comment:
Can you refresh the patch? I think all the problems you cited are fixed, and
also the comments Argument Clinic uses were all changed. I'll review when you
have a fresh patch.
--
title: Convert the _sre module to use Argument Clinic - Derby: Convert
Larry Hastings added the comment:
Can you refresh the patch? I think all the problems you cited are fixed, and
also the comments Argument Clinic uses were all changed. I'll review when you
have a fresh patch.
--
title: Convert the audioop module to use Argument Clinic - Derby:
Larry Hastings added the comment:
Can you refresh the patch? The comments Argument Clinic uses were all changed.
I'll review when you have a fresh patch.
--
title: Convert the binascii module to use Argument Clinic - Derby: Convert the
binascii module to use Argument Clinic
1 - 100 of 204 matches
Mail list logo