[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Saimadhav Heblikar

Changes by Saimadhav Heblikar saimadhavhebli...@gmail.com:


--
assignee: docs@python
components: Documentation, asyncio
files: asyncio-eventloop-doc-incomplete-sent.diff
keywords: patch
nosy: docs@python, gvanrossum, haypo, sahutd, yselivanov
priority: normal
severity: normal
status: open
title: Incomplete sentence in asyncio BaseEventLoop doc
versions: Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file36060/asyncio-eventloop-doc-incomplete-sent.diff

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



[issue21580] PhotoImage(data=...) apparently has to be UTF-8 or Base-64 encoded

2014-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I will try test the problem and fix on Windows within a day.

--

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



[issue22052] Comparison operators called in reverse order for subclasses with no override.

2014-07-24 Thread Mark Dickinson

Mark Dickinson added the comment:

 the subclass provides doesn't actually imply anything about overriding, I 
 think.

Yes, that was the thrust of one of the SO answers.  Unfortunately, that 
explanation doesn't work for arithmetic operators, though: there an explicit 
override is necessary.  Here's another example, partly to get away from the 
extra complication of __eq__ being its own inverse.  After:

class A(object):
def __lt__(self, other): return True
def __gt__(self, other): return False
def __add__(self, other): return 1729
def __radd__(self, other): return 42

class B(A): pass

we get:

 A() + B()
1729
 A()  B()
False

So the addition is calling the usual __add__ method first (the special 
exception in the docs doesn't apply: while B *is* a subclass of A, it doesn't 
*override* A's __radd__ method).  But the comparison is (surprisingly) calling 
the __gt__ method first.

So we've got two different rules being followed: one for arithmetic operators, 
and a different one for comparisons.

This isn't a big deal behaviour-wise: I'm certainly not advocating a behaviour 
change here.  But it would be nice to document it.

--

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



[issue16733] Solaris ctypes_test failures

2014-07-24 Thread Mark Lawrence

Mark Lawrence added the comment:

Only one Solaris box was online when I looked and that had passed ctypes tests, 
but surely this will have been sorted out by now?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 I don't remember why I added a specific check on the proto parameter.

I tested on Windows: socket.socket(proto=1) raises an 
OSError(WSAEPROTONOSUPPORT):


WSAEPROTONOSUPPORT 10043: Protocol not supported.

The requested protocol has not been configured into the system, or no 
implementation for it exists. For example, a socket call requests a SOCK_DGRAM 
socket, but specifies a stream protocol.


Since the error comes directly at socket.socket(), we drop drop the explicit 
test in socketpair().

--

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



[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

I came up with a patch that shifts the compatibility hack we have for the tuple 
form of exec from run-time (in exec_statement()) to the CST-to-AST 
transformation (in ast_for_exec_stmt()). It seems to pass the tests (including 
the ones Robert pasted in here). Please review.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file36061/bug21591.patch

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



[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-07-24 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

Oh, one specific question: I'm not sure if I should free the old expr1 (the 
top-level exec value) before overwriting it with the new one.

--

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



[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

 By the way, we should reuse socket.socketpair() in
 asyncio.windows_utils. The Tulip is written for Python 3.3 and shares
 exactly the same code base, so you should write

 Something like:

 if hasattr(socket, 'socketpair'):
 socketpair = socket.socketpair
 else:
   def socketpair(...): ...

 Please also fix socketpair() in asyncio to add the while/drop unknown
 connection (well, the function in socket.py and windows_utils.py must
 be the same).

That's a separate issue.

 Oh, and you forgot to modify the documentation to update
 Availability. Please add a .. versionchanged:: 3.5 mentionning
 that the function is now also available on Windows.

Did you look at the patch?

363 .. versionchanged:: 3.5
364 Windows support added

--

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



[issue19875] test_getsockaddrarg occasional failure

2014-07-24 Thread Mark Lawrence

Mark Lawrence added the comment:

Clearly the long term solution is to fix the problems in the cpython code 
referenced in msg205227, but in the short term is it worth attempting a work 
around as suggested in msg205131 ?

--
nosy: +BreamoreBoy

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



[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Andrew Svetlov

New submission from Andrew Svetlov:

Fixed in f578e1d717b7 and f578e1d717b7.
Thanks.

--
nosy: +asvetlov
resolution:  - fixed
stage:  - resolved
status: open - closed

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




[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

2014-07-24 10:11 GMT+02:00 Charles-François Natali rep...@bugs.python.org:
 Please also fix socketpair() in asyncio to add the while/drop unknown
 connection (well, the function in socket.py and windows_utils.py must
 be the same).

 That's a separate issue.

Ok.

 Oh, and you forgot to modify the documentation to update
 Availability. Please add a .. versionchanged:: 3.5 mentionning
 that the function is now also available on Windows.

 Did you look at the patch?

 363 .. versionchanged:: 3.5
 364 Windows support added

Ok, I missed this part.

In this case, socketpair-4.diff looks good to me. You can commit your
patch in Python 3.5.

I will open another issue to synchronize asyncio, maybe fix accept()
to check the address and drop the if proto != 0: test.

--

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



[issue20055] On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84f26a437893 by Victor Stinner in branch '3.4':
Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence.
http://hg.python.org/cpython/rev/84f26a437893

New changeset f657b64c67ab by Victor Stinner in branch 'default':
(Merge 3.4) Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete
http://hg.python.org/cpython/rev/f657b64c67ab

--

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 I don't understand this. If you're ok with calling fileno() under Linux, why 
 not under Windows?

I propose to add set_wakeup_socket() for all platforms. This function doesn't 
really call the fileno() method, it gets the socket file descriptor/socket 
handle from the C structure.

I explained why I prefer to use an object rather than a number for 
set_wakeup_socket(). For example, it makes a clear separation between 
set_wakeup_fd(int) and set_wakeup_socket(socket).

Would you prefer to use the file descriptor/socket handler for 
set_wakeup_socket()?

--

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0177d8a4e82a by Victor Stinner in branch '2.7':
Issue #19884: readline: Disable the meta modifier key if stdout is not a
http://hg.python.org/cpython/rev/0177d8a4e82a

New changeset 6303266beb80 by Victor Stinner in branch '3.4':
Issue #19884: readline: Disable the meta modifier key if stdout is not a
http://hg.python.org/cpython/rev/6303266beb80

New changeset f85a968f9e01 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19884: readline: Disable the meta modifier key if stdout is
http://hg.python.org/cpython/rev/f85a968f9e01

--
nosy: +python-dev

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

I commited my patch.

--
resolution:  - fixed
status: open - closed

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



[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 833325d45113 by Victor Stinner in branch '3.4':
Issue #21813: Enhance documentation of the os.stat_result class.
http://hg.python.org/cpython/rev/833325d45113

New changeset 5d70ac83d104 by Victor Stinner in branch 'default':
Issue #21813: Enhance documentation of the os.stat_result class.
http://hg.python.org/cpython/rev/5d70ac83d104

--
nosy: +python-dev

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



[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

Thanks Zachary Ware for your review. I'm not sure that I addressed all your 
comments, but I'm not interested to spend too much time on the documentation. 
Please open an issue if your saw other things that can be improved.

--
resolution:  - fixed
status: open - closed

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



[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread akira

akira added the comment:

STINNER Victor rep...@bugs.python.org writes:

 I have implemented and would continue to lean towards continuing to
 hide BrokenPipeError on the additional API endpoints.

 FYI asyncio.Process.communicate() ignores BrokenPipeError and
 ConnectionResetError, whereas asyncio.Process.stdin.drain() (coroutine
 to wait until all bytes are written) raises a BrokenPipeError or
 ConnectionResetError if the child process exited. I think subprocess
 has the same design.

Do Popen.write_nonblocking() and Popen.read_nonblocking() methods
belong to the second category? Should they raise BrokenPipeError?

--

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



[issue1191964] add non-blocking read and write methods to subprocess.Popen

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 Do Popen.write_nonblocking() and Popen.read_nonblocking() methods
 belong to the second category? Should they raise BrokenPipeError?

IMO when you write directly to stdin and read from stdout/stderr of a
child process, your code should be written to handle BrokenPipeError.
You must decide how to handle them. Otherwise, you have to poll
manually the child process using proc.poll() which is less efficient.

If you forget to poll the process, your program may enter an unlimited
loop which only occur in some cases (bug in the child process which
exits before reading the whole stdin input).

--

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



[issue13533] Would like Py_Initialize to play friendly with host app

2014-07-24 Thread Yukihiro Nakadaira

Yukihiro Nakadaira added the comment:

This problem easily happen when there is no python installation and there is 
standalone python application compiled with py2exe or cx_Freeze (e.g. 
Mercurial).  Such application have pythonXX.dll in its directory.  But its 
python library can not be loaded normally.  So an application, which loads 
pythonXX.dll to check if python is available and uses it if possible, is 
terminated when loading python.

Vim uses python as embedding scripting language.  Vim loads pythonXX.dll when 
:python command is used.  And this problem is reported occasionally.

--
nosy: +ynkdir

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



[issue5718] Problem compiling ffi part of build on AIX 5.3.

2014-07-24 Thread David Edelsohn

David Edelsohn added the comment:

ffi_closure_helper_DARWIN should have been declared extern in the assembly 
file. This has been fixed in more recent versions of libffi and imported into 
more recent versions of CPython, including 2.7.

.extern .ffi_closure_helper_DARWIN

Is it worth updating libffi.diff to insert the appropriate fix in 2.6 or not?

--

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 24/07/2014 06:00, STINNER Victor a écrit :

 STINNER Victor added the comment:

 I don't understand this. If you're ok with calling fileno() under Linux, why 
 not under Windows?

 I propose to add set_wakeup_socket() for all platforms.

That's not what I'm answering to, though. See option B above.

Again, what's wrong with passing the socket as a fileno?

--

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



[issue5718] Problem compiling ffi part of build on AIX 5.3.

2014-07-24 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, David. If this is fixed in 2.7 we can close the issue.

--
nosy: +skrah
resolution:  - out of date
stage: needs patch - resolved
status: open - closed

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



[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2014-07-24 Thread akira

akira added the comment:

I've made the title more explicit: curses.isblank function doesn't match
ctype.h - curses.ascii.isblank() function is broken. It confuses
backspace (BS 0x08) with tab (0x09)

If a core developer could review the open questions from the 
previous message msg221008 then I could prepare a proper patch for the 
issue.

--
title: curses.isblank function doesn't match ctype.h - curses.ascii.isblank() 
function is broken. It confuses backspace (BS 0x08) with tab (0x09)

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



[issue21813] Enhance doc of os.stat_result

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

The only comments you didn't address you were right not to (sorry for the noise 
about path_fd, I completely missed that it was just a link reference); what you 
committed looks fine to me.

Thanks for your work on this, it looks like a big improvement to me!

--
versions: +Python 3.4

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



[issue20055] On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py

2014-07-24 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
Removed message: http://bugs.python.org/msg223821

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



[issue22055] Incomplete sentence in asyncio BaseEventLoop doc

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Misposted to #20055:

New changeset 84f26a437893 by Victor Stinner in branch '3.4':
Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence.
http://hg.python.org/cpython/rev/84f26a437893

New changeset f657b64c67ab by Victor Stinner in branch 'default':
(Merge 3.4) Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete
http://hg.python.org/cpython/rev/f657b64c67ab

--
nosy: +zach.ware

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



[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2014-07-24 Thread Alon Mishne

New submission from Alon Mishne:

According to the documentation of eval():

 If the globals dictionary is present and lacks '__builtins__', the current 
 globals are copied into globals before expression is parsed.

However in practice only the __builtins__ items are copied, see:

http://hg.python.org/cpython/file/2.7/Python/bltinmodule.c#l655

See http://stackoverflow.com/q/24934908/242762

--
assignee: docs@python
components: Documentation
messages: 223837
nosy: amishne, docs@python
priority: normal
severity: normal
status: open
title: The doc say all globals are copied on eval(), but only __builtins__ is 
copied
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue22052] Comparison operators called in reverse order for subclasses with no override.

2014-07-24 Thread R. David Murray

R. David Murray added the comment:

Ah yes.  I remember there being a discussion somewhere about the differences 
between comparison operator inverses and the arithmetic 'r' methods, but I 
can't find it at the moment.  I *thought* there was a full discussion of the 
logic involved in these cases, but I can't find that either.  We need one 
somewhere that we can crosslink to if it doesn't already exist.

--

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



[issue9882] abspath from directory

2014-07-24 Thread Wolfgang Maier

Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de:


--
nosy: +wolma

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



[issue22058] datetime.datetime() should accept a datetime.date as constructor

2014-07-24 Thread Facundo Batista

New submission from Facundo Batista:

Currently (tested on py3.4):

 from datetime import datetime, date
 d = datetime.now()
 date(d)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: an integer is required (got type datetime.datetime)

IMO, it's like doing int(float), a truncation of some info. For example, this 
is what I want to happen:

 d
datetime.datetime(2014, 7, 24, 11, 38, 44, 966613)
 date(d)
datetime.date(2014, 7, 24)

--
messages: 223840
nosy: facundobatista
priority: normal
severity: normal
status: open
title: datetime.datetime() should accept a datetime.date as constructor
versions: Python 3.5

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



[issue1730136] tkFont.__eq__ gives type error

2014-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch was not committed to 2.7 and now this bug causes an error on buildbot.

http://buildbot.python.org/all/builders/AMD64%20Debian%20root%202.7/builds/303/steps/test/logs/stdio

==
ERROR: test_finalizer (test.test_gc.GCTests)
--
Traceback (most recent call last):
  File /root/buildarea/2.7.angelico-debian-amd64/build/Lib/test/test_gc.py, 
line 149, in test_finalizer
gc.garbage.remove(obj)
  File /root/buildarea/2.7.angelico-debian-amd64/build/Lib/lib-tk/tkFont.py, 
line 100, in __eq__
return self.name == other.name and isinstance(other, Font)
AttributeError: A instance has no attribute 'name'

--
nosy: +serhiy.storchaka

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Victor: Sorry for the delay in getting back to this.  I'm attaching your full 
patch again; the diff you posted is a diff against your first patch, while what 
we need to be able to review it properly is a diff against the tip of the 
'default' branch.  You may be able to make such a diff by pulling from 
http://hg.python.org/cpython and then doing hg diff -r default Lib/unittest, 
but that may still not come up with the right changes.  I would suggest 
stripping your repository of any changesets on default branch that are not 
present on http://hg.python.org/cpython#default, and recommitting your changes 
on your own 'issue14534' branch, then you can make a proper patch just by doing 
hg diff -r default (assuming your branch is up to date with default).

--
Added file: http://bugs.python.org/file36062/issue14534.v2.diff

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



[issue22059] incorrect type conversion from str to bytes in asynchat module in asynchat.py

2014-07-24 Thread Hoxily

New submission from Hoxily:

refer to  http://hg.python.org/cpython/file/5d70ac83d104/Lib/asynchat.py#l123

--
components: Library (Lib)
hgrepos: 265
messages: 223842
nosy: brett.cannon, hoxily, tim.peters
priority: normal
severity: normal
status: open
title: incorrect type conversion from str to bytes in asynchat module in 
asynchat.py
type: behavior
versions: Python 3.4

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



[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2014-07-24 Thread wjssz

wjssz added the comment:

I wrote this code, but I don't know how to make a patch.

Insert these codes in C:\Python34\Lib\idlelib\IOBinding.py
Around line 234, before this line:
self.text.delete(1.0, end)


# check non-bmp characters
line_count = 1
position_count = 1
for char in chars:
if char == '\n':
line_count += 1
position_count = 1
if ord(char)  0x:
nonbmp_msg = (IDLE can't display non-BMP characters 
  (codepoint above 0x).\n
  A non-BMP character found at line %d, 
  position %d of file %s, codepoint 0x%X.\n
  Please open this file with another editor.)
tkMessageBox.showerror(non-BMP character,
nonbmp_msg %
   (line_count, position_count,
filename, ord(char)),
   parent=self.text)
return False
position_count += 1

--

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



[issue1730136] tkFont.__eq__ gives type error

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 841cdb6145e9 by Serhiy Storchaka in branch '2.7':
Issue #1730136: Fix comparison between a tk Font object and an object of a
http://hg.python.org/cpython/rev/841cdb6145e9

--
nosy: +python-dev

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



[issue22059] incorrect type conversion from str to bytes in asynchat module in asynchat.py

2014-07-24 Thread Hoxily

Changes by Hoxily hox...@qq.com:


--
hgrepos:  -265

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



[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2014-07-24 Thread wjssz

wjssz added the comment:

Changing the second if to elif is better.

I'm sorry, I have never submitted patch.
If somebody gives a hand, feel free to modify those codes.

--

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



[issue21623] build ssl failed use vs2010 express

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Mo Jia: are you still having issues with this?

--
resolution:  - works for me
status: open - pending

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Facundo Batista

Changes by Facundo Batista facu...@taniquetil.com.ar:


--
title: datetime.datetime() should accept a datetime.date as constructor - 
datetime.datetime() should accept a datetime.date as init parameter

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



[issue19980] Improve help('non-topic') response

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Mark, would you like to update your patch to address my review comments?

--

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



[issue9882] abspath from directory

2014-07-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: open - pending

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



[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2014-07-24 Thread Ezio Melotti

Ezio Melotti added the comment:

See https://docs.python.org/devguide/patch.html

--

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread R. David Murray

R. David Murray added the comment:

There is already a spelling for that operation, and it is d.date().  I'm not 
sure that there is a strong enough argument for adding a second way to spell 
it, but I won't close this yet to see what other people think.  

Personally I don't think it has ever occurred to me to do date(datetime) 
(although I have wanted to pass a string to the constructor), and I've wanted 
the operation and found the 'date()' method more than once.

--
nosy: +belopolsky, r.david.murray

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

How about this?  Should apply equally to 3.4 and default, 2.7 is different but 
can use the same concept (with s/_winapi/_subprocess/ among other changes).

--
nosy: +zach.ware
stage: test needed - patch review
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file36063/issue8110.diff

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



[issue22059] incorrect type conversion from str to bytes in asynchat module in asynchat.py

2014-07-24 Thread R. David Murray

R. David Murray added the comment:

So you are saying that that if will never trigger and can be deleted?

--
nosy: +r.david.murray

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 That's not what I'm answering to, though. See option B above.
 Again, what's wrong with passing the socket as a fileno?

There is nothing wrong, it's just that I prefer option (C) over the option 
(B).

Quick poll in the Python stdlib for functions accepting sockets on Windows.

Expect a socket object:

- asyncore.dispatcher.set_socket()
- ssl.wrap_socket(), ssl.SSLSocket()

Expect a (socket) handle:

- os.set_handle_inheritable(), function accepting any kind of handle, not only 
socket handles

Accept a file descriptor or an object with a fileno() method:

- select.select(), select.poll()

Hum, I'm not convinced by the poll :-/ There are too few functions to use it to 
take a decision.


On UNIX, sockets are just file descriptors, like any other file descriptor. So 
all functions accepting file descriptors accept sockets.

--

Note: select.select() uses int PyObject_AsFileDescriptor(PyObject *o) to get 
the socket handle of a socket, I would expect the SOCKET_T type here. Does it 
mean that socket handle fits in a C int? Yes according to this article:

http://stackoverflow.com/questions/1953639/is-it-safe-to-cast-socket-to-int-under-win64

Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because the 
value constitutes an index in per-process table of limited size and not a real 
pointer.

The per-process limit on kernel handles is 2^24.

I wrote a stress test creating and closing sockets in a loop. I ran the test on 
Windows 7 64 bit with 1 GB of memory. The maximum seen socket handle is 
1,330,836 after creating 5,613,807 sockets (with a list of 331,343 open 
socekts), it's much smaller than 2^32.

OpenSSL stores socket handles in C int.

--

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

+1

There is currently no obvious way to convert either date or datetime instance 
to date.

The best solution I can think of is date(*x.timetuple()[:3]):

 d = date.today()
 t = datetime.now()
 date(*d.timetuple()[:3])
datetime.date(2014, 7, 24)
 date(*t.timetuple()[:3])
datetime.date(2014, 7, 24)

Certainly date(x) wins hands down over this atrocity.

--
stage:  - needs patch
type:  - enhancement

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Removed file: http://bugs.python.org/file36059/map_chunksize.patch

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Added file: http://bugs.python.org/file36064/map_chunksize.patch

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Removed file: http://bugs.python.org/file36058/test_mult.py

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Added file: http://bugs.python.org/file36065/test_mult.py

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



[issue22041] http POST request with python 3.3 through web proxy

2014-07-24 Thread Demian Brecht

Demian Brecht added the comment:

I've attached a patch that solves the issue I encountered. It would be great if 
you could confirm whether or not it also resolves the issue as reported.

--
keywords: +patch
Added file: http://bugs.python.org/file36066/issue22041.patch

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Removed file: http://bugs.python.org/file36064/map_chunksize.patch

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


Added file: http://bugs.python.org/file36067/map_chunksize.patch

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-07-24 Thread Dan O'Reilly

Dan O'Reilly added the comment:

I've added new versions of the patch/demonstration that ensures we actually 
submit all the futures before trying to yield from the returned iterator. 
Previously we were just returning a generator object when map was called, 
without actually submitting any futures.

--

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



[issue17483] Can not tell urlopen not to check the hostname for https connections.

2014-07-24 Thread Alecz

Alecz added the comment:

Actually, because of issue 18543, urlopen will not use the custom opener if one 
was defined, instead, it will create a new opener with check_hostname = True.

So it is impossible to skip hostname checking without overriding the urlopen 
method.

I don't understand why can't we allow check_hostmane to be set to False in 
urlopen and also why we don't allow custom openers to be used by urlopen if 
specifying a ca*.

Moreover this forced restriction is not documented. I had to go to the source 
code to figure out why it wasn't working.

This issue being resolved makes it even more misleading.

--
nosy: +Alecz
Added file: http://bugs.python.org/file36068/urlopen-explained.py

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



[issue22059] incorrect type conversion from str to bytes in asynchat module in asynchat.py

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Hoxily: It's best to spell out the bug you have found, preferably with an 
error/exception message and a way to reproduce it.

My best guess at the problem you're reporting (after looking at that line about 
4 times) is that bytes(str, self.encoding) should be bytes(data, 
self.encoding) and you're getting an error message like TypeError: encoding 
or errors without a string argument.  Is that correct?

Also, note that asynchat is deprecated, you would probably be better off using 
asyncio.

--
nosy: +zach.ware
versions: +Python 3.5

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



[issue22059] incorrect type conversion from str to bytes in asynchat module in asynchat.py

2014-07-24 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue11266] asyncore does not handle EINTR in recv, send, connect, accept,

2014-07-24 Thread STINNER Victor

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


--
resolution:  - duplicate
status: open - closed
superseder:  - handle EINTR in the stdlib

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2014-07-24 Thread STINNER Victor

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


--
Removed message: http://bugs.python.org/msg172160

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-07-24 Thread R. David Murray

R. David Murray added the comment:

I have updated your patch, changing wording of some of the documentation, and 
applying style tweaks to the code.  I have also done the refactoring of the 
_set_xxx_state method that I suggested.  Seemed easier to show you what I meant 
in code rather than try to explain it.

You should use Reitveld's 'patch diff' facility to look at the changes that I 
made to your patch. 

Things that remain to be done:

I'm getting warnings when I run the tests.  These should be either suppressed 
or checked for (assertWarns).  (Or fixed, in the case of assertEquals :)

In the process_message docs it says that it should use RFC 821 format for the 
return, but in the new process method it says RFC 6531.  This makes sense for 
the new method, but is there a more recent RFC the old method should be 
referring to?  Or is there an open issue about more modern return codes for 
smtpd?  I seem to remember something, but don't have time to look now.

There is an issue with the reset of the maximum command length, but that can be 
dealt with in the 'duplicate HELO/EHLO' issue.

process_smtputf8_message in DebuggingServer should be receiving bytes, and so 
should error when it tries to split via '\n'.  Presumably this means there is a 
missing test as well, and also the same issue if decode_data is False when 
using DebuggingServer.  (Unless Im missing something; I didn't try to test it.)

Different issue, but have you given any thought to what it would take to make 
PureProxy support SMTPUTF8?

--
Added file: http://bugs.python.org/file36069/issue21725v4.patch

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



[issue17483] Can not tell urlopen not to check the hostname for https connections.

2014-07-24 Thread R. David Murray

R. David Murray added the comment:

This issue was about setting hostname checking to false when the cert was being 
checked, and we rejected making that even possible in urlopen.

If there is an issue with not being able to use a custom opener, that would be 
a different issue and you should open a new ticket.  Also if you think there is 
a documentation bug, that should be a new issue, which can refer to this one 
for background.

--

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b7f144d14798 by Victor Stinner in branch '3.4':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/b7f144d14798

New changeset aa150c7a5d24 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #16133: The asynchat.async_chat.handle_read() method now
http://hg.python.org/cpython/rev/aa150c7a5d24

--

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d422062d7d36 by Victor Stinner in branch '2.7':
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
http://hg.python.org/cpython/rev/d422062d7d36

--

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

I modified EWOULDBLOCK.patch to use BlockingIOError on Python 3 and I added a 
unit test. I also added EALREADY and EINPROGRESS which are used by the 
BlockingIOError in Python 3, just in case.

Thanks Xavier for your patch, sorry for the delay.

--
resolution:  - fixed
status: open - closed

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



[issue15982] asyncore.dispatcher does not handle windows socket error code correctly (namely WSAEWOULDBLOCK 10035)

2014-07-24 Thread STINNER Victor

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


--
resolution:  - duplicate
status: open - closed
superseder:  - asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Tim Peters

Tim Peters added the comment:

Was the title of this meant to be

datetime.date() should accept a datetime.datetime as init parameter

instead?  That's what the example appears to be getting at.

If so, -1.  Datetime objects already have .date(), .time(), and .timetz() 
methods to extract, respectively, the date, naive time, and aware time portions 
of the datetime object.  In the other direction, the datetime .combine() 
constructor builds a datetime object out of date and time components.  As the 
docs say,

For any datetime object d, d == datetime.combine(d.date(), d.timetz())

Another way to spell this isn't needed.

 There is currently no obvious way to convert either date
 or datetime instance to date.

some_datetime_object.date() is the obvious way to extract a date object from a 
datetime object.

I don't know what it could mean to convert a date object to a date.  That's 
pretty much exactly like asking how to convert an int object to an int.  Huh? 
;-)  date and int objects are immutable, so a need to make a copy (if that's 
what is meant) rarely arises.

--
nosy: +tim.peters

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

The test fails on AMD64 OpenIndiana 2.7:

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%202.7/builds/2354/steps/test/logs/stdio

test test_readline failed -- Traceback (most recent call last):
  File 
/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/test/test_readline.py,
 line 52, in test_init
self.assertEqual(stdout, b'')
AssertionError: '\x1b[?1034h' != ''

--
resolution: fixed - 
status: closed - open

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread Ned Deily

Ned Deily added the comment:

The changes are also causing segfaults when readline is linked with BSD libedit 
(the default on OS X) rather than GNU readline:

==
FAIL: test_init (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File /py/dev/3x/source/Lib/test/test_readline.py, line 52, in test_init
TERM='xterm-256color')
  File /py/dev/3x/source/Lib/test/script_helper.py, line 69, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
  File /py/dev/3x/source/Lib/test/script_helper.py, line 55, in _assert_python
stderr follows:\n%s % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is -11, stderr follows:
Fatal Python error: Segmentation fault

Current thread 0x7fff75489310 (most recent call first):
  File frozen importlib._bootstrap, line 321 in _call_with_frames_removed
  File frozen importlib._bootstrap, line 1664 in load_module
  File frozen importlib._bootstrap, line 540 in _check_name_wrapper
  File frozen importlib._bootstrap, line 1110 in _load_backward_compatible
  File frozen importlib._bootstrap, line 1140 in _load_unlocked
  File frozen importlib._bootstrap, line 2175 in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 2186 in _find_and_load
  File string, line 1 in module

--
nosy: +ned.deily

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

 some_datetime_object.date() is the obvious way to extract a
 date object from a datetime object.

Sorry if I was not clear enough about my use case.  I often have to deal with 
functions that are designed to take either date or datetime object as an 
argument, but only use date components.  In most cases this works automatically 
because datetime is a subclass of date.  However, there are some annoying 
exceptions.  For example, x  date(2001, 1, 1) will not work if x is a datetime 
instance.  If in this example I write x.date()  date(2001, 1, 1) - I get the 
opposite problem - it won't work when x is a date instance.

The obvious way would be date(x)  date(2001, 1, 1).

Can you suggest anything better than date(*x.timetuple()[:3])  date(2001, 1, 
1) here?

--

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Another solution is date(2001, 1, 1).__lt__(x), but this is even uglier than 
the one with timetuple.

--

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



[issue19875] test_getsockaddrarg occasional failure

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file36070/find_unused_race.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19875
___diff -r f7643c893587 Lib/test/test_socket.py
--- a/Lib/test/test_socket.py   Wed Jul 23 19:28:13 2014 +0100
+++ b/Lib/test/test_socket.py   Thu Jul 24 19:43:26 2014 +0100
@@ -3,6 +3,7 @@
 
 import errno
 import io
+import itertools
 import socket
 import select
 import tempfile
@@ -1147,17 +1148,24 @@
 sock.close()
 
 def test_getsockaddrarg(self):
-host = '0.0.0.0'
+sock = socket.socket()
+self.addCleanup(sock.close)
 port = support.find_unused_port()
 big_port = port + 65536
 neg_port = port - 65536
-sock = socket.socket()
-try:
-self.assertRaises(OverflowError, sock.bind, (host, big_port))
-self.assertRaises(OverflowError, sock.bind, (host, neg_port))
-sock.bind((host, port))
-finally:
-sock.close()
+self.assertRaises(OverflowError, sock.bind, (HOST, big_port))
+self.assertRaises(OverflowError, sock.bind, (HOST, neg_port))
+# Since find_unused_port() is inherently subject to race conditions, we
+# call it a couple times if necessary.
+for i in itertools.count():
+port = support.find_unused_port()
+try:
+sock.bind((HOST, port))
+except OSError as e:
+if e.errno != errno.EADDRINUSE or i == 5:
+raise
+else:
+break
 
 @unittest.skipUnless(os.name == nt, Windows specific)
 def test_sock_ioctl(self):
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21367] multiprocessing.JoinableQueue requires new kwarg

2014-07-24 Thread Dan O'Reilly

Dan O'Reilly added the comment:

How are you importing JoinableQueue? You'll see this error if you import it 
from multiprocessing.queues instead of directly from multiprocessing. This is 
because multiprocessing.JoinableQueue is now a function:


def JoinableQueue(self, maxsize=0):
'''Returns a queue object'''
from .queues import JoinableQueue
return JoinableQueue(maxsize, ctx=self.get_context())

It provides the required context argument for you. Make sure your application 
is doing from multiprocessing import JoinableQueue, rather than from 
multiprocessing.queues import JoinableQueue.

--
nosy: +dan.oreilly

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



[issue21367] multiprocessing.JoinableQueue requires new kwarg

2014-07-24 Thread Dan O'Reilly

Changes by Dan O'Reilly oreil...@gmail.com:


--
components: +Library (Lib) -Interpreter Core
type: compile error - behavior

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

As I said offline to Victor, I think it would be better to have a single 
function, i.e. keep set_wakeup_fd(). It makes the API simpler, less confusing 
and error prone: some people will wonder which one they should use, might end 
up using the wrong one, or both.
Furthermore, it makes writing portable Python code more difficult, since the 
user has to chose the right function.
If set_wakeup_fd() can do an fstat() (or whatever that it on Windows) to detect 
the FD type and call send() instead of write() on a socket, all the above 
issues would go away.
Never let the user do what the library can do for him.

--

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Tim Peters

Tim Peters added the comment:

Alexander, I don't see a need to make everything a one-liner.  Dealing with a 
mix of dates and datetimes is easily sorted out with an `if` statement, like

def func(thedate):
if isinstance(thedate, datetime.datetime):
thedate = thedate.date()
# and now `thedate` is a bona fide datetime.date

Or stick the two lines in a utility function.

If you're determined to do it one line, because datetime is a subclass of date 
you could also use .combine() to force everything to class datetime.datetime in 
one line:

_ZEROT = datetime.time()

def func(thedatetime):
thedatetime = datetime.combine(thedatetime, _ZEROT)
# and now `thedatetime` is a bona fide datetime.datetime

--

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

I find Charles' argument pretty convincing. The whole point of this API is to 
have another thing you can add to the selector to deal with a race condition. 
You then pass this thing's fileno() to signal.set_wakeup_fd(). That should be 
totally portable.

I'm find with it requiring a fd that refers to a socket on Windows; plain files 
aren't selectable anyway (not even on UNIX).

--

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 The changes are also causing segfaults when readline is linked with BSD 
 libedit (the default on OS X) rather than GNU readline:

Oh wow. Do you have an idea of to fix the issue with libedit? Or make
the code condition, only use it with native readline?

--

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

The patch looks good.
I just think it would be nice to expose _fdcount() in test.support.

--
nosy: +neologix

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



[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

I'm closing, since it's amlost certainly an OS-X bug (similar to time-wit 
socket exhaustion  Co).

--
resolution:  - third party
stage:  - resolved
status: open - closed

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It is not as mush about avoiding a one-liner as it is about duck-typing.  IMO, 
dates and datetime objects are numbers in disguise.  Many functions that are 
nominally numeric, can work with date/datetime/timedelta objects without 
modification.  The fact that date/datetime do not accept their own instances 
often results in the need to branch on isinstance() or write a separate set of 
functions depending on whether dates are represented by numbers or by date 
instances.

The example that I gave is one of many and the fact that you suggested using 
isinstance() in the solution is telling. 

My ideal design would be for date/datetime constructors to take one argument 
that can be a string, a 3+ elements iterable, or any object that has a 
.timetuple() method.  The varargs variants can of course stay as syntactic 
sugar.

--

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



[issue12184] socketserver.ForkingMixin collect_children routine needs to collect only it's children

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

Closing as wont't fix, since we now have asyncio which handles this much better.

--
resolution:  - wont fix
stage: needs patch - resolved
status: open - closed

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



[issue12801] C realpath not used by os.path.realpath

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

Shall we close this, since realpath(3) is fundamentally broken, and pathlib now 
does The Right Thing?

--

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread Ned Deily

Ned Deily added the comment:

Currently, readline.c uses #ifdef __APPLE__ to guard libedit-specific code 
(there is another open issue to generalize libedit support to other platforms).

--

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but 
only accept socket handles on Windows.

New patch wakeup_fd-7.patch:

- signal.set_wakeup_fd() now only accepts socket handles (int) on Windows, it 
raises TypeError for files. Note: it also raises TypeError for closed sockets 
(I don't think that it's possible to check if a integer is a closed file 
descriptor or a closed socket).

- PySignal_SetWakeupFd() uses Py_SAFE_DOWNCAST(wakeup.fd, SOCKET_T, int) to 
convert the socket handle to an int. It's safe according to msg223852.

Sorry, it took me several versions to design the API. I discovered that:

- files cannot be non-blocking on Windows (so signal.set_wakeu_fd() is almost 
useless on Windows in Python 3.4),

- socket handles should be stored in SOCKET_T (not int) which caused me issues 
with the PySignal_SetWakeupFd() prototype (result type is int),

- in fact, it's safe to cast SOCKET_T to int.

Guido wrote:
 My worry is that somehow a program has a fd that refers to both a file and a 
 socket. But I agree that changing the API is not a great option either.

I don't think that it's possible that a file descriptor and a socket handle 
have the same value.

--
Added file: http://bugs.python.org/file36071/wakeup_fd-7.patch

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

Why not using os.fstat() instead of os.dup() to check if a file descriptor is 
open or not?

It's strange to create a new file descriptor with os.dup() to count the file 
descriptors.

--

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

 Why not using os.fstat() instead of os.dup() to check if a file descriptor is 
 open or not?

I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).

--

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



[issue12801] C realpath not used by os.path.realpath

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

I agree, Python should not use the C function realpath() for all the reasons 
give in the issue.

--
resolution:  - not a bug
status: open - closed

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

I think if it's not a socket (or a closed one) it should raise ValueError or 
perhaps OSError -- TypeError would mean that it's not an int.

--

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 I asked myself the same question, but IIRC, fstat() doesn't always
work on Windows (of course).

Can you please elaborate?

--

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

 I think if it's not a socket (or a closed one) it should raise ValueError or 
 perhaps OSError -- TypeError would mean that it's not an int.

Oh, you're right. Updated patch, version 8, now raises a ValueError.

--
Added file: http://bugs.python.org/file36072/wakeup_fd-8.patch

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

 STINNER Victor added the comment:

 I asked myself the same question, but IIRC, fstat() doesn't always
 work on Windows (of course).

 Can you please elaborate?

Not really, since I don't know much about Windows, but that's
something I think I heard.
Richard will be able to give more details.

--

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



[issue19884] Importing readline produces erroneous output

2014-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0ab6f9f0603 by Victor Stinner in branch '2.7':
Issue #19884, readline: calling rl_variable_bind (enable-meta-key, off)
http://hg.python.org/cpython/rev/f0ab6f9f0603

New changeset 3f08c1156050 by Victor Stinner in branch '3.4':
Issue #19884, readline: calling rl_variable_bind (enable-meta-key, off)
http://hg.python.org/cpython/rev/3f08c1156050

New changeset 0ed1801bf4bd by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19884, readline: calling rl_variable_bind
http://hg.python.org/cpython/rev/0ed1801bf4bd

--

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



[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Facundo Batista

Facundo Batista added the comment:

El 24/07/14 a las 15:01, Tim Peters escibió:

 datetime.date() should accept a datetime.datetime as init
 parameter
 
 instead?  That's what the example appears to be getting at.
 
 If so, -1.  Datetime objects already have .date(), .time(), and
 .timetz() methods to extract, respectively, the date, naive time, and

Ah, I wasn't aware of the .date() method.

I guess because it's more natural to me to do int(a_float) than
a_float.integer().

So, unless anyody wants to pursue with this, I'll close the issue.

Thanks!

--

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



[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-07-24 Thread STINNER Victor

STINNER Victor added the comment:

The issue is just an example of the main issue #18885 which proposes to retry 
interrupted syscalls. I hesitate to mark it as duplicate, but it contains an 
interesting patch.

--

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-07-24 Thread Zachary Ware

New submission from Zachary Ware:

Attached is a patch that aims to clean up the ctypes tests a bit, namely by 
removing the custom resource management (which conflicts with regrtest), the 
custom test discovery (which is better left to unittest), and the custom test 
running (which is better covered by unittest and regrtest).  The one thing I'm 
not entirely confident about removing is the custom refleak testing, but it 
does not seem to work correctly in 3.x anyway (though in 2.7, the custom 
refleak hunter reports leaks that the regrtest refleak hunter does not).

There were only a few uses of the custom resource management, all of which were 
replaced or removed.  test_SEH in test_win32 used requires('SEH'), but that 
test should now be sufficiently guarded with unittest skip decorators (only 
trying the test on Windows, with Python built in Release configuration by 
MSVC).  test_PyLong_Long in test_python_api used requires('refcount'), but 
that should be covered by the @support.refcount_test decorator (added long 
after the 'requires' call).  Two instances of is_resource_enabled('printing') 
were replaced by if test.support.verbose.

The same number of tests run (all successfully) on Windows, I have not yet 
tested on any other platforms.

--
components: Tests, ctypes
files: ctypes.test-cleanup.diff
keywords: patch
messages: 223891
nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Clean up ctypes.test, use unittest test discovery
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file36073/ctypes.test-cleanup.diff

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Charles-François Natali

Charles-François Natali added the comment:

 Ok, let's go with the option (B): use set_wakeup_fd() on all platforms, but 
 only accept socket handles on Windows.

Sorry, why restrict it to sockets on Windows?
If someone wants to pass e.g. a pipe, why prevent it?

--

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



[issue21314] Document '/' in signatures

2014-07-24 Thread Zachary Ware

Zachary Ware added the comment:

Apologies for the delay in answering, Emily.  And, unfortunately, I don't have 
a good answer.  If you would like to write a patch, I would suggest just 
sticking the documentation wherever you think is best and make sure there is a 
link to it from the Symbols index page.  Whoever commits your patch will either 
agree with your placement or have a better idea of where to put it, and will 
either move it themselves or work with you to move it.

Here are a few possible places it could go, off the top of my head and without 
really looking:
- in the pydoc docs
- in the help() builtin docs
- in or near the inspect.Signature docs
- in the Clinic HOWTO
- somewhere in the tutorial (though I'm not sure where would be good)

--

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



[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any ca* argument

2014-07-24 Thread Alecz

Alecz added the comment:

I just want to point out that the documentation states that an opener can be 
used with urlopen:

 urllib.request.install_opener(opener)

Install an OpenerDirector instance as the default global opener. Installing 
an opener is only necessary if you want urlopen to use that opener; 

Reference:
https://docs.python.org/3/library/urllib.request.html?highlight=urllib.request#urllib.request.install_opener

Issue 17483 was closed (rejected) because it was considered that a custom 
opener can be used when opening https links.

--
nosy: +Alecz
Added file: http://bugs.python.org/file36074/urlopen-explained.py

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



  1   2   >