[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip

Vinay Sajip added the comment:

Another question to consider: is inspect the best place for this? I don't think 
it is, because

(a) It's not really an inspection facility
(b) Importing inspect to get this functionality would pull in lots
of stuff which wouldn't be used in the typical use case.

I think it makes more sense for it to be in importlib. Accordingly adding Brett 
to nosy, for his thoughts.

--
nosy: +brett.cannon

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +yselivanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

OK, I'll take a look tomorrow. Don't think it's related  to #20471 though, as 
in there, if fails to find a signature for the 'builtin.object' (but I may be 
wrong).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2014-02-01 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18622
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20472] test_write_pty() of test_asyncio fails on x86 Tiger 3.x buildbot

2014-02-01 Thread Ned Deily

Ned Deily added the comment:

FYI, besides 10.4 (Tiger), the test also fails on OS X 10.5 but appears to pass 
on 10.6 and later releases.

--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20472
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

OK, there was no unit-test for this... looking into the problem, the first 
questing is: why is __text_signature__ is on the '_pickle.Pickler' object, not 
on '_pickle.Pickler.__init__'?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20474] test_socket failures on OS X due to fixed expected failures

2014-02-01 Thread Ned Deily

New submission from Ned Deily:

Three send timeout test cases in test_socket were changed by a4e4facad164 for 
Issue12958 to be expected failures on OS X because of observed failures on 
the OS X buildbots running OS X 10.6 (Snow Leopard) and earlier.

testInterruptedSendTimeout (test.test_socket.InterruptedSendTimeoutTest) ... 
unexpected success
testInterruptedSendmsgTimeout (test.test_socket.InterruptedSendTimeoutTest) ... 
unexpected success
testInterruptedSendtoTimeout (test.test_socket.InterruptedSendTimeoutTest) ... 
unexpected success

It seems that the platform bugs causing the failures were fixed in OS X 10.7 so 
that the expected failures no longer fail.  However, the change in behavior 
had not been noticed because, until the recent change to unittest in 
Issue20165, unittest did not fail when there were unexpected successes.  Now it 
does fail, causing test_socket to fail on OS X 10.7+ for 3.4.  On 3.3 the 
unexpected success failures are silently skipped.  The attached patch changes 
the test cases to be skipped for OS X versions prior to 10.7 rather than to 
always expect failure on OS X.

--
components: Tests
messages: 209882
nosy: larry, ncoghlan, ned.deily
priority: high
severity: normal
stage: patch review
status: open
title: test_socket failures on OS X due to fixed expected failures
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20474
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20474] test_socket failures on OS X due to fixed expected failures

2014-02-01 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
keywords: +patch
Added file: http://bugs.python.org/file33842/issue20474.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20474
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20474] test_socket failures on OS X due to fixed expected failures

2014-02-01 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Added file: http://bugs.python.org/file33843/issue20474.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20474
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20474] test_socket failures on OS X due to fixed expected failures

2014-02-01 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Removed file: http://bugs.python.org/file33842/issue20474.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20474
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Larry Hastings

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 rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12958] test_socket failures on Mac OS X

2014-02-01 Thread Ned Deily

Ned Deily added the comment:

FYI, the OS X platform bugs causing the three send timeout test failures were 
fixed in OS X 10.7 causing those test cases to have previously silently skipped 
unexpected successes.  See Issue20474 for more details.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12958
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Stefan Krah

Stefan Krah added the comment:

The build is --without-doc-strings. That should do the trick.

--
nosy: +skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Larry Hastings

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 rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Larry Hastings

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 same time.  Correlation isn't causation, but it's all I have to go 
on right now.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Larry Hastings

Larry Hastings added the comment:

Good thinking!  I don't know when I can get to it though, maybe Sunday.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Stefan Krah

Stefan Krah added the comment:

I think you just need to use the @requires_docstrings decorator for
the test. -- To me the failure looks expected if there aren't any
docstrings.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Larry Hastings

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 rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20456] Argument Clinic rollup patch, 2014/01/31

2014-02-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

The converters argument in command line is still broken.

[sky@localhost cpython3.4]$ hg pull -u
pulling from http://hg.python.org/cpython
searching for changes
no changes found
[sky@localhost cpython3.4]$ ./python Tools/clinic/clinic.py --converters

Legacy converters:
Traceback (most recent call last):
  File Tools/clinic/clinic.py, line 4131, in module
sys.exit(main(sys.argv[1:]))
  File Tools/clinic/clinic.py, line 4063, in main
print('' + ' '.join(c for c in legacy if c[0].isupper()))
  File Tools/clinic/clinic.py, line 4063, in genexpr
print('' + ' '.join(c for c in legacy if c[0].isupper()))
IndexError: string index out of range

Unit test for exercising Tools/clinic/clinic.py using assert_python_ok would be 
good, but that deserves a dedicated ticket.

Here is the patch to fix the bug.

--
nosy: +vajrasky
Added file: 
http://bugs.python.org/file33844/fix_clinic_converters_cmd_line.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20456
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2008] cookielib lacks FileCookieJar class for Safari

2014-02-01 Thread Hendrik

Hendrik added the comment:

