[issue10803] ctypes: better support of bytearray objects

2014-08-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Existing inconsistency was fixed in issue22161.

Patch updated, synchronized with tip. Added new tests.

--
Added file: http://bugs.python.org/file36326/ctypes_bytearray_2.patch

___
Python tracker 

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



[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-09 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch.

--
keywords: +patch
nosy: +vajrasky
Added file: http://bugs.python.org/file36327/embedded_null_in_path.patch

___
Python tracker 

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



[issue21965] Add support for Memory BIO to _ssl

2014-08-09 Thread Geert Jansen

Geert Jansen added the comment:

Thanks to Ben and Glyph for their feedback. The memory BIO should allow 
ProactorEventLoop to support SSL. I say "should" because I have not looked at 
it myself. However, my Gruvi project is proactor (libuv) based and I have a 
private branch where SSL support is working using a proactor API.

I need a few more days to create an updated patch. This patch will include 
Antoine's suggestion of passing the SSLObject instance to the servername 
callback, and an update to the docs.

--

___
Python tracker 

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



[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-09 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Not sure if this consequence of the commit is intended behavior, but still 
placing it here. 

In any file, set a breakpoint on any line. Pressing  key anywhere after 
the first character, will create a new breakpoint in the next line. These lines 
will also get saved to the .idlerc/breakpoints.lst file.

This is mostly(99.9%) Tk behavior.

--
nosy: +sahutd

___
Python tracker 

___
___
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-08-09 Thread R. David Murray

R. David Murray added the comment:

I tweaked your additions.  Instead of trying to strip out the 'b' to make 
things "look pretty", I think it is better to print them and thus make it 
explicit when we are dealing with binary data and when we are dealing with 
strings.  It also clues the user in to the fact that the escaping inside the 
string is that used for bytes display, as opposed to string display.  I also 
expanded the tests to include headers so that the 'X-Peer' header addition 
would get tested.  This reveals a bug; whether it is in the tests or the code I 
don't know: the value of self.peer in the process_ methods is 'peer', not the 
expected ('b', 0).  If you can look in to this issue it would be great.

That looks like the last issue that needs to be addressed before commit.

(Oh, yeah, and there was a bug in the original process_message code...it was 
printing an extra blank line at the end of the message text if there was, as 
there should be, a newline at the end of the message...I fixed that by 
switching to splitlines instead of split.)

--
Added file: http://bugs.python.org/file36328/issue21725v5.3.patch

___
Python tracker 

___
___
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-08-09 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I think that the peer arg is supposed to be set to the address of the peer 
connecting to our server.
The value 'peer' comes from test/mock_socket.py:105 and is the best answer we 
can get for mock_sock.getpeername() because there is no real client when 
directly writing into the socket. "('b', 0)" would be the address of the remote 
server.

--

___
Python tracker 

___
___
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-08-09 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

I can take a look at the py failure next week.

Keeping the run-time compatibility code seems sensible, but I'm not sure if 
it'd fix the py test?

I don't think reverting the changes at this point is warranted.

--

___
Python tracker 

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



[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On 8/9/2014 10:13 AM, Saimadhav Heblikar wrote:
>
> Saimadhav Heblikar added the comment:
>
> Not sure if this consequence of the commit is intended behavior,

It is.

> In any file, set a breakpoint on any line. Pressing  key
> anywhere after the first character, will create a new breakpoint in
> the next line.

Pressing any normal key within a tagged slice inserts the corresponding 
character within the slice.  If the character happens to be \n, then the 
*one* slice encompasses one more line than it did before.

A BREAK tag on line n encompasses one complete line, including terminal 
\n. In slice terms, n.0:(n+1).0. An xml version might look like the 
following.

This is something. This is something else


Insert \n after 'some' and we have

This is some
thing. This is something else


The tag now encompasses two complete lines (including, importantly, two 
\ns). This is standard slice insertion behavior, which tk provides us. 
There is no new slice created.

> These lines will also get saved to the .idlerc/breakpoints.lst file.

PyShellEditorWindow.store_file_breaks calls .update_breakpoints
This sends text.tag_ranges("BREAK") to .ranges_to_linenumbers.
This specifically accounts for possible insertions with this loop for 
each tag range.
 while lineno < end:  # lineno initially start line
 lines.append(lineno)
 lineno += 1

When I initially read the tag setting code, I wondered why include \n, 
why not the following?

This is something. This is something else

Possible insertion of \n is an answer.

The comment block for store_file_breaks addresses some of these issues, 
and needs revision after the patch.

I have been thinking that PyShellEditorWindow, later renamed 
EditorWindow*, should be BreakpointEditorWindow and moved to debugger.py.#

* not to be confused with EditorWindow.EditorWindow, which should really 
be called BaseEditorWindow.

# after applying either of your patches, at least locally.

--

___
Python tracker 

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



[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-09 Thread Matthias Klose

New submission from Matthias Klose:

tracking the import of libffi 3.1

--
components: ctypes
messages: 225109
nosy: doko
priority: normal
severity: normal
status: open
title: update internal libffi copy to 3.1, introducing AArch64 and POWER ELF 
ABIv2
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue14105] Breakpoints in debug lost if line is inserted; IDLE

2014-08-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Forgot to mention: after inserting \n, the breakpoint tag can be cleared 
from either line independently. Tagging complete lines makes this easy. 
If a line is split into three and the middle line untagged, then the 
first and third are left separately tagged.

--

___
Python tracker 

___
___
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-08-09 Thread R. David Murray

R. David Murray added the comment:

OK, it's a bug in mock_socket, then.  getpeername should be returning a tuple 
(address, port).

I went ahead and fixed it, and committed the patch.

Thanks Milan!  Sorry the reviews were so delayed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f73c8cf6261f by doko in branch '3.4':
- Issue #22176: Update the ctypes module's libffi to v3.1.  This release
http://hg.python.org/cpython/rev/f73c8cf6261f

New changeset 0fef0afb9d19 by doko in branch 'default':
- Issue #22176: Update the ctypes module's libffi to v3.1.  This release
http://hg.python.org/cpython/rev/0fef0afb9d19

--
nosy: +python-dev

___
Python tracker 

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



[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 269ec4c568bd by doko in branch '3.4':
- Issue #22176: Add src/x86/win32.S for x86 libffi builds.
http://hg.python.org/cpython/rev/269ec4c568bd

--

___
Python tracker 

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



[issue22177] Incorrect version reported after downgrade

2014-08-09 Thread jp

New submission from jp:

After downgrading from version 2.7.8 to 2.7.5 on Win7 x86 32bit Python, the 
interpreter continues to report version 2.7.8.

I have verified that the installation folder has the correct files belonging to 
2.7.5 as evidenced by python.exe having a 2013 timestamp. 

Ran python -V at windows CMD and sys.version in interpreter, both report 2.7.8.

--
messages: 225114
nosy: jpe5605
priority: normal
severity: normal
status: open
title: Incorrect version reported after downgrade
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d3f960c26f5 by doko in branch '3.4':
- Issue #22176: Fix build failure on ARM with 
-Werror=declaration-after-statement
http://hg.python.org/cpython/rev/4d3f960c26f5

--

___
Python tracker 

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



[issue22177] Incorrect version reported after downgrade

2014-08-09 Thread jp

jp added the comment:

Forget to mention this downgrade was installed over the existing python 
installation.

--

___
Python tracker 

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



[issue22177] Incorrect version reported after downgrade

2014-08-09 Thread Ezio Melotti

Ezio Melotti added the comment:

Have you checked if there are pyc files left around by the previous 
installation?
Have you specified the full path to python.exe from cmd while running python -V?
If you start the interpreter and print sys.version what do you get?  Does 
anything change if you reload(sys)?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, idle & 2to3

2014-08-09 Thread Mark Lawrence

Mark Lawrence added the comment:

I'm assuming that this still applies to 3.4 and 2.7.

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

___
Python tracker 

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



[issue6858] This is a python file, apply syntax highlighting

2014-08-09 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue22177] Incorrect version reported after downgrade

2014-08-09 Thread jp

jp added the comment:

Have you checked if there are pyc files left around by the previous 
installation? -- Yes, hundreds! After making a backup, i deleted all 900+ 
occurrences of "*.pyc" in c:\python27 and it still reports 2.7.8.

Have you specified the full path to python.exe from cmd while running python 
-V?-- Yes, i've attached the console output

If you start the interpreter and print sys.version what do you get?  Does 
anything change if you reload(sys)? -- 2.7.8 again, no.

--
Added file: http://bugs.python.org/file36329/console.txt

___
Python tracker 

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



[issue16893] Create IDLE help.txt from Doc/library/idle.rst

2014-08-09 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.5 -Python 3.3

___
Python tracker 

___
___
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-08-09 Thread Nick Coghlan

Nick Coghlan added the comment:

Agreed reverting isn't necessary - main thing is to figure out what went wrong 
in the py test suite and come up with a new test case that covers it.

The reason I suspect it's the missing runtime check that's causing the py 
problem is because (as far as I am aware), Jinja2 generates AST constructs 
directly and compiles those, and thus may be relying on the runtime check. It's 
just a theory, though.

--

___
Python tracker 

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



[issue21965] Add support for Memory BIO to _ssl

2014-08-09 Thread Glyph Lefkowitz

Changes by Glyph Lefkowitz :


--
nosy:  -glyph

___
Python tracker 

___
___
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-08-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e9b023078e6 by Benjamin Peterson in branch '2.7':
restore runtime exec test (#21591)
http://hg.python.org/cpython/rev/0e9b023078e6

--

___
Python tracker 

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



[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-08-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a3538f14948 by Benjamin Peterson in branch '3.4':
add -Werror=declaration-after-statement only to stdlib extension modules 
(closes #21121)
http://hg.python.org/cpython/rev/2a3538f14948

New changeset a5368cfbea0e by Benjamin Peterson in branch 'default':
merge 3.4 (#21121)
http://hg.python.org/cpython/rev/a5368cfbea0e

--
nosy: +python-dev
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22174] property doc fixes

2014-08-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Also, please don't add the extra whitespace to the docstring.  It is 
intentionally compact because of the differing needs of various IDEs and help 
utlities.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue22174] property doc fixes

2014-08-09 Thread diana

diana added the comment:

This whitespace? Or did you mean something else?

  class C:
  def __init__(self):
  self._x = None

  def getx(self):
  return self._x

  def setx(self, value):
  self._x = value

  def delx(self):
  del self._x

  x = property(getx, setx, delx, "I'm the 'x' property.")

versus:

  class C:
  def __init__(self):
  self._x = None

  def getx(self):
  return self._x
  def setx(self, value):
  self._x = value
  def delx(self):
  del self._x
  x = property(getx, setx, delx, "I'm the 'x' property.")

I added it to be consistent with the rest of the code snippets in the property 
docs. For example:

  class C:
  def __init__(self):
  self._x = None

  @property
  def x(self):
  """I'm the 'x' property."""
  return self._x

  @x.setter
  def x(self, value):
  self._x = value

  @x.deleter
  def x(self):
  del self._x

Of the three code snippets in the property docs, that first one is the only one 
that doesn't have whitespace between the methods. That first code snippet also 
has inconsistent whitespace within itself (__init__ vs the rest of methods).

Anyhoo, that was my reasoning, but that's largely beside the point. I will 
happily drop it and leave it as-is. What really prompted me to submit a patch 
was this paragraph:

"If given, doc will be the docstring of the property attribute. Otherwise, the 
property will copy fget‘s docstring (if it exists). This makes it possible to 
create read-only properties easily using property() as a decorator:"

I now understand the original intent, but I don't think it's clear as-is. 

I also find it a bit odd that 'fget', 'fset', 'fdel' are all defined in the 
first sentence of the docs, but 'doc' isn't. It then launches into an example 
that uses 'doc' (still as of yet undefined), before defining 'doc' later on in 
the read-only properties part.

I'll think on it a bit some more -- feel free to close this in the mean time. 
It's been this way for a better part of a decade, so perhaps it's just me ;)

Cheers,

--diana

--

___
Python tracker 

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



[issue22178] _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect

2014-08-09 Thread sw

New submission from sw:

The explanation of the 3rd index of the tuple returned from 
_winreg.QueryInfoKey(key) explains that it is a long representing 100s of 
nanoseconds since 1/1/1600.

However, when I use this value and convert to the actual date using 
startDate = datetime(1600,1,1)
lastModified = QueryInfoKey(key)[2]
print "%s" % startDate + timedelta(seconds=lastModified*(10**-9)*100) 

The date is about right except for the year value, it's off by one.

I suspect the documentation should say the value in the tuple is the time since 
1/1/1601 instead of 1/1/1600. This would corroborate Microsoft's documentation 
that makes references to 1/1/1601 (i.e. 
http://technet.microsoft.com/en-ca/aa393040(v=vs.90).aspx)

--
messages: 225125
nosy: slw07g
priority: normal
severity: normal
status: open
title: _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation 
Incorrect
type: behavior
versions: Python 2.7

___
Python tracker 

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