[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> martin.panter
stage: patch review -> commit review

___
Python tracker 

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



[issue21373] robotparser: Automatically call modified function in read()

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

This is already fixed by changeset 4ea86cd87f95 in issue 21469 (2.7 and 3.4+). 
Thanks for the report and for the patch.

--
nosy: +berker.peksag
resolution:  -> out of date
stage:  -> 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



[issue25341] File mode wb+ appears as rb+

2015-10-08 Thread Mahmoud Hashemi

Changes by Mahmoud Hashemi :


--
nosy: +mahmoud

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Alex Warhawk

Alex Warhawk added the comment:

I have re-targeted the patch for 3.6. It is not a 1 to 1 port of the prior one, 
but quite similar.

--
Added file: 
http://bugs.python.org/file40716/implement_ssl_session_reuse_3.6.patch

___
Python tracker 

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



Access a class in another python script

2015-10-08 Thread DBS
Hello,

I'm using Python 3.5 and have two python scripts where one needs access to a 
class in the other script for authentication purposes.

The scripts runs through GitHub to poll for all pull requests and pull requests 
that meet a certain condition.

The call from the second script to the class and variables in the first script 
are working, but I'm getting prompted for credentials several times.

I wrapped the credentials in a class and created an object in the second script 
to access the class so that I would not be prompted for credentials in the 
second script.  I've include both scripts below.  

I'm still new to python, but I think it's how I'm calling the class or the 
import in the second script???

Thanks in advance for your time.

main_en_pr script:

#! /usr/bin/python
import os
import github3
from github3 import login, GitHub, authorize
from getpass import getuser, getpass
import requests
import csv
import configparser
import sys
import datetime
import codecs

sys.__stdout__ = codecs.getwriter('utf8')(sys.stdout)



# Class to authenticate to GitHub
class GitAuth:
gh = None
def authentication(self):

try:
user = input('GitHub username: ')
except KeyboardInterrupt:
user = getuser()

password = getpass('GitHub token for {0}: '.format(user))


self.gh = login(user, password)
return user

# Assign the class to an object
myobjectx = GitAuth()

# Assign the variable user to the function inside the class
user = myobjectx.authentication()

# Read the contents of the config file to pull in the repo name
config = configparser.ConfigParser()
config.read('repo.ini')
repo = config.get('repos', 'repo1')


result = myobjectx.gh.repository(user, repo).pull_requests('open')

# Define function to list all pull requests
def list_all_prs():
# open csv file and create header rows

with open('c:\\pull.csv', 'w+', newline='') as f:
csv_writer = csv.writer(f)
csv_writer.writerow(['Id', 'Login', 'Title', 'Commits', 'Changed 
Files'])

# iterate through repo for pull requests based on criteria and output to 
csv file
for pr in result:
data = pr.as_dict()
changes = (myobjectx.gh.repository(user, 
repo).pull_request(data['number'])).as_dict()
# keep print to console statement for testing purposes
# print(changes['id'], changes['user']['login'], changes['title'], 
changes['commits'], changes['changed_files'])


with open('c:\\pull.csv','a+',newline='') as f:
csv_writer = csv.writer(f)

csv_writer.writerow([changes['id'], changes['user']['login'], 
changes['title'], changes['commits'],
 changes['changed_files']])


list_all_prs()

# Call the validation script
exec(open("one_commit_one_file_change.py").read())

+++

one_commit_one_file_change script:

#! /usr/bin/python
import os
import github3
from github3 import login, GitHub, authorize
from getpass import getuser, getpass
import requests
import csv
import configparser
import sys
import main_en_pr
from main_en_pr import GitAuth
import codecs
sys.__stdout__ = codecs.getwriter('utf8')(sys.stdout)

myobjecty = GitAuth()

user = myobjecty.authentication()



def one_commit_one_file_change_pr():

#open csv file and create header rows
with open('c:\\commit_filechange.csv', 'w+') as f:
csv_writer = csv.writer(f)
csv_writer.writerow(['Login', 'Title', 'Commits', 'Changed 
Files','Deletions', 'Additions'])

#iterate through repo for pull requests based on criteria and output to csv file
for pr in main_en_pr.result:
data = pr.as_dict()
changes = (myobjecty.gh.repository(user, 
main_en_pr.repo).pull_request(data['number'])).as_dict()   

if changes['commits'] == 1 and changes['changed_files'] == 1:
#keep print to console statement for testing purposes
#print changes['user']['login']


with open('c:\\commit_filechange.csv', 'a+') as f:
csv_writer = csv.writer(f)

csv_writer.writerow([changes['user']['login'], 
changes['title'], changes['commits'], changes['changed_files']])

one_commit_one_file_change_pr()
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25339] sys.stdout.errors is set to "surrogateescape"

2015-10-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The error handler of sys.stdout and sys.stdin is set to "surrogateescape" even 
for non-ASCII encoding.

$ LANG= PYTHONIOENCODING=UTF-8 ./python -c 'import sys; 
print(sys.stdout.encoding, sys.stdout.errors)'
UTF-8 surrogateescape

--
components: IO
messages: 252515
nosy: haypo, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: sys.stdout.errors is set to "surrogateescape"
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



Re: Is there a Windows Python SIG?

2015-10-08 Thread Laura Creighton
In a message of Thu, 08 Oct 2015 00:15:26 -0500, Anthony Papillion writes:
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA512
>
>Over the next few months,  I'll be working on a project using Python on 
>Microsoft Windows.  While I'm doing this project, I'd also like to contribute 
>in any way I can to making Python in Windows better.
>
>Does anyone know if there is a Windows SIG? I went to the Python website where 
>I thought I'd seen one but it doesn't seem to be there now. Any thoughts?
>
>Anthony

https://mail.python.org/mailman/listinfo/python-win32

Speaking as (a) webmaster, a page that tells windows users how to 
have more than one Python version on your machine; how to use
virtualenv after you have multiple Python versions, and how
to find out which versions of Python you already have would have
significant value.

Laura



-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25340] libraries variable in setup.py ignore for multiprocessing module

2015-10-08 Thread Guillaume DAVY

New submission from Guillaume DAVY:

Around line 1455 in setup.py the "libraries" variable is assigned but
seems to be ignored when the Extension object for multiprocessing
is created. This leads to a linking error on my system : "undefined symbol: 
clock_gettime"

--
components: Installation
messages: 252517
nosy: davyg
priority: normal
severity: normal
status: open
title: libraries variable in setup.py ignore for multiprocessing module
type: compile error
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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> This means that when you perform a malloc, the pointer bounds will be set 
> inside the malloc call, and then passed on to your variable.

For this to be useful in Python, you would have to annotate Python's small 
object allocator to designate it as a malloc()-like function, no?

--

___
Python tracker 

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



libevent-python

2015-10-08 Thread chenc...@inhand.com.cn

hi:
   I use libevent-python package currently. I read the file 
eventmodule.c, but I can not understand the function:


  static EventObject *EventBase_CreateEvent(EventBaseObject *self, 
PyObject *args, PyObject *kwargs)

 {
   EventObject *newEvent = NULL;

   newEvent = (EventObject *)Event_New(_Type,NULL,NULL);

   if (Event_Init(newEvent, args, kwargs) < 0){
 return NULL;
   }

   if (PyObject_CallMethod((PyObject *)newEvent, "setEventBase", "O", 
self) == NULL){

 return NULL;
   }

   return newEvent;
 }

 So, I can not know the param "EventBaseObject *self" is what?  And I 
read the examples/echo_server.py file, I read the follow source:

   class BaseConnection(object):
bufferSize = 2**16
def __init__(self, sock, addr, server):
self.sock = sock
self.addr = addr
self.server = server
self.sock.setblocking(False)
self.buf = []
self.readEvent = libevent.createEvent(
self.sock,libevent.EV_READ|libevent.EV_PERSIST, self._doRead)
self.writeEvent = libevent.createEvent(
self.sock,libevent.EV_WRITE, self._doWrite)
self.startReading()
 So, I can not see pass the self parameter. Is anybody know this?

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

I've finally committed your patch to default. Thank you for not giving up, 
Nikolay :)

Note that currently the link in the example section doesn't work. I will open a 
new issue for that.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dbed7cacfb7e by Berker Peksag in branch 'default':
Issue #16099: RobotFileParser now supports Crawl-delay and Request-rate
https://hg.python.org/cpython/rev/dbed7cacfb7e

--
nosy: +python-dev

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

FYI In the discussion of the PEP 445 "Add new APIs to customize Python
memory allocators" it was proposed to add runtime option to choose the
memory allocator. At least for debug purpose, it would help to be able
to use malloc() for *all* Python memory allocations. Would it help to
find more bugs with MPX?

It's not possible to disable our fast allocator for small objects,
disabling it has a high cost on performances (Python would be much
slower).

--

___
Python tracker 

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



[issue25341] File mode wb+ appears as rb+

2015-10-08 Thread Mark Williams

New submission from Mark Williams:

There is at least one mode in which a file can be opened that cannot be 
represented in its mode attribute: wb+.  This mode instead appears as 'rb+' in 
the mode attribute:

Python 3.5.0 (default, Oct  3 2015, 10:40:38)
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] 
on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> if os.path.exists('some_file'): os.unlink('some_file')
...
>>> with open('some_file', 'r+b') as f: print(f.mode)
...
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory: 'some_file'
>>> with open('some_file', 'w+b') as f: print(f.mode)
...
rb+
>>> with open('some_file', 'r+b') as f: print(f.mode)
rb+