I found a solution for reading Safari cookies, but struggling around with hg 
diff. Because always when i typ hg diff Lib/http/cookiejar.py it returns me the 
complete file not only my changes..

--
nosy: +Hendrik

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2008
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Brett Cannon

Brett Cannon added the comment:

importlib.util.resolve_name() already exists for resolving an explicit relative 
import name to an absolute one, so closing this as out of date.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20440] Use Py_REPLACE/Py_XREPLACE macros

2014-02-01 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I think Raymond's original concern still applies: The macros do add to the 
learning curve. I would personally expect that Py_REPLACE(op, op2) does an 
INCREF on op2, but it does not.

Explicit is better than implicit.

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20440
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip

Vinay Sajip added the comment:

 importlib.util.resolve_name() already exists

But that's not what the proposed functionality is for, is it? This covers 
finding values inside an imported module which can be accessed via a dotted 
path from the module globals.

--
resolution: out of date - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Stefan Behnel

Stefan Behnel added the comment:

Hmm, I now notice that I was mistaken about this working:

'''
import inspect

def test_isfunction():

 test_isfunction()
True

return inspect.isfunction(test_isfunction)
'''

It only worked in Cython's test suite because its test runner monkey patches 
inspect.isfunction, and I had completely forgotten about it. Sorry for the 
confusion.

The thing is that Cython's function type isn't really a Python function 
(obviously), it inherits from PyCFunction, so it should return True for 
isbuiltin(). A problem on our side prevented that. If I fix it up, then the 
newly added duck-typing code actually ends up not being used, because 
signature() tests for isbuiltin() first and runs into Signature.from_builtin(), 
which is the Argument Clinic code path that expects a textual signature 
representation. Cython functions don't have that, because they are compatible 
with Python functions.

This situation could be helped in inspect.signature() by reversing the test 
order, i.e. by changing this code

if _signature_is_builtin(obj):
return Signature.from_builtin(obj)

if isfunction(obj) or _signature_is_functionlike(obj):
# If it's a pure Python function, or an object that is duck type
# of a Python function (Cython functions, for instance), then:
return Signature.from_function(obj)

into this:

if isfunction(obj) or _signature_is_functionlike(obj):
# If it's a pure Python function, or an object that is duck type
# of a Python function (Cython functions, for instance), then:
return Signature.from_function(obj)

if _signature_is_builtin(obj):
return Signature.from_builtin(obj)

Would this be ok?

I would also argue that the implementation of _signature_is_builtin() is, well, 
not ideal, because what it should test for according to the comment at the top 
of the function is the existance of __text_signature__. Instead, it does 
several type tests, one of which goes wrong in this case.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19683] test_minidom has many empty tests

2014-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fed468670866 by Mark Dickinson in branch '2.7':
Issue #19683: Add __closure__ and other missing attributes to function docs.
http://hg.python.org/cpython/rev/fed468670866

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19683
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19863] Missing function attributes in 2.7 docs.

2014-02-01 Thread Mark Dickinson

Mark Dickinson added the comment:

New changeset fed468670866 by Mark Dickinson in branch '2.7':
Issue #19683: Add __closure__ and other missing attributes to function docs.
http://hg.python.org/cpython/rev/fed468670866

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19863
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19683] test_minidom has many empty tests

2014-02-01 Thread Mark Dickinson

Mark Dickinson added the comment:

Whoops; wrong issue number.  That commit message was for issue 19863.

--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19683
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19863] Missing function attributes in 2.7 docs.

2014-02-01 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19863
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-02-01 Thread Ronny Pfannschmidt

Ronny Pfannschmidt added the comment:

could we please get the option to opt-out of that behaviour, as a extra 
connection option maybe

with the normal python sqlite bindings its impossible
to have database migrations work safely
which IMHO makes this a potential data-loss issue

--
nosy: +Ronny.Pfannschmidt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10740
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-02-01 Thread R. David Murray

R. David Murray added the comment:

Opt out of what behavior?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10740
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Brett Cannon

Brett Cannon added the comment:

Importlib already has importlib.import_module() (since Python 2.7) and that's 
as far as I'm willing to go for finding a module by name. Anything past that is 
a getarr() call on the resulting module and thus not worth adding to importlib.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2014-02-01 Thread Vinay Sajip

Vinay Sajip added the comment:

 and thus not worth adding to importlib.

Okay, fair enough. It's not purely an import function, though partly related to 
imports.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-02-01 Thread Ronny Pfannschmidt

Ronny Pfannschmidt added the comment:

the sqlite binding deciding how to handle transactions

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10740
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X

2014-02-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The current os.cpu_count implementation calls sysconf(_SC_NPROCESSORS_ONLN), 
which is apparently defined under OS X, and returns the number of online CPUs 
(logical?):
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/sysconf.3.html

multiprocessing has been modified to re-use os.cpu_count(), so I suggest 
closing this issue as out-of-date.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17444
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Yury Selivanov 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.

Good news ;) OK, I'll decorate the test.

 Because slots like tp_init and tp_call don't have docstrings.  So it has to 
 go in the class's docstring.

So what's going on and why is it broken:

- from_builtin wasn't checking the incoming 'func' argument's type, it started 
to work with its '__text_signature__' right away. That was fixed.

- in 'inspect.signature' we checked 

 (isinstance(obj, _NonUserDefinedCallables) or ismethoddescriptor(obj) or
isinstance(obj, type))

  so *classes* were tried in 'from_builtin' too.

And that's why it worked.  Any class (even used-defined in pure Python) that 
had '__text_signature__' was passed to the 'Signature.from_builtin' and it did 
the right job.

Now, I don't want to completely rollback my commits, as I still think that 
'from_builtin' should strictly check what object is it working with, and raise 
appropriate exceptions. What we need to do is to separate parsing of 
'__text_signature__' into a private inspect module helper, so that 
'from_builtin' becomes a tiny wrapper.  Then, in 'signature.inspect' we need to 
find a way of testing if the given object is a builtin class, and call the 
parsing helper on it if it has the '__text_signature__' attribute.

I'm looking into this.

BTW, are you sure we can't somehow add '__text_signature__' to builtin class' 
'__init__'?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

 Would this be ok?

Probably. I need to take a closer look.

I'm not sure I like the idea that Cython functions are chimeras of some sort, 
i.e. they have a type of python builtin functions, hence, logically, 
Signature.from_builtin should work on them (and they have to follow 
__text_signature__ API), and on the other hand, they try to mimic pure python 
functions (being a builtin type) with all its guts like '__code__' object etc.  

Perhaps, what we need to do, is to modify 'Signature.from_builtin' to check for 
pure-python function duck type too, and fallback to 'Signature.from_function' 
in this case. Larry, Nick, what do you think?

 I would also argue that the implementation of _signature_is_builtin() is, 
 well, not ideal, because what it should test for according to the comment at 
 the top of the function is the existance of __text_signature__. Instead, it 
 does several type tests, one of which goes wrong in this case.

'from_builtin' needs to have those type checks. Duck typing is good, but some 
minimal type safety is good too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b1f214165471 by Yury Selivanov in branch 'default':
inspect.tests: Fix tests to work on python built with '--without-doc-strings' 
#20471
http://hg.python.org/cpython/rev/b1f214165471

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20471] test_signature_on_class() of test_inspect fails on AMD64 FreeBSD 9.0 3.x buildbot

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Should be OK now. Thank you guys for the report and for the hint of what was 
going on ;)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20471
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Stefan Behnel

Stefan Behnel added the comment:

 I'm not sure I like the idea that Cython functions are chimeras of
 some sort, i.e. they have a type of python builtin functions, hence,
 logically, Signature.from_builtin should work on them (and they have to
 follow __text_signature__ API), and on the other hand, they try to mimic
 pure python functions (being a builtin type) with all its guts like
 '__code__' object etc.

That's one way of looking at it. The way I see it is that CPython's builtin
functions should rather behave exactly like Python functions. The fact that
there is such a thing as a __text_signature__ and general special casing
of builtins is IMHO a rather annoying but truly long standing bug. The only
necessary difference is that one of them contains byte code and the other
doesn't, everything else should eventually be aligned.

 Perhaps, what we need to do, is to modify 'Signature.from_builtin' to
 check for pure-python function duck type too, and fallback to
 'Signature.from_function' in this case.

In any case, I think that a complete Python function(-like) interface
should always be preferred to work-arounds like __text_signature__,
regardless of where it comes from.

 'from_builtin' needs to have those type checks. Duck typing is good, but
 some minimal type safety is good too.

I don't really see why. The code doesn't seem to be doing that much more
than text processing of the __text_signature__, plus a tiny bit of
optional(!) attribute checking (__module__ and __self__).

The restrictive type checks appear to be the only thing that prevents users
from doing this:

class myfunc:
__text_signature__ = '(a,b,c,d)'

sig = Signature.from_builtin(myfunc())

Granted, the name of that method doesn't really fit well in that case, and
a simpler interface than having to define a class would also not hurt.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20288] HTMLParse handing of non-numeric charrefs broken

2014-02-01 Thread Ezio Melotti

Ezio Melotti added the comment:

Here's a patch against 2.7.

--
keywords: +patch
Added file: http://bugs.python.org/file33845/issue20288.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20288
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20445] HAVE_BROKEN_NICE detected incorrectly due to configure.ac typo

2014-02-01 Thread George Kouryachy

George Kouryachy added the comment:

Oops, looks like my local build system artifact.

Thank you for your attention, all-clear.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20445
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

 That's one way of looking at it. The way I see it is that CPython's builtin
 functions should rather behave exactly like Python functions. The fact that
 there is such a thing as a __text_signature__ and general special casing
 of builtins is IMHO a rather annoying but truly long standing bug. The only
 necessary difference is that one of them contains byte code and the other
 doesn't, everything else should eventually be aligned.

I see your point. I think that modifying 'from_builtin' as I suggested in my 
previous comment is the right thing to do. I'll make a new patch soon.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20288] HTMLParse handing of non-numeric charrefs broken

2014-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0d50b5851f38 by Ezio Melotti in branch '2.7':
#20288: fix handling of invalid numeric charrefs in HTMLParser.
http://hg.python.org/cpython/rev/0d50b5851f38

New changeset 32097f193892 by Ezio Melotti in branch '3.3':
#20288: fix handling of invalid numeric charrefs in HTMLParser.
http://hg.python.org/cpython/rev/32097f193892