This means code that interacts with file objects cannot trust the mode of 
binary files.  For example, you can't use tempfile.TemporaryFile (the mode 
argument of which defaults to 'wb+') and GzipFile:


>>> import gzip
>>> from tempfile import TemporaryFile
>>> with TemporaryFile() as f:
... gzip.GzipFile(fileobj=f).write(b'test')
...
Traceback (most recent call last):
  File "", line 2, in 
  File "/usr/local/lib/python3.5/gzip.py", line 249, in write
raise OSError(errno.EBADF, "write() on read-only GzipFile object")
OSError: [Errno 9] write() on read-only GzipFile object


This occurs because without a mode argument passed to its initializer, GzipFile 
checks that the fp object's mode starts with 'w', 'a', or 'x'.

For the sake of completeness/searchability: w+ and r+ are different modes, so 
rb+ and wb+ must be different modes.  Per 
https://docs.python.org/3/library/functions.html#open :

"""
For binary read-write access, the mode 'w+b' opens and truncates the file to 0 
bytes. 'r+b' opens the file without truncation.
"""


I haven't been able to test this on Windows, but I expect precisely the same 
behavior given my understanding of the relevant source.

_io_FileIO___init___impl in _io/fileio.c does the right thing and includes 
O_CREAT and O_TRUNC in the open(2) flags upon seeing 'w' in the mode:

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l324

this ensures correct interaction with the file system.  But it also sets 
self->readable and self->writable upon seeing '+' in the mode:

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l341

The open flags are not retained.  Consequently, when the mode attribute is 
accessed and the get_mode calls the mode_string function, the instance has 
insufficient information to differentiate between 'rb+' and 'wb+':

https://hg.python.org/cpython/file/3.5/Modules/_io/fileio.c#l1043

If the FileIO instance did retain the 'flags' variable that's declared and set 
in its initializer, then mode_string could use it to determine the difference 
between wb+ and rb+.

I would be happy to write a patch for this.

--
components: IO, Interpreter Core, Library (Lib)
messages: 252518
nosy: Mark.Williams
priority: normal
severity: normal
status: open
title: File mode wb+ appears as rb+
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-08 Thread Eric V. Smith

Eric V. Smith added the comment:

Yes, both 'fr' and 'rf' need to be supported (and all upper/lower variants). 
And in the future, maybe 'fb' (and 'rfb', 'bfr', ...).

Unfortunately, the regex doesn't scale well for all of the combinations.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

No modifications need to be made to the small object allocator. The malloc 
situation was just an example, it does not mean that setting pointer bounds 
occurs only in a malloc call. It also occurs when you declare a static array or 
when you initialize a new pointer:

int *x = (int*)malloc(10 * sizeof(int));
int *y = x; // the bounds for x will be passed on to y

When using "fcheck-pointer-bounds -mmpx" _all_ memory accesses will be 
instrumented.

--

___
Python tracker 

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



Re: python3.5 + reportlab + windows again

2015-10-08 Thread Robin Becker

On 06/10/2015 16:31, Robin Becker wrote:
.


well it seems someone can build these extensions properly. I used Christoph
Gohlke's reportlab build and although there are 3 failures in the latest tests I
don't see any crashes etc etc and all the failures are explainable. Last thing I
saw from him in respect of pyRXPU was to use extra_compile_args=['/Od']. I will
try that in the reportlab extension builds and see if the problems go away.


I figured out the problem I was having with windows vs python3.5. It seems that 
something has changed in the way extensions are loaded when using imp to 
override the normal import mechanism.


The following code works OK for python 2.7, 3.3 & 3.4, but fails fairly 
catastrophically when used in a complex way (ie running reportlab's tests). 
Simple usage appears to work ie when I run one test.



My extension loading code looks like this

##
def __hack__():
import sys, os, importlib, imp
if sys.modules['reportlab'].__path__[0].lower()!=r'c:\code\reportlab': 
return
from distutils.util import get_platform

archname = get_platform()

_p0=r'c:\repos\reportlab\build\lib.%s-%d.%d' % 
(archname,sys.version_info[0],sys.version_info[1])
_p1=r'c:\repos\pyRXP\build\lib.%s-%d.%d' % 
(archname,sys.version_info[0],sys.version_info[1])

_overrides={
'reportlab.lib._rl_accel':os.path.join(_p0,r'reportlab\lib'),

'reportlab.graphics._renderPM':os.path.join(_p0,r'reportlab\graphics'),
'pyRXPU':_p1,
}
def find_override(name):
if name in _overrides and os.path.isdir(_overrides[name]):
fpd = imp.find_module(name.split('.')[-1],[_overrides[name]])
try:
try:
return imp.load_module(name,fpd[0],fpd[1],fpd[2])
except:
pass
finally:
if fpd[0]: fpd[0].close()

class RLImporter(object):
def __init__(self):
self.module = None

def find_module(self, name, path=None):
m = find_override(name)
if m:
m.__loader__ = self
self.module = m
return self

def load_module(self, name):
if not self.module:
raise ImportError("Unable to load module %s" % name)
sys.modules[name] = m = self.module
self.module = None
return m
sys.meta_path.insert(0, RLImporter())
__hack__()
del __hack__
##

My guess is that it's not cool any more to use imp.load_module repeatedly or 
that the hack of passing the found module about using a temporary attribute is 
not a good idea.



The intent of the above code is to allow me to build extensions for multiple 
pythons in a single area under c:\repos\reportlab\build and allow loading of 
those with different python versions. I don't want to pollute my repository with 
different extensions so prefer to keep them in the build area (and they change 
very slowly compared to the python code).


Is there some simple sample code that can be used as a model for this. I've 
tried looking at the importlib docs and my brain is bursting. I also looked at
http://chimera.labs.oreilly.com/books/123000393/ch10.html, but that seems 
all about normal python models/packages.


I think importlib has split the loading of extensions into a different method, 
and there seem to be assertions about re-using an existing loader.

--
Robin Becker

--
https://mail.python.org/mailman/listinfo/python-list


[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2015-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What could you say about the recent patch Victor?

--

___
Python tracker 

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



Re: Access a class in another python script

2015-10-08 Thread Terry Reedy

On 10/8/2015 2:24 AM, DBS wrote:

I'm using Python 3.5 and have two python scripts where one needs
access to a class in the other script for authentication purposes.


Any python .py file can be either run as a main program or module (ie, 
script) or imported as a module by another module.  If a file is meant 
for both, it should end with


if __name__ == '__main__:


The latter is ofter to call a function main() defined previously.  If 
you have a problem with this, write a **minimal** example with at most 
10 lines per file and post.



--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The small object allocator uses large mmap-allocated arenas of 256 KB (IIRC) 
and carves small objects out of it.  So unless the pointer returned by 
PyObject_Malloc() has its bounds set manually using one of the intrinsic 
functions (*), MPX would believe the bounds of small objects are the bounds of 
the 256 KB arenas containing them, right?

(*) I'm assuming __bnd_set_ptr_bounds()

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

> Is there a runtime cost or does the hardware run the bounds checks in 
> parallel with memory accesses?   Are the bounds set when malloc() is called 
> or elsewhere?  I read the provided links but can't say I fully understand how 
> it works exactly (which memory blocks are protected, where the bounds get 
> set, when the registers are loaded, etc).

There is a runtime cost associated with MPX instrumentation, which is kept to a 
minimum due to the use of hardware instructions and registers. When 
"fcheck-pointer-bounds -mmpx" compilation flags are set, instrumentation is 
enabled for _all_ memory acceses in the code. This means that when you perform 
a malloc, the pointer bounds will be set inside the malloc call, and then 
passed on to your variable. Alternatively, you can manually instrument only 
regions of interest in your code using GCC functions described here [1].

> Also, I'm curious about whether we have direct controls over the bounds.  For 
> example, in a listobject.c or _collections.c object could the bounds be 
> tightened to only include the active data and excluded the unused part of the 
> overallocation?

Please see __bnd_set_ptr_bounds here [1] for bound manipulation. In order to 
have a better understanding of what happens when using MPX, I suggest writing a 
simple C program and look at the assembly code generated (MPX instructions and 
registers begin with bnd). You can use the following steps:

gcc -g -c test.c -O2 -fcheck-pointer-bounds -mmpx
objdump -d -M intel -S test.o


[1] 
https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler#Compiler_intrinsics_and_attributes

--

___
Python tracker 

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



Re: change data in large excel file(more than 240 000 rows on sheet)

2015-10-08 Thread Laura Creighton
You need to use the optimised reader.
https://openpyxl.readthedocs.org/en/latest/optimized.html

Laura

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25342] json

2015-10-08 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

What the details of this issue?
On 8 Oct 2015, at 13:57, Remi Pointel wrote:

> Changes by Remi Pointel :
>
>
> --
> nosy: rpointel
> priority: normal
> severity: normal
> status: open
> title: json
>
> ___
> Python tracker 
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-bugs-list/stephane%40wirtel.be

--
nosy: +matrixise

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

It's good when I entered "ulimit -s 8192". Sorry for the noise...

--

___
Python tracker 

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



[issue21475] Support the Sitemap extension in robotparser

2015-10-08 Thread Berker Peksag

Berker Peksag added the comment:

The Crawl-delay part(issue 16099) is now committed.

--
stage:  -> needs patch
title: Support the Sitemap and Crawl-delay extensions in robotparser -> Support 
the Sitemap extension in robotparser
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your patch. There might be a simpler way. By default a SSLContext 
only caches server sessions. You can enable client session caching with:

  SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_CLIENT)