New changeset 92b3928bfde1 by Ezio Melotti in branch 'default':
#20288: merge with 3.3.
http://hg.python.org/cpython/rev/92b3928bfde1

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20288
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Stefan Behnel

Stefan Behnel added the comment:

Attached is a minimal patch that does what I think you meant.

--
Added file: http://bugs.python.org/file33846/divert_from_builtin.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-01 Thread Paul Sokolovsky

New submission from Paul Sokolovsky:

http://docs.python.org/3.3/library/time.html#time.clock says that it's 
deprecated, but pystone.py in Python-3.4.0b3 tarball still uses it. 

Please kindly consider switching it to plain time.time() and not to some other 
novelties.

My usecase is: I'm working on alternative Python implementation, I of course 
want to benchmark it, and of course want to claim that I ran unmodified 
pystone.py. Now to achieve that, I need to implement deprecated function.

--
messages: 209916
nosy: pfalcon
priority: normal
severity: normal
status: open
title: pystone.py in 3.4 still uses time.clock(), even though it's marked as 
deprecated since 3.3
type: enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-01 Thread Paul Sokolovsky

Changes by Paul Sokolovsky pfal...@users.sourceforge.net:


--
components: +Benchmarks
versions: +Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-02-01 Thread R. David Murray

R. David Murray added the comment:

As noted above you get that by setting isolation_level to None.  That feature 
has always been available.  (With isolation_level set to None, the sqlite 
wrapper module itself never issues any BEGIN statements.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10740
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Stefan,
Please try the attached patch (sig_cython_01.patch)

--
Added file: http://bugs.python.org/file33847/sig_cython_01.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-01 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20400] Add create_read_pipe_protocol/create_write_pipe_protocol to asyncio.SubprocessProtocol

2014-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ac90c0463a by Victor Stinner in branch 'default':
Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess module
http://hg.python.org/cpython/rev/d7ac90c0463a

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20400
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20400] Add create_read_pipe_protocol/create_write_pipe_protocol to asyncio.SubprocessProtocol

2014-02-01 Thread STINNER Victor

STINNER Victor added the comment:

asyncio has a new asyncio.subprocess module which implements my feature request.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20400
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20476] If new email policies are used, default message factory should be EmailMessage

2014-02-01 Thread R. David Murray

New submission from R. David Murray:

This was part of the design of the new stuff added in 3.4, so it is a bug that 
it doesn't work...somehow I missed implementing this detail.  The full 
implementation should make this a policy setting, so that a custom policy could 
specify its own factory.  However, since 3.4 is in beta it would be a bad time 
to add that to the policy.

The patch proposed here implements the required behavior by hardcoding any 
non-compat32 policy to use EmailMessage instead of Message in feedparser.

--
components: email
files: use_emailmessage.patch
keywords: patch
messages: 209921
nosy: barry, r.david.murray
priority: high
severity: normal
stage: commit review
status: open
title: If new email policies are used, default message factory should be 
EmailMessage
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33848/use_emailmessage.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20476
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


Added file: http://bugs.python.org/file33849/sig_cython_02.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20477] Add examples of using the new contentmanager api to the email docs

2014-02-01 Thread R. David Murray

New submission from R. David Murray:

Here are the examples I promised to write in issue 18891.

--
assignee: docs@python
components: Documentation, email
files: contentmanager-examples.patch
keywords: patch
messages: 209922
nosy: barry, docs@python, r.david.murray
priority: normal
severity: normal
stage: commit review
status: open
title: Add examples of using the new contentmanager api to the email docs
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33850/contentmanager-examples.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20477
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Those are C level descriptors, so we'd have to add new fields to the structs, 
and that's not going to happen at this stage of the release cycle.

However, there's also the fact that tp_new and tp_init are required to have the 
*same* signature, and those override the apparent signature of __call__ on the 
metaclass, so it's actually better to just document it once on the class.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-02-01 Thread Ronny Pfannschmidt

Ronny Pfannschmidt added the comment:

http://hg.python.org/releasing/3.4/file/447c758cdc26/Modules/_sqlite/cursor.c#l789

also i dont see the isolation level being taking into account in other parts of 
the code

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10740
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18891] Master patch for content manager addition to email package

2014-02-01 Thread R. David Murray

R. David Murray added the comment:

Opened issue 20477 with the proposed examples.

--
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18891
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14665] faulthandler prints tracebacks in reverse order

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

For additional context, Guido's patch in issue 19306 changed Traceback to 
Stack and added the (most recent call first) to some places where it was 
missing.

Given the technical arguments in favour of keeping this code as simple as 
possible, agreed this is a Won't Fix.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14665
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Peter, could you take a look at this one? The status quo seems reasonable to me 
(and I assume to you since the stdlib ipaddress matches the way ipaddr handles 
this case), but there are details to Michiel's proposal that I'm not able to 
adequately assess.

However, also changing the target version to 3.5 - even if this behaviour was 
tweaked, it's unlikely to be something we would adjust in a maintenance release.

--
nosy: +pmoody
versions: +Python 3.5 -Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19157
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16136] Removal of VMS support

2014-02-01 Thread John Malmberg

John Malmberg added the comment:

Encompasserve.org is now back up.  It took a little longer than expected.

Should be no issues now in getting free hobby license keys for VMS on VAX, 
Alpha, and Itanium by using the web forms.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16136
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses

2014-02-01 Thread pmoody

pmoody added the comment:

Ack. My first impression is that #1 is probably the right way to do this. I'm 
arguing with hg about the right way to stash a change, but I'll get this fixed.

--
assignee:  - pmoody

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19157
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20478] Avoid inadvertently special casing Counter in statistics module

2014-02-01 Thread Nick Coghlan

New submission from Nick Coghlan:

As per the python-ideas thread at 
https://mail.python.org/pipermail/python-ideas/2014-February/025226.html the 
statistics.mode() function currently passes its argument directly to the 
collections.Counter() constructor. This results in Counter() objects being 
special-cased rather than treated as ordinary iterables.

For the main API, it seems more appropriate to force treatment as an iterable 
by calling iter() on the argument before passing it to the Counter() 
constructor.

I'll file a separate RFE about making it easier and more efficient to use the 
statistics module with weight/frequency mappings.

--
components: Library (Lib)
messages: 209930
nosy: gregory.p.smith, larry, ncoghlan, oscarbenjamin, stevenjd, wolma
priority: release blocker
severity: normal
stage: test needed
status: open
title: Avoid inadvertently special casing Counter in statistics module
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20478
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20478] Avoid inadvertently special casing Counter in statistics module

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Issue 20479 covers providing tools for efficiently working with 
weight/frequency mappings in 3.5 (and presumably the statslib PyPI module)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20478
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get reverse DNS name

2014-02-01 Thread Leon Weber

New submission from Leon Weber:

I was missing a method to compute the reverse DNS name for an IP address, and I 
felt this is something that would belong in the ipaddress module; so here’s a 
patch for the ipaddress module adding a reverse_name property to IPv?Address.

This is an example:

 ipaddress.ip_address(127.0.0.1).reverse_name
'1.0.0.127.in-addr.arpa.'
 ipaddress.ip_address(2001:db8::1).reverse_name
'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.'

Would this be an acceptable feature for inclusion in the ipaddress module?

--
components: Library (Lib)
files: ipaddress_reverse_names.patch
keywords: patch
messages: 209933
nosy: leonn, ncoghlan, pmoody
priority: normal
severity: normal
status: open
title: Add ipaddress property to get reverse DNS name
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33851/ipaddress_reverse_names.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20479] Efficiently support weight/frequency mappings in the statistics module

2014-02-01 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
dependencies: +Avoid inadvertently special casing Counter in statistics module
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20479
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20479] Efficiently support weight/frequency mappings in the statistics module

2014-02-01 Thread Nick Coghlan

New submission from Nick Coghlan:

Issue 20478 suggests ensuring that even weight/frequency mappings like 
collections.Counter are consistently handled as iterables in the current 
statistics module API.

However, it likely makes sense to provide public APIs that support efficiently 
working with such weight/frequency mappings directly, rather than requiring 
that they be expanded to a full iterable all the time.

One possibility would be to provide parallel APIs with the _map suffix, similar 
to the format() vs format_map() distinction in the string formatting APIs.

--
components: Library (Lib)
messages: 209931
nosy: gregory.p.smith, ncoghlan, oscarbenjamin, stevenjd, wolma
priority: normal
severity: normal
stage: needs patch
status: open
title: Efficiently support weight/frequency mappings in the statistics module
type: enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20479
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20481] Clarify type coercion rules in statistics module

2014-02-01 Thread Nick Coghlan

New submission from Nick Coghlan:

I haven't completely following the type coercion discussion on python-ideas. 
but the statistics module at least needs a docs clarification (to explain that 
the current behaviour when mixing input types is not fully defined, especially 
when Decimal is involved), and potentially a behavioural change to disallow 
certain type combinations where the behaviour may change in the future (see
https://mail.python.org/pipermail/python-ideas/2014-February/025214.html for 
example)

Either option seems reasonable to me (with a slight preference for the latter), 
but it's at least clear that we need to avoid locking ourselves into the exact 
coercion behaviour of the current implementation indefinitely.

--
components: Library (Lib)
messages: 209934
nosy: gregory.p.smith, larry, ncoghlan, oscarbenjamin, stevenjd, wolma
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Clarify type coercion rules in statistics module
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20481
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get reverse DNS name

2014-02-01 Thread Eric V. Smith

Eric V. Smith added the comment:

I think the functionality is reasonable for this module.

When I originally read the bug title, I was concerned that it was actually 
doing a reverse DNS lookup, which would not be appropriate. But now I realize 
it's just computing the name that would be used for the reverse lookup.

I'm not sure reverse_name is the best name for this, but I don't have any 
better suggestions, and I could live with this name.

Changing version to 3.5, since that's the first version this could be added to.

--
nosy: +eric.smith
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get name of reverse DNS pointer

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Heh, my initial reaction based on the issue title was the same as Eric's, but 
yes, I agree the pure text manipulation proposed in the patch is actually a 
good fit.

Rather than reverse_name (which I feel is ambiguous about whether or not it 
does the DNS lookup to resolve back to the canonical name for the address), I 
would suggest the attribute name reverse_pointer or reverse_record (with a 
slight preference for the former, as indicated in the updated issue title).