This may be sufficient for FTP over TLS since both sockets are created from the 
same context.

 
The new patch has a flaw. With the new SSLSession object a user could attempt 
to reuse a SSLSession with a different SSLContext. That's going to break 
OpenSSL.

>From SSL_set_session(3)

NOTES
   SSL_SESSION objects keep internal link information about the session 
cache list, when being inserted into one SSL_CTX object's session cache.  One 
SSL_SESSION object, regardless of its reference count, must therefore only be 
used with one SSL_CTX object (and the SSL objects created from this SSL_CTX 
object).

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

Try setting the stack size to 8MB (the default on Linux) in login.conf.

--
nosy: +skrah

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-08 Thread Florin Papa

Florin Papa added the comment:

Hi Antoine,

I understand the problem with the small object allocator now. I will have a 
closer look at it and come back with a solution. Thank you for pointing this 
out.

--

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-08 Thread CM

New submission from CM:

Process: Python [556]
Path:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:  Python
Version: 2.7.10 (2.7.10)
Code Type:   X86-64 (Native)
Parent Process:  bash [510]
Responsible: X11.bin [452]
User ID: 502

Date/Time:   2015-10-07 17:01:32.979 -0700
OS Version:  Mac OS X 10.9.5 (13F1096)
Report Version:  11
Anonymous UUID:  34110EFA-E539-3790-15F7-F5AE427C092E

Sleep/Wake UUID: 1444CE38-3698-4FDA-95B9-196B28CB372E

Crashed Thread:  2

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x

VM Regions Near 0:
--> 
__TEXT 00010802b000-00010802d000 [8K] r-x/rwx 
SM=COW  
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff8d24f716 __psynch_cvwait + 10
1   libsystem_pthread.dylib 0x7fff9185dc3b _pthread_cond_wait + 
727
2   org.python.python   0x000108118f51 
PyThread_acquire_lock + 145
3   org.python.python   0x0001080dc74e PyEval_RestoreThread 
+ 62
4   org.python.python   0x000108104f6d PyGILState_Ensure + 
93
5   _gtk.so 0x000108ec4b36 
pygtk_main_watch_check + 50
6   libglib-2.0.0.dylib 0x000108c9efc0 g_main_context_check 
+ 362
7   libglib-2.0.0.dylib 0x000108c9f4ba 
g_main_context_iterate + 388
8   libglib-2.0.0.dylib 0x000108c9f714 g_main_loop_run + 195
9   libgtk-x11-2.0.0.dylib  0x00010918b5db gtk_main + 180
10  _gtk.so 0x000108e7d0ec _wrap_gtk_main + 241
11  org.python.python   0x0001080e1003 PyEval_EvalFrameEx + 
15539
12  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
13  org.python.python   0x0001080e4c89 fast_function + 297
14  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
15  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
16  org.python.python   0x0001080e4c89 fast_function + 297
17  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
18  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
19  org.python.python   0x0001080e4c89 fast_function + 297
20  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
21  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
22  org.python.python   0x0001080dca16 PyEval_EvalCode + 54
23  org.python.python   0x000108106774 PyRun_FileExFlags + 
164
24  org.python.python   0x0001081062f1 
PyRun_SimpleFileExFlags + 769
25  org.python.python   0x00010811c05e Py_Main + 3070
26  libdyld.dylib   0x7fff8f24c5fd start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib  0x7fff8d250662 kevent64 + 10
1   libdispatch.dylib   0x7fff90e99421 _dispatch_mgr_invoke 
+ 239
2   libdispatch.dylib   0x7fff90e99136 _dispatch_mgr_thread 
+ 52

Thread 2 Crashed:
0   org.python.python   0x0001080853af PyObject_Malloc + 79
1   org.python.python   0x00010808 _PyObject_New + 18
2   org.python.python   0x00010811e082 
thread_PyThread_allocate_lock + 18
3   org.python.python   0x0001080e1003 PyEval_EvalFrameEx + 
15539
4   org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
5   org.python.python   0x0001080e4c89 fast_function + 297
6   org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
7   org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
8   org.python.python   0x0001080e4c89 fast_function + 297
9   org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
10  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
11  org.python.python   0x0001080e4c89 fast_function + 297
12  org.python.python   0x0001080e04f5 PyEval_EvalFrameEx + 
12709
13  org.python.python   0x0001080dd0dd PyEval_EvalCodeEx + 
1725
14  org.python.python   0x000108068b4c function_call + 364
15  org.python.python   0x000108042fa3 PyObject_Call + 99
16  org.python.python   0x0001080e081d PyEval_EvalFrameEx + 
13517
17  org.python.python   

Re: change data in large excel file(more than 240 000 rows on sheet)

2015-10-08 Thread gall . pavgal . gall
thanks Guys!
xlrd it's cool, but i need change existing file, which contains some sheets 
with large data...)
So, if i use xlwt(i.e. create new excel document), i will lose data from other 
sheets.
I tried use openpyxl, but got error :

Traceback (most recent call last):
  File "D:/WebPython/oneMoreTest.py", line 15, in 
wb = load_workbook(filename='D:\WebPython\COX.DSG.Offering Product Catalog 
VANE.xlsx')
  File "C:\Python27\lib\site-packages\openpyxl\reader\excel.py", line 149, in 
load_workbook
_load_workbook(wb, archive, filename, read_only, keep_vba)
  File "C:\Python27\lib\site-packages\openpyxl\reader\excel.py", line 236, in 
_load_workbook
color_index=wb._colors)
  File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 327, 
in read_worksheet
fast_parse(ws, xml_source, shared_strings, style_table, color_index)
  File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 315, 
in fast_parse
parser.parse()
  File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 88, 
in parse
stream = _get_xml_iter(self.source)
  File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 36, 
in _get_xml_iter
xml_source = xml_source.encode("utf-8")
MemoryError
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25342] json

2015-10-08 Thread Remi Pointel

Changes by Remi Pointel :


--
nosy: rpointel
priority: normal
severity: normal
status: open
title: json

___
Python tracker 

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



Re: reg multiple login python

2015-10-08 Thread harirammanohar159
On Thursday, 1 October 2015 12:35:01 UTC+5:30, hariramm...@gmail.com  wrote:
> Hi All,
> 
> Is there anyway i can login to remote servers at once and do the activity, i 
> can do one by one using for loop..
> 
> Thanks in advance.

if its a command i can launch a detached process for each request, its a 
session..
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Hiding code from intruders, a different slant on an old question

2015-10-08 Thread cl
Dennis Lee Bieber  wrote:
> On Wed, 7 Oct 2015 13:05:07 + (UTC), alister
>  declaimed the following:
> 
> 
> >With a simple Cesar the method is "shift the alphabet by 'X' characters 
> >and X is the key
> >
> >if the key is unknown then the attacker still has to brute force the 
> >method (admittedly with only 25 options this is not difficult)
> 
> But who'd consider that with just one-case and alphabet only...
> 
> At the least include upper, lower, numbers, and basic punctuation --
> that will add a few more cycles of computation time to break 
> 
> 
> But the other point, yes... The most used encryption systems have
> publicly known/reviewed algorithms and rely on the secrecy of the key(s).

Which makes a nonsense of using a super-secure algorithm in many cases.

If you are doing in-place symmetric file encryption then it's the
security of the key hashing algorithm that matters much more than the
actual encryption used on the file.

Using ccrypt, enc, etc. for file encryption means the password that
encodes the encryption key is saved with the file so brute-force
attacks to get the key are quite straightforward.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25342] json

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

Sorry I clicked on "create" before adding info in comment.

When I run the test_json suite on OpenBSD, I have a segfault:

$ egdb ./python
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-openbsd5.8".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./python...done.
(gdb) set env PYTHONPATH ./Lib
(gdb) set env LD_LIBRARY_PATH .
(gdb) set args ./Lib/test/test_json/
(gdb) r
Starting program: /home/remi/dev/cpython/python ./Lib/test/test_json/
.s..
Program received signal SIGSEGV, Segmentation fault.
0x1dd119cf9e0d in PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:798
(gdb) bt
#0  0x1dd119cf9e0d in PyEval_EvalFrameEx (f=, throwflag=)
at Python/ceval.c:798
#1  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11c90, arg=None, exc=0) at 
Objects/genobject.c:125
#2  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11c90, arg=None) at 
Objects/genobject.c:223
#3  0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd32e645c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#4  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11c08, arg=None, exc=0) at 
Objects/genobject.c:125
#5  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11c08, arg=None) at 
Objects/genobject.c:223
#6  0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 427, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#7  0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11b80, arg=None, exc=0) at 
Objects/genobject.c:125
#8  0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11b80, arg=None) at 
Objects/genobject.c:223
#9  0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 437, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#10 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11af8, arg=None, exc=0) at 
Objects/genobject.c:125
#11 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11af8, arg=None) at 
Objects/genobject.c:223
#12 0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd3b9e32c38, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#13 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11a70, arg=None, exc=0) at 
Objects/genobject.c:125
#14 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11a70, arg=None) at 
Objects/genobject.c:223
#15 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd32e645838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 427, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#16 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc119e8, arg=None, exc=0) at 
Objects/genobject.c:125
#17 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc119e8, arg=None) at 
Objects/genobject.c:223
#18 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd39a980438, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 437, in _iterencode 
(o=[], _current_indent_level=0), 
throwflag=0) at Python/ceval.c:2038
#19 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc11960, arg=None, exc=0) at 
Objects/genobject.c:125
#20 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc11960, arg=None) at 
Objects/genobject.c:223
#21 0x1dd119d0267b in PyEval_EvalFrameEx (
f=Frame 0x1dd3b9e32838, for file 
/home/remi/dev/cpython/Lib/json/encoder.py, line 324, in _iterencode_list 
(lst=[], _current_indent_level=0, buf='[', 
newline_indent=None, separator=', ', first=False, value=, chunks=), throwflag=0) at 
Python/ceval.c:2038
#22 0x1dd119dedbe3 in gen_send_ex (gen=0x1dd35dc118d8, arg=None, exc=0) at 
Objects/genobject.c:125
#23 0x1dd119dee6af in _PyGen_Send (gen=0x1dd35dc118d8, arg=None) at 
Objects/genobject.c:223
#24 0x1dd119d0267b in PyEval_EvalFrameEx (f=Frame 0x1dd3b9e32038, for file 

[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Changes by Remi Pointel :


--
title: json -> test_json segfault on OpenBSD

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Remi Pointel

Remi Pointel added the comment:

It fails on test_endless_recursion:

$ LD_LIBRARY_PATH=. PYTHONPATH=./Lib/ ./python ./Lib/test/test_json -v

test_endless_recursion (test.test_json.test_recursion.TestPyRecursion) ... zsh: 
segmentation fault (core dumped)

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

It's not noise, we also have problems on Windows with test_json.

In theory we should set Py_DEFAULT_RECURSION_LIMIT in Python/ceval.c
to appropriate values for the default OS stack sizes in order to get
a proper RuntimeError instead of a segfault.

For OpenBSD it's clearly too high for the default.  Could you try
to find a safe value (perhaps 500 instead of 1000) for OpenBSD's
default?

--

___
Python tracker 

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



ANN: Eliot 0.9, the logging system with causality - now with journald support

2015-10-08 Thread Itamar Turner-Trauring
 
Eliot 0.9 is out, with a new utility for pretty-printing log messages
and native journald support [1]. You can now route Eliot logs to
journald and when an error occurs easily find all logged actions that
led up to that particular error, as opposed to most logging systems
where this would involve reading all the logs and figuring out which
ones apply and which to ignore. 

Most logging systems can tell you what happened; Eliot tells you _why_
it happened:

$ python linkcheck.py | eliot-tree
4c42a789-76f5-4f0b-b154-3dd0e3041445
+-- check_links@1/started
`-- urls: [u'http://google.com', u'http://nosuchurl']
+-- download@2,1/started
`-- url: http://google.com
+-- download@2,2/succeeded
+-- download@3,1/started
`-- url: http://nosuchurl
+-- download@3,2/failed
|-- exception: requests.exceptions.ConnectionError
|-- reason: ('Conn aborted', gaierror(-2, 'Name unknown'))
+-- check_links@4/failed
|-- exception: exceptions.ValueError
|-- reason: ('Conn aborted.', gaierror(-2, 'Name unknown'))

And here's the code that generated these logs (eliot-tree [2] was used
to render the output):

import sys
from eliot import start_action, to_file
import requests
to_file(sys.stdout)

def check_links(urls):
with start_action(action_type="check_links", urls=urls):
for url in urls:
try:
with start_action(action_type="download", url=url):
response = requests.get(url)
response.raise_for_status()
except Exception as e:
raise ValueError(str(e))

check_links(["http://google.com;], ["http://nosuchurl;])

Interested? Read more at https://eliot.readthedocs.org/.

Eliot is released under the Apache License 2 by ClusterHQ [3], the
Container Data People. We're hiring! [4]
 

Links:
--
[1] http://eliot.readthedocs.org/en/0.9.0/journald.html
[2] https://warehouse.python.org/project/eliot-tree/
[3] https://clusterhq.com
[4] https://clusterhq.com/careers/
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-08 Thread Pathangi Jatinshravan

Pathangi Jatinshravan added the comment:

Hi, I've made the change to use str.find() and removed the while loop, can you 
take a look at it?

--
Added file: http://bugs.python.org/file40717/patch.diff

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

Or did you want to compute it at runtime?  Actually, why not?

--

___
Python tracker 

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



When tornado 4.3 will be available at pypi?

2015-10-08 Thread Nagy László Zsolt
I would like to use async/await. The tornado latest documentation says
it is possible with tornado 4.3 and later:

http://tornadokevinlee.readthedocs.org/en/latest/guide/coroutines.html

However, it is not available yet.

c:\Python\Projects>pip3 install tornado -U
Requirement already up-to-date: tornado in c:\python35\lib\site-packages

c:\Python\Projects>py -3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tornado
>>> print(tornado.version)
4.2.1


Thanks,

   Laszlo

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installation problem

2015-10-08 Thread Tim Golden
On 08/10/2015 14:25, MICHAEL wrote:
> Hello,
> 
> Please forgive a new user's ignorance.
> 
> I am trying to install Python 3.5.0 on my laptop (Windows 10). The
> default installation directory is shown as c:\Users\(my user
> name)\AppData\Local\Programs\Python\Python35-32. However, if I select
> Custom Install then the default installation directory is c:\Program
> Files(x86)\Python3.5.
> 
> In either case, after the installation is complete I cannot find a
> Python3.5 directory under Program Files(x86) or the Users\... directory.

Mike,

What happens if you do [Windows] + R (ie Start > Run), enter "python"
and click OK?

If it comes up with a Python window, what happens if you type this:

import sys
print(sys.executable)

You can do all this in one step if you're feeling adventurous:

Start > Run > python -i -c "import sys; print(sys.executable)"

TJG
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Would it be possible to compute the recursion limit depending on the current 
maximum C stack size? At least estimate it? I guess the sys.getdefaultlimit() 
is 1000 is an arbitrary value. I also know that the effective limit depends on 
the memory allocated on the stack by C functions. Calling a Python function and 
a function implemented in C is different :-/

--
nosy: +haypo

___
Python tracker 

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



ANN: Wing IDE 5.1.8 released

2015-10-08 Thread Wingware

Hi,

Wingware has released version 5.1.8 of Wing IDE, our cross-platform 
integrated development environment for the Python programming language.


Wing IDE features a professional code editor with vi, emacs, visual 
studio, and other key bindings, auto-completion, call tips, 
context-sensitive auto-editing, goto-definition, find uses, refactoring, 
a powerful debugger, version control, unit testing, search, project 
management, and many other features.


This release includes the following improvements:

Support for Python 3.5 final release
New option to specify how to run test files in package directories
Improved performance of Open from Project for large projects
Several improvements in the pytest integration
Fix displaying multiple plots with the Mac OS X backend for matplotlib
Fix auto-spacing around - and + in exponents
Don't jump back to last stop position when restarting debugging
Don't expand folds on edited lines unless the fold point is removed
About 30 other improvements

For details see http://wingware.com/news/2015-10-05 and 
http://wingware.com/pub/wingide/5.1.8/CHANGELOG.txt


What's New in Wing 5.1:

Wing IDE 5.1 adds multi-process and child process debugging, syntax 
highlighting in the shells, support for pytest, Find Symbol in Project, 
persistent time-stamped unit test results, auto-conversion of indents on 
paste, an XCode keyboard personality, support for Flask, Django 1.7 and 
1.8, Python 3.5 and recent Google App Engine versions, improved 
auto-completion for PyQt, recursive snippet invocation, and many other 
minor features and improvements.


Free trial: http://wingware.com/wingide/trial
Downloads: http://wingware.com/downloads
Feature list: http://wingware.com/wingide/features
Sales: http://wingware.com/store/purchase
Upgrades: https://wingware.com/store/upgrade

Questions?  Don't hesitate to email us at supp...@wingware.com.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com


--
https://mail.python.org/mailman/listinfo/python-list


Re: Planet Scipy blog

2015-10-08 Thread Mark Lawrence

On 08/10/2015 14:39, beliavsky--- via Python-list wrote:

There used to be a blog about SciPy at https://planet.scipy.org/ , discussing the 
applications of Python to scientific computing. Now there is a static page about 
"MPI for Python". What happened?



Presumably http://www.scipy.org/

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: Planet Scipy blog

2015-10-08 Thread Laura Creighton
In a message of Thu, 08 Oct 2015 15:10:21 +0100, Mark Lawrence writes:
>On 08/10/2015 14:39, beliavsky--- via Python-list wrote:
>> There used to be a blog about SciPy at https://planet.scipy.org/ , 
>> discussing the applications of Python to scientific computing. Now there is 
>> a static page about "MPI for Python". What happened?
>>
>
>Presumably http://www.scipy.org/
>
>-- 
>My fellow Pythonistas, ask not what our language can do for you, ask
>what you can do for our language.
>
>Mark Lawrence

No, all the blog links there go to the MPI for Python link, too.

Laura

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25338] urllib bypasses all hosts if proxyoverride includes an empty element

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

How does IE itself behave in this case?

Also, we should have a test to go along with the fix.

--
nosy: +r.david.murray
stage:  -> test needed
title: urllib fail to check host whether it should be bypassed -> urllib 
bypasses all hosts if proxyoverride includes an empty element
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



First release of pytest-vw!

2015-10-08 Thread Florian Bruhin
Hey,

I'm happy to announce the first release of pytest-vw, a pytest plugin
which makes failing test cases succeed in continuous integration
tools.

See https://github.com/The-Compiler/pytest-vw for more information.

Of course, any similarities with a current event concerning (but not
limited to) a multinational automobile manufacturer are purely
coincidental.

(In all seriousness: This was mainly to try the excellent
cookiecutter[1] and cookiecutter-pytest-plugin[2] projects - it's also
inspired by (read: a blatant ripoff of) PHPunit VW)

[1] https://github.com/audreyr/cookiecutter
[2] https://github.com/pytest-dev/cookiecutter-pytest-plugin
[3] https://github.com/hmlb/phpunit-vw

Florian

-- 
http://www.the-compiler.org | m...@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
 I love long mails! | http://email.is-not-s.ms/


signature.asc
Description: Digital signature
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-08 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread paul.hermeneutic
On Oct 8, 2015 7:31 AM, "MICHAEL"  wrote:
>
> Hello,
>
> Please forgive a new user's ignorance.
>
> I am trying to install Python 3.5.0 on my laptop (Windows 10). The
default installation directory is shown as c:\Users\(my user
name)\AppData\Local\Programs\Python\Python35-32. However, if I select
Custom Install then the default installation directory is c:\Program
Files(x86)\Python3.5.
>

I would like to see Python in use as much as anyone. However, I am not sure
we are doing users or ourselves much of a favor encouraging pieces of the
language be distributed in so many kits.

I do not know, but it does not seem that Java has much of this problem.
Everyone seems to know that Java should be installed on the system. There
is a clear way to have multiple versions of Java on one system.

There would be benefits in having a well structured way to do it. I am not
suggesting that other ways should be prohibited.

This approach would fit well with the Python maxim to pick one really good
way to do it.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Stefan Krah

Stefan Krah added the comment:

The ratio (1000/8MB) seems to be stable on Linux. Perhaps we could
write a getrlimit program for ./configure to get the stack size and
adjust the recursion limit to keep the ratio the same.

It's just an estimate of course.

--

___
Python tracker 

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



Installation problem

2015-10-08 Thread MICHAEL
Hello, 

Please forgive a new user's ignorance. 

I am trying to install Python 3.5.0 on my laptop (Windows 10). The default 
installation directory is shown as c:\Users\(my user 
name)\AppData\Local\Programs\Python\Python35-32. However, if I select Custom 
Install then the default installation directory is c:\Program 
Files(x86)\Python3.5. 

In either case, after the installation is complete I cannot find a Python3.5 
directory under Program Files(x86) or the Users\... directory. The python.exe 
file can be located under c:\OpenOffice. Other python files are found scattered 
all over my hard drive in locations such as c:\ HamRadio\WSJT, or c:\Program 
Files(x86)\Cyberlink, or c:\CHIRP, or a variety of other directories, but never 
in the designated installation directory. 

Scattered files include: 
python.exe (in Open Office) 
python27.dll (in CHIRP) 
pythoncom27.dll (in CHIRP) 
python33.dll (in HamRadio\WSJT) 
python25.dll (in "Koan c:\Program Files(x86)\Cyberlink) 

I assume these various .dll files are used in the various other programs I have 
installed but I cannot understand, at the moment, why the main python program 
does not appear in the designated installation directory. 

Any ideas or suggestion you may have are most welcome and appreciated. 

Thanks very much, 
Mike Wolcott 

-- 
https://mail.python.org/mailman/listinfo/python-list


Planet Scipy blog

2015-10-08 Thread beliavsky--- via Python-list
There used to be a blog about SciPy at https://planet.scipy.org/ , discussing 
the applications of Python to scientific computing. Now there is a static page 
about "MPI for Python". What happened?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-08 Thread Sebastian Rittau

Sebastian Rittau added the comment:

Is there any progress on this? The fix seems trivial.

--

___
Python tracker 

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



[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio

2015-10-08 Thread neic

Changes by neic :


--
nosy: +neic

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek

Changes by Dima Tisnek :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type:  -> enhancement

___
Python tracker 

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



[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Xavier de Gaye

Xavier de Gaye added the comment:

TLPI (The Linux Programming Interface book) says about the pty implementation 
on linux, at section 5 of chapter 64:

If we close all file descriptors referring to the pseudoterminal slave, 
then:
a) A read() from the master device fails with the error EIO. (On some other 
UNIX implementations, a read() returns end-of-file in this case.)

and also adds this (which is slightly off topic here):

b)  A write() to the master device succeeds, unless the input queue of the 
slave device is full, in which case the write() blocks. If the slave device is 
subsequently reopened, these bytes can be read.

UNIX implementations vary widely in their behavior for the last case. On 
some UNIX implementations, write() fails with the error EIO. On other 
implementations, write() succeeds, but the output bytes are discarded (i.e., 
they can’t be read if the slave is reopened). In general, these variations 
don’t present a problem. Normally, the process on the master side detects that 
the slave has been closed because a read() from the master returns end-of-file 
or fails. At this point, the process performs no further writes to the master.

--
nosy: +xdegaye

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek

New submission from Dima Tisnek:

Please document what builtin type operations are actually atomic.
For example, what set() operations are atomic?

(There are some blogs / tutorials online, but information is outdated and not 
authoritative)

--
messages: 252545
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: Document atomic operations on builtin types
versions: Python 3.6

___
Python tracker 

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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread Steve Dower

Steve Dower added the comment:

Shirshendu - any luck with eryksun's suggestions?

--

___
Python tracker 

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



[issue25161] Missing periods at the end of sentences

2015-10-08 Thread TAKASE Arihiro

TAKASE Arihiro added the comment:

Thank you for reviewing.

This is an updated patch for 3.x.

--
Added file: http://bugs.python.org/file40718/periods_v2.patch

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Stefan Krah added the comment:
> Or did you want to compute it at runtime?  Actually, why not?

I'm asking to adjust the limit at _runtime_. getrlimit() is not
something static, it's common to modify them manually for the current
shell process (and child process), or system-wide.

--

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread Laura Creighton
In a message of Thu, 08 Oct 2015 15:49:56 +0100, Tim Golden writes:
>On 08/10/2015 14:25, MICHAEL wrote:
>> Hello,
>> 
>> Please forgive a new user's ignorance.
>> 
>> I am trying to install Python 3.5.0 on my laptop (Windows 10). The
>> default installation directory is shown as c:\Users\(my user
>> name)\AppData\Local\Programs\Python\Python35-32. However, if I select
>> Custom Install then the default installation directory is c:\Program
>> Files(x86)\Python3.5.
>> 
>> In either case, after the installation is complete I cannot find a
>> Python3.5 directory under Program Files(x86) or the Users\... directory.
>
>OP reports off-list that the installation now appears to have been
>successful. (I'm not clear whether as the result of a re-install or
>simply finding the .exe)
>
>TJG

Well, his Python shouldn't have been scattered all over his filesystem
in any case.  Did it all show up in one place like it was supposed to?

Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


Wing IDE 5.1.8 released

2015-10-08 Thread Wingware

Hi,

Wingware has released version 5.1.8 of Wing IDE, our cross-platform 
integrated development environment for the Python programming language.


Wing IDE features a professional code editor with vi, emacs, visual 
studio, and other key bindings, auto-completion, call tips, 
context-sensitive auto-editing, goto-definition, find uses, refactoring, 
a powerful debugger, version control, unit testing, search, project 
management, and many other features.


This release includes the following improvements:

Support for Python 3.5 final release
New option to specify how to run test files in package directories
Improved performance of Open from Project for large projects
Several improvements in the pytest integration
Fix displaying multiple plots with the Mac OS X backend for matplotlib
Fix auto-spacing around - and + in exponents
Don't jump back to last stop position when restarting debugging
Don't expand folds on edited lines unless the fold point is removed
About 30 other improvements

For details see http://wingware.com/news/2015-10-05 and 
http://wingware.com/pub/wingide/5.1.8/CHANGELOG.txt


What's New in Wing 5.1:

Wing IDE 5.1 adds multi-process and child process debugging, syntax 
highlighting in the shells, support for pytest, Find Symbol in Project, 
persistent time-stamped unit test results, auto-conversion of indents on 
paste, an XCode keyboard personality, support for Flask, Django 1.7 and 
1.8, Python 3.5 and recent Google App Engine versions, improved 
auto-completion for PyQt, recursive snippet invocation, and many other 
minor features and improvements.


Free trial: http://wingware.com/wingide/trial
Downloads: http://wingware.com/downloads
Feature list: http://wingware.com/wingide/features
Sales: http://wingware.com/store/purchase
Upgrades: https://wingware.com/store/upgrade

Questions?  Don't hesitate to email us at supp...@wingware.com.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com


--
https://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


Re: Installation problem

2015-10-08 Thread Tim Golden
On 08/10/2015 16:27, Laura Creighton wrote:
> In a message of Thu, 08 Oct 2015 15:49:56 +0100, Tim Golden writes:
>> On 08/10/2015 14:25, MICHAEL wrote:
>>> Hello,
>>>
>>> Please forgive a new user's ignorance.
>>>
>>> I am trying to install Python 3.5.0 on my laptop (Windows 10). The
>>> default installation directory is shown as c:\Users\(my user
>>> name)\AppData\Local\Programs\Python\Python35-32. However, if I select
>>> Custom Install then the default installation directory is c:\Program
>>> Files(x86)\Python3.5.
>>>
>>> In either case, after the installation is complete I cannot find a
>>> Python3.5 directory under Program Files(x86) or the Users\... directory.
>>
>> OP reports off-list that the installation now appears to have been
>> successful. (I'm not clear whether as the result of a re-install or
>> simply finding the .exe)
>>
>> TJG
> 
> Well, his Python shouldn't have been scattered all over his filesystem
> in any case.  Did it all show up in one place like it was supposed to?

(Not entirely sure if you're serious...)

Those were elements of the other programs he mentioned which ship Python
as, eg, a scripting or even because they're partly or wholly implemented
in Python. Apart from the file locations, none of the DLL versions are
35: python27.dll, python33.dll etc.

TJG

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Hiding code from intruders, a different slant on an old question

2015-10-08 Thread alister
On Thu, 08 Oct 2015 08:44:43 -0600, Ian Kelly wrote:

> On Wed, Oct 7, 2015 at 6:01 PM, Dennis Lee Bieber
>  wrote:
>> On Wed, 7 Oct 2015 13:05:07 + (UTC), alister
>>  declaimed the following:
>>
>>
>>>With a simple Cesar the method is "shift the alphabet by 'X' characters
>>>and X is the key
>>>
>>>if the key is unknown then the attacker still has to brute force the
>>>method (admittedly with only 25 options this is not difficult)
>>
>> But who'd consider that with just one-case and alphabet only...
>>
>> At the least include upper, lower, numbers, and basic
>> punctuation --
>> that will add a few more cycles of computation time to break 
> 
> It doesn't really matter how much you add; any Caesar cipher is going to
> fall easily to just a little bit of frequency analysis. Consider an
> extreme case, where the range of X is the size of the entire Unicode
> character set. If the message is written in a Latin-based character set,
> chances are good that the majority of the characters will fall within a
> range of <96, giving the attacker a great starting point to brute-force
> from.

Oh please
the Caesar cypher was mentioned as a simplification for the purpose of 
demonstration.
it was not intended to be even a remotely serious suggestion

which I am sure at least Denis understood when he posted his tongue in 
cheek reply.


-- 
Economists can certainly disappoint you.  One said that the economy would
turn up by the last quarter.  Well, I'm down to mine and it hasn't.
-- Robert Orben
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24848] Warts in UTF-7 error handling

2015-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The difference between 2.7 and 3.x is that 2.7 uses isalnum() in IS_BASE64, and 
3.x test concrete ranges. Therefore depending on platform and locale 2.7 can 
accept wrong bytes as BASE64 characters and return incorrect result. Following 
patch makes 2.7 code the same as 3.x. Tests are changed to fail with large 
probability with unpatched code ('\xe1' is an alnum on almost all 8-bit 
locales).

--
Added file: http://bugs.python.org/file40719/decode_utf7_locale-2.7.patch

___
Python tracker 

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



Re: Hiding code from intruders, a different slant on an old question

2015-10-08 Thread Ian Kelly
On Wed, Oct 7, 2015 at 6:01 PM, Dennis Lee Bieber  wrote:
> On Wed, 7 Oct 2015 13:05:07 + (UTC), alister
>  declaimed the following:
>
>
>>With a simple Cesar the method is "shift the alphabet by 'X' characters
>>and X is the key
>>
>>if the key is unknown then the attacker still has to brute force the
>>method (admittedly with only 25 options this is not difficult)
>
> But who'd consider that with just one-case and alphabet only...
>
> At the least include upper, lower, numbers, and basic punctuation --
> that will add a few more cycles of computation time to break 

It doesn't really matter how much you add; any Caesar cipher is going
to fall easily to just a little bit of frequency analysis. Consider an
extreme case, where the range of X is the size of the entire Unicode
character set. If the message is written in a Latin-based character
set, chances are good that the majority of the characters will fall
within a range of <96, giving the attacker a great starting point to
brute-force from.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installation problem

2015-10-08 Thread Tim Golden
On 08/10/2015 14:25, MICHAEL wrote:
> Hello,
> 
> Please forgive a new user's ignorance.
> 
> I am trying to install Python 3.5.0 on my laptop (Windows 10). The
> default installation directory is shown as c:\Users\(my user
> name)\AppData\Local\Programs\Python\Python35-32. However, if I select
> Custom Install then the default installation directory is c:\Program
> Files(x86)\Python3.5.
> 
> In either case, after the installation is complete I cannot find a
> Python3.5 directory under Program Files(x86) or the Users\... directory.

OP reports off-list that the installation now appears to have been
successful. (I'm not clear whether as the result of a re-install or
simply finding the .exe)

TJG

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-08 Thread Alex Warhawk

Alex Warhawk added the comment:

Thanks for the heads up Christian I'll try enabling client session caching. If 
this does not work I'll try to adapt the patch to only allow session reusing 
within the same context.

--

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread Chris Angelico
On Fri, Oct 9, 2015 at 12:25 AM, MICHAEL  wrote:
> Scattered files include:
> python.exe (in Open Office)
> python27.dll (in CHIRP)
> pythoncom27.dll (in CHIRP)
> python33.dll (in HamRadio\WSJT)
> python25.dll (in "Koan c:\Program Files(x86)\Cyberlink)
>
> I assume these various .dll files are used in the various other programs I
> have installed but I cannot understand, at the moment, why the main python
> program does not appear in the designated installation directory.

Those would all be different programs that have packaged up (part of)
Python with them - and in some cases, a very old version. You can
ignore those.

Did the installation give any complaints? It's possible that you'd
need to elevate privileges for the global installation, though you
should be able to install to your own user directory without
elevation.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Hiding code from intruders, a different slant on an old question

2015-10-08 Thread Ian Kelly
On Thu, Oct 8, 2015 at 9:46 AM, alister
 wrote:
> Oh please
> the Caesar cypher was mentioned as a simplification for the purpose of
> demonstration.
> it was not intended to be even a remotely serious suggestion
>
> which I am sure at least Denis understood when he posted his tongue in
> cheek reply.

I understood that also. I don't see why that means I can't elaborate on it.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25161] Missing periods at the end of sentences

2015-10-08 Thread TAKASE Arihiro

TAKASE Arihiro added the comment:

And this is an updated patch for 2.7.

--
Added file: http://bugs.python.org/file40720/periods-2.7_v2.patch

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread Laura Creighton
In a message of Thu, 08 Oct 2015 16:34:15 +0100, Tim Golden writes:
>On 08/10/2015 16:27, Laura Creighton wrote:
>> In a message of Thu, 08 Oct 2015 15:49:56 +0100, Tim Golden writes:
>>> On 08/10/2015 14:25, MICHAEL wrote:
 Hello,

 Please forgive a new user's ignorance.

 I am trying to install Python 3.5.0 on my laptop (Windows 10). The
 default installation directory is shown as c:\Users\(my user
 name)\AppData\Local\Programs\Python\Python35-32. However, if I select
 Custom Install then the default installation directory is c:\Program
 Files(x86)\Python3.5.

 In either case, after the installation is complete I cannot find a
 Python3.5 directory under Program Files(x86) or the Users\... directory.
>>>
>>> OP reports off-list that the installation now appears to have been
>>> successful. (I'm not clear whether as the result of a re-install or
>>> simply finding the .exe)
>>>
>>> TJG
>> 
>> Well, his Python shouldn't have been scattered all over his filesystem
>> in any case.  Did it all show up in one place like it was supposed to?
>
>(Not entirely sure if you're serious...)
>
>Those were elements of the other programs he mentioned which ship Python
>as, eg, a scripting or even because they're partly or wholly implemented
>in Python. Apart from the file locations, none of the DLL versions are
>35: python27.dll, python33.dll etc.
>
>TJG

I am serious, in that it wasn't clear to me what those things were.
What I don't know about Windows is very huge ...

Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-08 Thread Guido van Rossum

Guido van Rossum added the comment:

Honestly, Antoine's patch looks reasonable to me (except that the names of the 
test modules perpetuate the confusion that pipes and ptys are similar).

Can someone just port that to 3.6? (The change in semantics is big enough that 
I don't think we should shove it into a bugfix release.)

In other news, the pty.py module is pretty pathetic. Kill or improve? It feels 
like one of those "included" batteries that runs out of juice after 5 minutes.

--

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e99ba6b7c98 by Steve Dower in branch '3.5':
Issue #25089: Adds logging to installer for case where launcher is not selected 
on upgrade.
https://hg.python.org/cpython/rev/1e99ba6b7c98

--
nosy: +python-dev

___
Python tracker 

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



[issue23919] [Windows] test_os fails several C-level assertions

2015-10-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69c4fa62b608 by Steve Dower in branch '3.5':
Issue #23919: Prevents assert dialogs appearing in the test suite.
https://hg.python.org/cpython/rev/69c4fa62b608

New changeset 62897db9ae51 by Steve Dower in branch 'default':
Issue #23919: Prevents assert dialogs appearing in the test suite.
https://hg.python.org/cpython/rev/62897db9ae51

--
nosy: +python-dev

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-10-08 Thread Steve Dower

Steve Dower added the comment:

Hopefully with the extra logging we'll be able to see if something is failing 
at the point of detection. Any failure here (permissions in registry, etc.) 
will cause the launcher to not be installed on upgrade (which might be the same 
as removing it... I need to spend more time working through the dependencies 
involved here because they are messy).

--

___
Python tracker 

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



[issue25342] test_json segfault on OpenBSD

2015-10-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Duplicates and related issues: issue25329, issue25222, issue24999, issue22984, 
issue18075, issue12980.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23919] [Windows] test_os fails several C-level assertions

2015-10-08 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread Shirshendu Bhowmick

Shirshendu Bhowmick added the comment:

Installing that update the system says this update is not applicable for your 
computer and it does not generates any .evtx file.

--

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread David Silverman

New submission from David Silverman:

It would be useful to have the ability to push logs onto a stack. This way you 
can log events to the stack. If an error occurred, you could pop the stack and 
output the log events. If no error occurred, you could pop the stack and 
discard the logs.

An example would be when you call a function it could push logs onto the log 
stack as the function is executing. If an error is encountered, you can 
pop/output the logs to provide more details. But, if no error is encountered, 
the detailed logs can be popped and discarded.

--
components: Library (Lib)
messages: 252557
nosy: dasil...@cisco.com
priority: normal
severity: normal
status: open
title: Enhancement to Logging - Logging Stack
type: enhancement

___
Python tracker 

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



[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-10-08 Thread eryksun

eryksun added the comment:

> it does not generates any .evtx file

Start a command prompt; change to the directory that has the MSU, and run it 
with the option "/log:kb2999226.evtx". For me this creates kb2999226.evtx in 
the current directory, which can be converted to XML using wevtutil. If this 
doesn't create a log file, then possibly the .msu file association is 
incorrect. In that case, try running wusa.exe directly, e.g.

"%SystemRoot%\System32\wusa.exe" Windows8.1-KB2999226-x64.msu 
/log:kb2999226.evtx

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Brett Cannon

Brett Cannon added the comment:

We actually don't have any guarantees written down because we have never 
formalized them. It was discussed at the PyCon language summit this past year 
-- https://lwn.net/Articles/640177/ -- but it didn't lead to anyone writing a 
proposal to formalize the memory model.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

I'm guessing you could write a custom hander that would do that.  It might be 
something more suited for a recipe or pypi package.

--
nosy: +r.david.murray, vinay.sajip

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-08 Thread R. David Murray

R. David Murray added the comment:

I wonder...personally I prefer to program in asyncio style rather than 
threading style, where one doesn't have to worry about atomicity.  Maybe Python 
shouldn't make any atomicity guarantees.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

The patch looks good to me.

--

___
Python tracker 

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



[issue25345] Unable to install Python 3.5 on Windows 10

2015-10-08 Thread Gowtham Nm

New submission from Gowtham Nm:

I downloaded Python 3.5 version to install on Windows 10. But apparently, the 
installation does not succeed.
I have tried with lower version of Python also, the installation does not 
succeed on Windows 10.

Have attached the logs of the error. I have checked for the particular error 
code (seen in the screenshot attached) in various forums but none worked.

Looking forward to hear from your team.

--
components: Windows
files: Python 3.5.0 (32-bit)_20151008230628.log
messages: 252563
nosy: Gowtham Nm, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Unable to install Python 3.5 on Windows 10
type: resource usage
versions: Python 3.5
Added file: http://bugs.python.org/file40721/Python 3.5.0 
(32-bit)_20151008230628.log

___
Python tracker 

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



Re: Access a class in another python script

2015-10-08 Thread DBS
On Wednesday, October 7, 2015 at 11:46:05 PM UTC-7, Terry Reedy wrote:
> On 10/8/2015 2:24 AM, DBS wrote:
> > I'm using Python 3.5 and have two python scripts where one needs
> > access to a class in the other script for authentication purposes.
> 
> Any python .py file can be either run as a main program or module (ie, 
> script) or imported as a module by another module.  If a file is meant 
> for both, it should end with
> 
> if __name__ == '__main__:
>  
> 
> The latter is ofter to call a function main() defined previously.  If 
> you have a problem with this, write a **minimal** example with at most 
> 10 lines per file and post.
> 
> 
> -- 
> Terry Jan Reedy

Hello Terry,

Thanks.  Will do and get back with what come up with.  To clarify your 
repsonse, I need to change the file name to reflect __filename__.py and then 
import the needed components (classes and variables) accordingly?  
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25345] Unable to install Python 3.5 on Windows 10

2015-10-08 Thread eryksun

eryksun added the comment:

Please attach "Python 3.5.0 (32-bit)_*_core_JustForMe.log", if it exists.

According to the log, initially the installer can't create a restore point 
because, I assume, you have the volume shadow copy (VSS) service disabled, i.e. 
the error code is ERROR_SERVICE_DISABLED (0x80070422). That shouldn't derail 
the installation, but it's unusual to disable this service since restore points 
are critically important in case something goes wrong while modifying the 
system.

Next, installing core.msi fails with the error code 
ERROR_INSTALL_ALREADY_RUNNING (0x80070652). This means you had an existing 
installation in progress. Check for running instances of msiexec.exe. If the 
existing installation process is hung, try installing Python 3.5 again after 
rebooting.

--
nosy: +eryksun

___
Python tracker 

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



Re: Planet Scipy blog

2015-10-08 Thread Oscar Benjamin
On Thu, 8 Oct 2015 15:29 Laura Creighton  wrote:

In a message of Thu, 08 Oct 2015 15:10:21 +0100, Mark Lawrence writes:
>On 08/10/2015 14:39, beliavsky--- via Python-list wrote:
>> There used to be a blog about SciPy at https 
:// planet.scipy.org/ 
, discussing the applications of Python to scientific computing. Now there
is a static page about "MPI for Python". What happened?
>>
>
>Presumably http:// www.scipy.org/

>
>--
>My fellow Pythonistas, ask not what our language can do for you, ask
>what you can do for our language.
>
>Mark Lawrence

No, all the blog links there go to the MPI for Python link, too.



Numpy etc have been having some hosting problems recently. This might be a
temporary glitch.

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Oct 08, 2015, at 08:44 PM, Mauro S. M. Rodrigues wrote:

>Python 3.5.0+ (3.5:1e99ba6b7c98, Oct  8 2015, 17:12:06) 
>[GCC 4.8.4] on linux
>Type "help", "copyright", "credits" or "license" for more information.
 import smtpd
 smtpd.SMTPServer(("127.0.0.1", 0), 
 ('b',0),enable_SMTPUTF8=True,decode_data=True)
>Traceback (most recent call last):
>  File "", line 1, in 
>  File "/home/maurosr/dev/cpython/Lib/smtpd.py", line 645, in __init__
>raise ValueError("The decode_data and enable_SMTPUTF8"
>ValueError: The decode_data and enable_SMTPUTF8 parameters cannot be set to 
>True at the same time.

That's testing the SMTPServer.__init__() which looks fine.  It's the
SMTPChannel.__init__() that's broken.

--

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread Oscar Benjamin
On Thu, 8 Oct 2015 22:30 eryksun  wrote:

On 10/8/15, Tim Golden  wrote:
>
> What happens if you do [Windows] + R (ie Start > Run), enter "python"
> and click OK?

The new installer for 3.5 doesn't create an "App Paths" key for
"python.exe" like the old installer used to do (see the old
Tools/msi/msi.py). Without that, unless python.exe is in the search
PATH, "Win+R -> python" and running "start python" in the command
prompt won't work. You can of course add the key manually as the
default value for
"[HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\App
Paths\python.exe". IMO, this makes it the 'system' Python.



That's interesting. Any idea why it changed?

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25348] Update pgo_build.bat to use --pgo flag for regrtest

2015-10-08 Thread Brett Cannon

New submission from Brett Cannon:

Should upgrade the command to do what is already occurring in the Makefile for 
consistency.

--
assignee: brett.cannon
components: Windows
messages: 252572
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update pgo_build.bat to use --pgo flag for regrtest
versions: Python 3.6

___
Python tracker 

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



Re: Using pipe in a system call

2015-10-08 Thread Ian Kelly
On Thu, Oct 8, 2015 at 4:03 PM, Cecil Westerhof  wrote:
> I want to do the following Bash command in Python:
> sqlite3 spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | 
> sort > spreekwoorden2.txt
>
> The following does this in Python:
> sqlite_pipe = Popen(
> (
> 'sqlite3',
> 'spreekwoorden.sqlite',
> 'SELECT spreekwoord FROM spreekwoorden;'
> ),
> stdout = PIPE
> )
> Popen(
> (
> 'sort',
> '--output=spreekwoorden2.txt',
> ),
> stdin = sqlite_pipe.stdout
> )
>
> Is this the correct way, or is there a better way?

That seems fine to me. Alternatively you could pass shell=True to
Popen and then the original command should work verbatim (but see the
warnings about using shell=True).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installation problem

2015-10-08 Thread eryksun
On 10/8/15, Oscar Benjamin  wrote:
> On Thu, 8 Oct 2015 22:30 eryksun  wrote:
>
> The new installer for 3.5 doesn't create an "App Paths" key for
> "python.exe" like the old installer used to do (see the old
> Tools/msi/msi.py). Without that, unless python.exe is in the search
> PATH, "Win+R -> python" and running "start python" in the command
> prompt won't work. You can of course add the key manually as the
> default value for
> "[HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\App
> Paths\python.exe". IMO, this makes it the 'system' Python.
>
> That's interesting. Any idea why it changed?

Probably it's just an oversight. I doubt Steve Dower would have
purposefully decided to not set the "App Paths" key.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Mauro S. M. Rodrigues

Mauro S. M. Rodrigues added the comment:

Hi Barry, I was testing this and it seems to work, am I doing something wrong 
in order to reproduce it? I've used the same parameters from the unit tests

Python 3.5.0+ (3.5:1e99ba6b7c98, Oct  8 2015, 17:12:06) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smtpd
>>> smtpd.SMTPServer(("127.0.0.1", 0), 
>>> ('b',0),enable_SMTPUTF8=True,decode_data=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/maurosr/dev/cpython/Lib/smtpd.py", line 645, in __init__
raise ValueError("The decode_data and enable_SMTPUTF8"
ValueError: The decode_data and enable_SMTPUTF8 parameters cannot be set to 
True at the same time.

--
nosy: +maurosr

___
Python tracker 

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



Re: Installation problem

2015-10-08 Thread eryksun
On 10/8/15, Tim Golden  wrote:
>
> What happens if you do [Windows] + R (ie Start > Run), enter "python"
> and click OK?

The new installer for 3.5 doesn't create an "App Paths" key for
"python.exe" like the old installer used to do (see the old
Tools/msi/msi.py). Without that, unless python.exe is in the search
PATH, "Win+R -> python" and running "start python" in the command
prompt won't work. You can of course add the key manually as the
default value for
"[HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\App
Paths\python.exe". IMO, this makes it the 'system' Python.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installation problem

2015-10-08 Thread Oscar Benjamin
On Thu, 8 Oct 2015 22:41 eryksun  wrote:

> On 10/8/15, Oscar Benjamin  wrote:
> > On Thu, 8 Oct 2015 22:30 eryksun  wrote:
> >
> > The new installer for 3.5 doesn't create an "App Paths" key for
> > "python.exe" like the old installer used to do (see the old
> > Tools/msi/msi.py). Without that, unless python.exe is in the search
> > PATH, "Win+R -> python" and running "start python" in the command
> > prompt won't work. You can of course add the key manually as the
> > default value for
> > "[HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\App
> > Paths\python.exe". IMO, this makes it the 'system' Python.
> >
> > That's interesting. Any idea why it changed?
>
> Probably it's just an oversight. I doubt Steve Dower would have
> purposefully decided to not set the "App Paths" key.
>
I guess it deserves a bug report then. (Not on a proper computer right now
but maybe tomorrow)
-- 
https://mail.python.org/mailman/listinfo/python-list


Using pipe in a system call

2015-10-08 Thread Cecil Westerhof
I want to do the following Bash command in Python:
sqlite3 spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | 
sort > spreekwoorden2.txt

The following does this in Python:
sqlite_pipe = Popen(
(
'sqlite3',
'spreekwoorden.sqlite',
'SELECT spreekwoord FROM spreekwoorden;'
),
stdout = PIPE
)
Popen(
(
'sort',
'--output=spreekwoorden2.txt',
),
stdin = sqlite_pipe.stdout
)

Is this the correct way, or is there a better way?


By the way: I want this because I just filled the table spreekwoorden
in my Python script and want to save it immediately.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-08 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I was surprised to see same or worse performances for 
UTF-8/backslashreplace. In fact, I forgot to enable overallocation. With 
overallocation, it is now faster ;-)

I modified the API to put the "stack buffer" inside _PyBytesWriter API 
directly. I also reworked _PyBytesWriter_Alloc() to call  
_PyBytesWriter_Prepare() so _PyBytesWriter_Alloc() now supports overallocation 
as well. It was part of _PyBytesWriter design to support overallocation at the 
first allocation (_PyBytesWriter_Alloc), that's why we have 
_PyBytesWriter_Alloc() *and* _PyBytesWriter_Init(): it's possible to set 
overallocate=1 between init and alloc.

I pushed my change since it didn't kill performances. It's only a little bit 
smaller but on very short encode: less than 500 ns. In other cases, it's the 
same performances or faster.

--

___
Python tracker 

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



  1   2   >