--
title: Add ipaddress property to get reverse DNS name - Add ipaddress property 
to get name of reverse DNS pointer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get name of reverse DNS pointer

2014-02-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the patch, Leon. Is the trailing dot actually desired?

 ipaddress.ip_address(127.0.0.1).reverse_name
'1.0.0.127.in-addr.arpa.'

Also, to accept your contribution, we will need you to fill a contributor's 
agreement. See http://www.python.org/psf/contrib/

--
nosy: +pitrou
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get name of reverse DNS pointer

2014-02-01 Thread Leon Weber

Leon Weber added the comment:

Thanks for the feedback, I agree reverse_pointer is a better, less ambiguous 
name for the property. I’ve amended the patch to reflect this suggestion.

Regarding the trailing dot, I felt it more appropriate to have it that to leave 
it out, but I don’t have a strong opinion on this. It has to be there in the 
DNS query, but most tools will automatically add it to the query if it’s not 
specified. The host tool from bind-utils is undecided as well when printing 
the output, it includes the trailing dot when querying IPv4 addresses, but not 
for IPv6 addresses.

Including the trailing dot has the advantage that the output could be directly 
fed into other code that strictly requires it, like the dnspython module.

I’ll sign and submit the contributor’s agreement as soon as I’m within reach of 
a printer (likely within the next 24 hours).

--
Added file: http://bugs.python.org/file33852/ipaddress_reverse_names_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get name of reverse DNS pointer

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Gah, we still haven't fixed the contributor license docs on the main
CLA page (hopefully we'll finally have that sorted later this month).
In the meantime, if you go directly to
http://www.python.org/psf/contrib/contrib-form/ it should give you the
option to sign electronically:
http://www.python.org/psf/contrib/contrib-form/

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Please review the attached patch (sig_builtins_01.patch).

Some details:

- All parsing code from Signature.from_builtin was moved
in a separate helper '_signature_fromstr'

- Signature.from_builtin calls '_signature_fromstr'. All
its validation logic is untouched.

- 'inspect.signature' was tweaked a bit: when it's certain
that the object is a class and there is no user-defined
__init__ or __new__ or its meta's __call__, it traverses
the MRO to find non-empty __text_signature__. If it finds
one -- it returns with _signature_fromstr(). If not, it checks
if __init__ is type.__init__ or object.__init__. The last
check is a bit tricky -- the only way of doing that check
(I think) is to use __qualname__.

Since the patch is non-trivial, any review/comments would
be greatly appreciated.

--
keywords: +patch
Added file: http://bugs.python.org/file33853/sig_builtincls_01.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20480] Add ipaddress property to get name of reverse DNS pointer

2014-02-01 Thread Leon Weber

Leon Weber added the comment:

Oh nice, then fewer trees have to die. I’ve now signed the contributor’s 
agreement.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15216] Support setting the encoding on a text stream after creation

2014-02-01 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Wow, I didn't realize that programming Python using the C interface was that 
tedious and verbose. I have attached a work-in-progress patch. It is not 
complete yet, but maybe somebody could already take a look to make sure that 
I'm not heading completely in the wrong direction.

Regarding StringIO.set_encoding(): I thought about this a bit, but I couldn't 
come up with a convincing scenario where having a no-op implementation would 
clearly help or or clearly hurt. Personally I would therefore to not provide it 
for now. If it turns out to be a problem, it can easily be added. But if we add 
it now and it turns out to have been a bad choice, it's probably much harder to 
remove it again.

--
Added file: http://bugs.python.org/file33855/set_encoding-3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15216
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


Added file: http://bugs.python.org/file33854/sig_cython_03.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20482] smtplib.SMTP.sendmail: improve exception message

2014-02-01 Thread yegle

New submission from yegle:

Currently the `msg` argument of `smtplib.SMTP.sendmail` accept a `str` in Py3k 
if every characters in this `str` is in ASCII range, or a `bytes`.

This is confusing for new comer because:

1. When you send your mail using only ASCII characters, everything is fine (no 
matter you use bytes or str).
2. When sometimes you included non-ASCII characters in your email, the 
traceback is hard to understand.

Here's an example of such traceback:

Traceback (most recent call last):
  File ./manage.py, line 113, in module
manager.run()
  File 
/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/__init__.py, 
line 405, in run
result = self.handle(sys.argv[0], sys.argv[1:])
  File 
/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/__init__.py, 
line 384, in handle
return handle(app, *positional_args, **kwargs)
  File 
/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/commands.py, 
line 145, in handle
return self.run(*args, **kwargs)
  File ./manage.py, line 108, in run
conn.send(msg)
  File /data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_mail.py, line 
168, in send
message.as_string())
  File /data/web/cgi-bin/python-3.3.3/lib/python3.3/smtplib.py, line 747, in 
sendmail
msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\u9f99' in position 
646: ordinal not in range(128)

Here's my proposal:

--- smtplib.py.orig 2014-02-01 21:26:47.0 -0500
+++ smtplib.py  2014-02-01 21:37:51.0 -0500
@@ -744,7 +744,12 @@
 esmtp_opts = []
 print(msg)
 if isinstance(msg, str):
-msg = _fix_eols(msg).encode('ascii')
+try:
+msg = _fix_eols(msg).encode('ascii')
+except UnicodeEncodeError:
+raise SMTPException(
+msg may be a string containing characters in the 
+ASCII range, or a byte string.)
 if self.does_esmtp:
 # Hmmm? what's this? -ddm
 # self.esmtp_features['7bit']=

--
components: email
messages: 209943
nosy: barry, r.david.murray, yegle
priority: normal
severity: normal
status: open
title: smtplib.SMTP.sendmail: improve exception message
type: enhancement
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20482
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Well, I guess we can replace

from time import clock

with something like

try:
from time import monotonic as clock
except ImportError:
from time import time as clock

Victor, what do you think?

--
nosy: +yselivanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20482] smtplib.SMTP.sendmail: improve exception message

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20482
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +fdrake

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20475
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9974] tokenizer.untokenize not invariant with line continuations

2014-02-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

One could argue that The guarantee applies only to the token type and token 
string as the spacing between tokens (column positions) may change. covers 
merging of lines, but total elimination of needed whitespace is definitely a 
bug.

--
nosy: +terry.reedy
stage:  - patch review
versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9974
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-02-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Whitespace equivalence is explicitly disclaimed. The guarantee applies only to 
the token type and token string as the spacing between tokens (column 
positions) may change. The assert is not a valid test. I think you should 
close this. (Note that there are several issues for bugs where untokenize 
results in a sematically different text.)

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20387
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20483] Missing network resource checks in test_urllib2 test_smtplib

2014-02-01 Thread Nick Coghlan

New submission from Nick Coghlan:

These two tests appear to rely on DNS lookups or other network access that 
isn't guarded by the network resource (my internet dropped out and these two 
tests failed, but they work correctly now the internet connection is back up).

--
components: Tests
messages: 209947
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Missing network resource checks in test_urllib2  test_smtplib
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20483
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Revised patch that avoids doing multiple lookups of the same codec name while 
creating the stream.

Absent any comments, I'll commit this version with appropriate NEWS and What's 
New updates tomorrow.

--
Added file: 
http://bugs.python.org/file33856/issue20404_check_valid_textio_codec_v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20404
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15216] Support setting the encoding on a text stream after creation

2014-02-01 Thread Nikolaus Rath

Changes by Nikolaus Rath nikol...@rath.org:


Added file: http://bugs.python.org/file33857/set_encoding-4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15216
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, just noticed the test case is still using the overly specific check for the 
exception wording. I'll fix that, too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20404
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2014-02-01 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser k...@shore.net:


--
nosy: +kbk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18823
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16123] IDLE - deprecate running without a subprocess

2014-02-01 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser k...@shore.net:


--
nosy: +kbk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16123
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2014-02-01 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser k...@shore.net:


--
nosy: +kbk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15663
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


Added file: http://bugs.python.org/file33858/sig_builtincls_02.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20484] test_pydoc can alter execution environment causing subsequent test failures

2014-02-01 Thread Ned Deily

New submission from Ned Deily:

With the pydoc.synopsis() for 'binary' modules changes (d6c3fb8d5f84) to 
pydoc and test_pydoc for Issue20123, running test_pydoc can leave the regrtest 
environment altered and cause subsequent tests to fail in strange ways.  I ran 
into this issue running regression tests for 3.4.0 and was able to isolate the 
failure to this change set.

A somewhat simplified (if not necessarily minimal) set of steps to reproduce 
follow.  I've not had time to further investigate the cause.  I've also only 
seen the problem when running the tests with an installed Python or from a 
build directory when there is also a Python installed in the configured prefix 
but not from the build directory with no Python installed at the configured 
prefix.  I've reproduced the failure on both Debian Linux and on OS X.  The 
following output is from the former.

$ rm -rf /tmp/root/*
$ hg purge --all
$ hg update 6d72617cae64  # the parent change set of d6c3fb8d5f84
$ hg log -r .
changeset:   88306:6d72617cae64
user:R David Murray rdmur...@bitdance.com
date:Sat Jan 04 21:17:52 2014 -0500
summary: whatsnew: removal of TYPE_INT64 from marshal.
$ ./configure --prefix=/tmp/root
$ make  make install
$ ( cd /tmp  /tmp/root/bin/python3.4 -m test -w test_pydoc test_distutils )
[1/2] test_pydoc
[2/2] test_distutils
All 2 tests OK.
$ hg update d6c3fb8d5f84
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg log -r .
changeset:   88307:d6c3fb8d5f84
user:Eric Snow ericsnowcurren...@gmail.com
date:Sat Jan 04 20:38:11 2014 -0700
summary: Issue 20123: Fix pydoc.synopsis() for binary modules.
$ make  make install
$ ( cd /tmp  /tmp/root/bin/python3.4 -m test -w test_pydoc test_distutils )
[1/2] test_pydoc
Warning -- warnings.filters was modified by test_pydoc
Warning -- logging._handlerList was modified by test_pydoc
[2/2] test_distutils
test test_distutils failed -- multiple errors occurred; run in verbose mode for 
details
1 test failed:
test_distutils
1 test altered the execution environment:
test_pydoc
Re-running failed tests in verbose mode
Re-running test 'test_distutils' in verbose mode
test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... FAIL
test_check_all (distutils.tests.test_check.CheckTestCase) ... ok
[...]

==
ERROR: test_metadata_check_option (distutils.tests.test_sdist.SDistTestCase)
--
Traceback (most recent call last):
  File /tmp/root/lib/python3.4/distutils/tests/test_sdist.py, line 247, in 
test_metadata_check_option
cmd.run()
  File /tmp/root/lib/python3.4/distutils/command/sdist.py, line 158, in run
self.get_file_list()
  File /tmp/root/lib/python3.4/distutils/command/sdist.py, line 204, in 
get_file_list
self.add_defaults()
  File /tmp/root/lib/python3.4/distutils/command/sdist.py, line 262, in 
add_defaults
self.filelist.extend(build_py.get_source_files())
  File /tmp/root/lib/python3.4/distutils/command/build_py.py, line 301, in 
get_source_files
return [module[-1] for module in self.find_all_modules()]
  File /tmp/root/lib/python3.4/distutils/command/build_py.py, line 295, in 
find_all_modules
package_dir = self.get_package_dir(package)
  File /tmp/root/lib/python3.4/site-packages/setuptools/command/build_py.py, 
line 187, in get_package_dir
return os.path.join(self.distribution.src_root, res)
  File /tmp/root/lib/python3.4/posixpath.py, line 83, in join
path += b
TypeError: unsupported operand type(s) for +=: 'dict' and 'str'

==
ERROR: test_debug_mode (distutils.tests.test_install.InstallTestCase)
--
Traceback (most recent call last):
  File /tmp/root/lib/python3.4/distutils/tests/test_install.py, line 236, in 
test_debug_mode
self.test_record()
  File /tmp/root/lib/python3.4/distutils/tests/test_install.py, line 186, in 
test_record
cmd.run()
  File /tmp/root/lib/python3.4/distutils/command/install.py, line 566, in run
self.run_command(cmd_name)
  File /tmp/root/lib/python3.4/distutils/cmd.py, line 313, in run_command
self.distribution.run_command(command)
  File /tmp/root/lib/python3.4/distutils/dist.py, line 974, in run_command
cmd_obj.run()
  File 
/tmp/root/lib/python3.4/site-packages/setuptools/command/install_scripts.py, 
line 18, in run
self.run_command(egg_info)
  File /tmp/root/lib/python3.4/distutils/cmd.py, line 313, in run_command
self.distribution.run_command(command)
  File /tmp/root/lib/python3.4/distutils/dist.py, line 974, in run_command
cmd_obj.run()
  File /tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py, 
line 163, in run
self.find_sources()
  File /tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py, 
line 186, 

[issue20473] inspect.Signature no longer handles builtin classes correctly

2014-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Second patch attached: sig_builtincls_02.patch, with a fix, that Nick 
suggested. Larry, I'd like you to take a quick look at it as well, before I 
commit it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20473
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20451] os.exec* mangles argv on windows (splits on spaces, etc)

2014-02-01 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

i have tried a workaround for this issue by explicitly escaping args so that 
same result is produced on all platforms.this patch does NOT change the 
behavior on non-NT platforms.
If this patch is accepted,i also recommend to specify on the help pages,that 
there is no need to escape the args as it will done automatically.

--
keywords: +patch
nosy: +sahutd
Added file: http://bugs.python.org/file33859/issue20451.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20451
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-02-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Larry, if this version looks good to you, I'd like to commit it.

- id() is now back to being a properly generated AC function (since AC can now 
preserve the old C level signature)

- sorted() is partially converted and has a __text_signature__ compatible 
docstring. However, full conversion will have to wait for the ability to 
preserve the kwds dict, since that's the API exposed by the list object.

- with the new never-triggered-by-accident AC syntax, the test case now ensures 
that all the builtins that are expected to *not* expose signature info at this 
point, don't. As they're converted for 3.5, that will force them to be added to 
the list of functions that are checked for compatibility.

I'm thinking it's probably worth flagging this new test as a CPython 
implementation detail test, though.

--
Added file: 
http://bugs.python.org/file33860/issue20184_builtin_conversion_v4.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20184
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-02-01 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


Added file: 
http://bugs.python.org/file33861/issue20184_builtin_conversion_v5.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20184
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17159] Remove explicit type check from inspect.Signature.from_function()

2014-02-01 Thread Stefan Behnel

Stefan Behnel added the comment:

I tried the third patch and it works, but when I write this into a docstring:

def func(x, *, y=None):
sig=(a,b)

then it fails to extract the signature again and returns (a,b) instead.

I also tried putting in some math term as (non-signature) documentation:

def sig(a, b):
sig=(a*b)

and it raises a ValueError telling me that the signature is invalid.

So, I still think it should prefer a full function interface over the risky
__text_signature__ quirk whenever it can.

I also think it shouldn't raise an error if the docstring isn't something
that it can parse, but that's not part of this ticket, I guess.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17159
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures

2014-02-01 Thread Stefan Behnel

Stefan Behnel added the comment:

I tried this in Cython and ISTM that the C level parser is a bit too forgiving:

def sig(a, b):
sig=(a*b)
return a * b

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20326
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >