[issue25820] Clean up run_gdb() calls

2015-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___

Re: writing an email.message.Message in UTF-8

2015-12-07 Thread dieter
Adam Funk writes: > I'm trying to write an instance of email.message.Message, whose body > contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10 > again.) > > reply = email.message.Message() > reply.set_charset('utf-8') > ... # set various

Re: manually build a unittest/doctest object.

2015-12-07 Thread Steven D'Aprano
On Tuesday 08 December 2015 14:30, Vincent Davis wrote: > If I have a string that is python code, for example > mycode = "print('hello world')" > myresult = "hello world" > How can a "manually" build a unittest (doctest) and test I get myresult Not easily. Effectively, you would have to

Re: Help with stale exception Python

2015-12-07 Thread dieter
iverson.z...@gmail.com writes: > ... > I have tried uncountable number of methods (e.g. explicit, implicit wait) but > the stale error still persists as it seems to stays stale as long as it is > staled. > > Have anyone come up with a solution to this and what is the best way to deal > with DOM

[issue23788] test_urllib2_localnet.test_bad_address fails: OSError not raised by urlopen

2015-12-07 Thread Martin Panter
Martin Panter added the comment: I propose this patch which merges test_bad_address() from test_urllib2_localnet.py into test_urllibnet.py. It includes applying r75111 to test_urllibnet.py, which adds a trailing dot to the domain name. -- keywords: +patch stage: -> patch review

writing an email.message.Message in UTF-8

2015-12-07 Thread Adam Funk
I'm trying to write an instance of email.message.Message, whose body contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10 again.) reply = email.message.Message() reply.set_charset('utf-8') ... # set various headers reply.set_payload('\n'.join(body_lines) + '\n')

Re: install issue

2015-12-07 Thread Laura Creighton
In a message of Sun, 06 Dec 2015 20:44:03 +, "John Robinson" writes: >When I run the installer (python-3.5.0.exe [win32]) I see this: > > > > > > > >There seems to be "hidden" buttons as clicking in the middle of this dialog >box does continue the process. > >However, when complete, and I

Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-07 Thread Adam Funk
On 2015-12-04, Oscar Benjamin wrote: > Or you can use fileinput which is designed to be exactly this kind of > context manager and to be used in this way. Although fileinput is slightly > awkward in defaulting to reading stdin. That default is what I specifically like about fileinput --- it's a

Re: Packages installing problem

2015-12-07 Thread Laura Creighton
In a message of Mon, 07 Dec 2015 00:32:37 +, lalith writes: >Dear sir. > >I was using Python2.7 and i move to Python3.5. >I face big trouble with installing software packages, i need in my >development. > >Lalith >-- >https://mail.python.org/mailman/listinfo/python-list Do you want to

PyKMIP 0.4.1

2015-12-07 Thread Peter Hamilton
I am pleased to announce the release of PyKMIP 0.4.1. PyKMIP is a Python implementation of the Key Management Interoperability Protocol (KMIP), a communications protocol for the storage and maintenance of keys, certificates, and other secret objects. PyKMIP provides clients for conducting key

Re: define the area plot

2015-12-07 Thread Laura Creighton
In a message of Mon, 07 Dec 2015 10:51:10 -0200, jorge.conr...@cptec.inpe.br wr ites: > > >Hi, > >I'm changing from the IDL to PYTHON. I would like know how can I define >the size of the window plot in Python. On IDL I define the size of area >plot by: > > >window,1,xsize=1000,ysize=1000 > > >It

[issue22758] Regression in Python 3.2 cookie parsing

2015-12-07 Thread Tim Graham
Tim Graham added the comment: Given the inactivity here, I guess the patch won't be applied before Python 3.2 is end-of-life so I'm going to close the ticket. -- resolution: -> wont fix status: open -> closed ___ Python tracker

Re: writing an email.message.Message in UTF-8

2015-12-07 Thread Adam Funk
On 2015-12-07, Adam Funk wrote: > I'm trying to write an instance of email.message.Message, whose body > contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10 > again.) > > reply = email.message.Message() > reply.set_charset('utf-8') > ... # set various headers >

install issue

2015-12-07 Thread John Robinson
When I run the installer (python-3.5.0.exe [win32]) I see this: There seems to be "hidden" buttons as clicking in the middle of this dialog box does continue the process. However, when complete, and I start python, I get an error saying its not a valid win32 application. So, I

[issue24454] Improve the usability of the match object named group API

2015-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: Here's the patch. I added some more tests, including tests for ''.format_map(). I think the format_map() tests convince me that keeping None for non-matched groups makes sense. -- assignee: -> eric.smith keywords: +easy, needs review, patch stage:

Packages installing problem

2015-12-07 Thread lalith
Dear sir. I was using Python2.7 and i move to Python3.5. I face big trouble with installing software packages, i need in my development. Lalith -- https://mail.python.org/mailman/listinfo/python-list

Re: writing an email.message.Message in UTF-8

2015-12-07 Thread Terry Reedy
On 12/7/2015 9:57 AM, Adam Funk wrote: I'm trying to write an instance of email.message.Message, whose body contains unicode characters, to a UTF-8 file. (Python 2.7.3 & 2.7.10 again.) The email package was rewritten for, I believe, 3.3. I believe it should handle unicode email encoded as

Re: python 3.5: upgrading smart_open package

2015-12-07 Thread Laura Creighton
In a message of Mon, 07 Dec 2015 22:45:44 +0530, Anupam Mediratta writes: >Hello, > >I have to use python 3.5 in my use case and one of the packages I use >(gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/) > >smart_open depends on boto and boto fails on my machine

python 3.5: upgrading smart_open package

2015-12-07 Thread Anupam Mediratta
Hello, I have to use python 3.5 in my use case and one of the packages I use (gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/) smart_open depends on boto and boto fails on my machine running ubuntu 15.10. So in order for me to be able to run gensim, I need to be able

[issue25624] shutil.make_archive makes invalid directory entries

2015-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___

[issue25761] Improve unpickling errors handling

2015-12-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 001514146c21 by Serhiy Storchaka in branch 'default': Issue #25761: Fixed reference leak added in previous changeset (5c670af0100f). https://hg.python.org/cpython/rev/001514146c21 -- ___ Python tracker

Help with stale exception Python

2015-12-07 Thread iverson . zhou
I'm new to Python and programming. Been learning it for 3 weeks now but have had lot of obstacles along the way. I found some of your insights very useful as a starter but I have come across many more complicated challenges that aren't very intuitive. For example,I'm trying to scrap this

[issue10351] Add autocompletion for keys in dictionaries

2015-12-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 3.6 -Python 3.5 ___ Python tracker ___

[issue25624] shutil.make_archive makes invalid directory entries

2015-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Larry, is this fix included in 3.5.1? -- ___ Python tracker ___ ___

[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2015-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM. Thanks Martin. -- ___ Python tracker ___ ___

Re: Unicode failure

2015-12-07 Thread Oscar Benjamin
On Sun, 6 Dec 2015 at 23:11 Quivis wrote: > On Fri, 04 Dec 2015 13:07:38 -0500, D'Arcy J.M. Cain wrote: > > > I thought that going to Python 3.4 would solve my Unicode issues but it > > seems I still don't understand this stuff. Here is my script. > > > > #!

[issue23788] test_urllib2_localnet.test_bad_address fails: OSError not raised by urlopen

2015-12-07 Thread Martin Panter
Martin Panter added the comment: Sorry the revision adding the precondition is 6adab7448272. -- ___ Python tracker ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2015-12-07 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___

[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The iterparse benchmark in 3.6 still is 30% slower than in 2.7. The parse benchmark is 70% slower. Hence there are other causes of the slowing down. One of causes is that in 3.x an empty dict instead of None is passed to start handler as attrib parameter if

[issue25718] itertools.accumulate __reduce__/__setstate__ bug

2015-12-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: This could be fixed by saving the accumulate state in a tuple. It would break protocol, though. I don't recall the rules for backwards compatibility of pickles. I've argued before that the state of runtime structures such as generators is so

[issue15068] fileinput requires two EOF when reading stdin

2015-12-07 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- nosy: -kristjan.jonsson ___ Python tracker ___

Re: Accessing container's methods

2015-12-07 Thread Rob Gaddi
Tony van der Hoff wrote: > Hi, > > I have a class A, containing embedded embedded classes, which need to > access methods from A. > . > A highly contrived example, where I'm setting up an outer class in a > Has-a relationship, containing a number of Actors. The inner class needs > to access a

Re: Accessing container's methods

2015-12-07 Thread Peter Otten
Tony van der Hoff wrote: > Hi, > > I have a class A, containing embedded embedded classes, which need to > access methods from A. > . > A highly contrived example, where I'm setting up an outer class in a > Has-a relationship, containing a number of Actors. The inner class needs > to access a

[issue25820] Clean up run_gdb() calls

2015-12-07 Thread Martin Panter
New submission from Martin Panter: This small patch cleans up two oddities calling run_gdb() in /Lib/test/test_gdb.py that I noticed. They were both added in revision b71cda2f48c6. The first one is a whole GDB command being passed to GDB as extra arguments. Notice “gdb --batch -nx” is in the

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
Changes by Anthony Green : -- assignee: docs@python components: Documentation nosy: anthonygreen, docs@python, pitrou priority: normal severity: normal status: open title: Documentation for threading.enumerate / threading.Thread.is_alive is contradictory. versions:

[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2015-12-07 Thread Martin Panter
Martin Panter added the comment: I committed my patch to 3.5+. I will leave this open in case someone wants to look into how things work in 2.7. I presume things might be different in Python 2; all I know is there are two kinds of classes and objects, and the slots are a bit different

define the area plot

2015-12-07 Thread jorge . conrado
Hi, I'm changing from the IDL to PYTHON. I would like know how can I define the size of the window plot in Python. On IDL I define the size of area plot by: window,1,xsize=1000,ysize=1000 It is possible define the size of the window before my data is plotted. Conrado --

Twisted 15.4 was the last release to support Python 2.6; or: a HawkOwl Can't Words Situation

2015-12-07 Thread Amber "Hawkie" Brown
Hi everyone! It's been brought to my attention that I misworded something in the release notes and it slipped through the cracks. In the NEWS I said: > This is the last Twisted release where Python 2.6 is supported, on any > platform. However, I meant that this is the first Twisted release to

[issue25718] itertools.accumulate __reduce__/__setstate__ bug

2015-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, we can fix this without breaking the protocol. The accumulate() object with state is None can be reconstructed as islice(accumulate(chain([None], iterator)), 1, None). Proposed patch implements this solution. -- Added file:

Re: Help on for loop understanding

2015-12-07 Thread Erik
On 08/12/15 01:50, Robert wrote: One example, see below please, is in the above mentioned link. I don't see the purpose of the example. OK, so there are two parts to this. The first, is "how do I iterate over something". The answer to that is using "for" or using "iter()" followed by zero or

[issue25819] print "Hi" in python 3 exception handling doesn't work

2015-12-07 Thread Zachary Ware
Zachary Ware added the comment: Also, if you only need to support Python 2.6+, you can use 'from __future__ import print_function' and get all the benefits of 'print' as a function in Python 2 (except the 'flush' argument, which was added in Python 3.3). -- nosy: +zach.ware

Re: Accessing container's methods

2015-12-07 Thread Ian Kelly
On Mon, Dec 7, 2015 at 11:10 AM, Tony van der Hoff wrote: > Hi, > > I have a class A, containing embedded embedded classes, which need to access > methods from A. > . > A highly contrived example, where I'm setting up an outer class in a Has-a > relationship, containing a

Re: Brief Code Review Please - Learning Python

2015-12-07 Thread Thomas 'PointedEars' Lahn
Joel Goldstick wrote: > On Sun, Dec 6, 2015 at 12:21 PM, wrote: >> * Same question as right above but with the if tests on lines 5-8. >> * I've also used ( ) around the if tests, but I'm not sure if this is >> good Python style or not. >> >> 1 def

Understanding Python from a PHP coder's perspective

2015-12-07 Thread villascape
Hello all! Just started getting into Python, and am very excited about the prospect. I am struggling on some general concepts. My past experience with server-side code is mostly limited to PHP and websites. I have some file called "whatever.php", the browser accesses it, and PHP parses it

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread villascape
Right after I sent my first post, I realized I did not include the following: Per https://wiki.python.org/moin/PythonVsPhp, "The vast majority of Python Web applications are run in a separate process. This has some important implications." >From a PHP background, guess I just don't understand

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Cameron Simpson
On 07Dec2015 13:07, villasc...@gmail.com wrote: Hello all! Just started getting into Python, and am very excited about the prospect. I am struggling on some general concepts. My past experience with server-side code is mostly limited to PHP and websites. I have some

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Ian Kelly
On Mon, Dec 7, 2015 at 2:07 PM, wrote: > Hello all! Just started getting into Python, and am very excited about the > prospect. > > I am struggling on some general concepts. My past experience with > server-side code is mostly limited to PHP and websites. I have some

Re: Accessing container's methods

2015-12-07 Thread Terry Reedy
On 12/7/2015 1:10 PM, Tony van der Hoff wrote: Hi, I have a class A, containing embedded embedded classes, which need to access methods from A. . A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Chris Angelico
On Tue, Dec 8, 2015 at 8:07 AM, wrote: > I am struggling on some general concepts. My past experience with > server-side code is mostly limited to PHP and websites. I have some file > called "whatever.php", the browser accesses it, and PHP parses it and returns > HTML,

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Terry Reedy
On 12/7/2015 4:07 PM, villasc...@gmail.com wrote: Hello all! Just started getting into Python, and am very excited about the prospect. I am struggling on some general concepts. My past experience with server-side code is mostly limited to PHP and websites. I have some file called

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Ian Kelly
On Mon, Dec 7, 2015 at 2:40 PM, Chris Angelico wrote: > So that's a quick potted summary of why the URLs don't reflect the > language used. Python is event-driven, but instead of defining events > at the file level, the way PHP does, they're defined at the function > level. Of

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Chris Angelico
On Tue, Dec 8, 2015 at 8:21 AM, wrote: > Per https://wiki.python.org/moin/PythonVsPhp, "The vast majority of Python > Web applications are run in a separate process. This has some important > implications." > > From a PHP background, guess I just don't understand the

Re: Accessing container's methods

2015-12-07 Thread Chris Angelico
On Tue, Dec 8, 2015 at 8:38 AM, Terry Reedy wrote: >>def list_actors( self ): >> h=[] >> for n in self.actors: >>h.append( n.get_name() ) >> return h > > > return list(self.actors) # or perhaps even faster > return self.actors[:] Not identical

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Chris Angelico
On Tue, Dec 8, 2015 at 8:59 AM, Ian Kelly wrote: > On Mon, Dec 7, 2015 at 2:40 PM, Chris Angelico wrote: >> So that's a quick potted summary of why the URLs don't reflect the >> language used. Python is event-driven, but instead of defining events >> at

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread villascape
Thank you all! Okay, the concept of a WSGI along with a framework provides insight on my main questions. In regards to Chris's statement: "It openly and honestly does NOT reset its state between page requests" With PHP, I have sessions to preserve state. I have a feeling that this is

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Chris Angelico
On Tue, Dec 8, 2015 at 9:27 AM, wrote: > In regards to Chris's statement: "It openly and honestly does NOT reset its > state between page requests" > > With PHP, I have sessions to preserve state. I have a feeling that this is > significantly different. Yes? How? Does

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Ian Kelly
On Mon, Dec 7, 2015 at 3:27 PM, wrote: > Thank you all! > > Okay, the concept of a WSGI along with a framework provides insight on my > main questions. > > In regards to Chris's statement: "It openly and honestly does NOT reset its > state between page requests" > > With

Re: Understanding Python from a PHP coder's perspective

2015-12-07 Thread Cameron Simpson
On 07Dec2015 14:27, villasc...@gmail.com wrote: In regards to Chris's statement: "It openly and honestly does NOT reset its state between page requests" With PHP, I have sessions to preserve state. I have a feeling that this is significantly different. Yes? How? Does

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Mark Lawrence
Mark Lawrence added the comment: After running the 3.5.1 64 bit web installer the py launcher has again been lost, i.e. "'py' is not recognized as an internal or external command, operable program or batch file." Running the web installer in "repair" mode hasn't made any difference. I've

[issue12509] test_gdb fails on debug build when builddir != srcdir

2015-12-07 Thread Martin Panter
Martin Panter added the comment: Looks like Mark ment Mercurial revision number 77824, corresponding to abcd29c9a791 (the link assumes Subversion). I think it made it into 3.3 but not 3.2 nor 2.7, so I am closing this. -- nosy: +martin.panter resolution: -> fixed stage: patch review

[issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher)

2015-12-07 Thread Martin Panter
Martin Panter added the comment: The change in the patch was applied as part of the commits for Issue 19308, so I assume this is fixed. -- nosy: +martin.panter resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python

[issue23137] Python 2.7.9 test_gdb fails on CentOS 7

2015-12-07 Thread Martin Panter
Martin Panter added the comment: All the op@entry=. . . stuff suggests that this is the same problem as in Issue 17126; maybe a duplicate? -- nosy: +martin.panter ___ Python tracker

[issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

2015-12-07 Thread Myron Walker
Myron Walker added the comment: Found this with code inspection -- ___ Python tracker ___ ___

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Steve Dower
Steve Dower added the comment: There's a separate issue in the 3.5.1 installer where the launcher is always deselected on upgrade. I'm currently working on a fix to force it to always install and we might push out a new 3.5.1 build later today. If you go through Modify rather than Repair then

[issue25591] improve test coverage for the imaplib

2015-12-07 Thread Maciej Szulik
Maciej Szulik added the comment: I've just found the original issue where I wanted to submit the new tests. I'm closing this in favor of http://bugs.python.org/issue22137. -- resolution: -> duplicate status: open -> closed ___ Python tracker

[issue25816] https://www.python.org/downloads/ not working for 3.5.1 for windows 10 users

2015-12-07 Thread Brett Cannon
Brett Cannon added the comment: Reported at https://github.com/python/pythondotorg/issues/863 -- nosy: +brett.cannon resolution: -> not a bug status: open -> closed ___ Python tracker

[issue22137] Test imaplib API on all methods specified in RFC 3501

2015-12-07 Thread Maciej Szulik
Maciej Szulik added the comment: Resubmitting from http://bugs.python.org/issue25591, which I filled in unnecessarily. Here are the rewritten test case I've developed during PyCon sprints along with David. Once we'll have the entire test suite in place it'll be safer to introduce any

[issue25591] improve test coverage for the imaplib

2015-12-07 Thread Maciej Szulik
Changes by Maciej Szulik : -- superseder: -> Test imaplib API on all methods specified in RFC 3501 ___ Python tracker ___

[issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

2015-12-07 Thread Myron Walker
Myron Walker added the comment: I think this usage of 'call_method' from typeobject.c would cause it to leak. static PyObject* slot_sq_slice(PyObject *self, Py_ssize_t i, Py_ssize_t j) { static PyObject *getslice_str; if (PyErr_WarnPy3k("in 3.x, __getslice__ has been removed; "

[issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

2015-12-07 Thread Myron Walker
Myron Walker added the comment: I'll file a seperate bug on 'countformat' -- ___ Python tracker ___ ___

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
New submission from Myron Walker: 'countformat' does not appear to be handling the case where a format string is passed with no parenthesis or brackets correctly. Here is an example of a usage that might cause issues from typedobject.c: static PyObject* slot_sq_slice(PyObject *self, Py_ssize_t

[issue25768] compileall functions do not document or test return values

2015-12-07 Thread Brett Cannon
Brett Cannon added the comment: Your solution to the problem SGTM. And testing compile_path() can be separate method. -- ___ Python tracker ___

[issue21815] imaplib truncates some untagged responses

2015-12-07 Thread Maciej Szulik
Maciej Szulik added the comment: Hey Lita, final call ;) Can you address berkerpeksag comments from review? Otherwise, I'm planning to take ownership of this issue and resubmit your patch with addressed comments. -- ___ Python tracker

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread R. David Murray
R. David Murray added the comment: Can you post a reproducer? -- nosy: +r.david.murray ___ Python tracker ___

[issue25716] typeobject.c call_method & call_maybe can leak references on 'func'

2015-12-07 Thread Emanuel Barry
Emanuel Barry added the comment: Could you provide actual code where a reference is leaked? To me, this looks like hypothetical failure rather than something that has a chance of occurring - feel free to prove me wrong, though :) Please also include relevant tests. -- nosy: +ebarry

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Mark Lawrence
Mark Lawrence added the comment: Using "modify" rather than "repair" fixed the launcher issue, a pity about this. py Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import

[issue25818] If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
New submission from Isaac Dickinson: This makes it a nightmare to figure out why your connections are abruptly closing. It should print an error at least. -- components: asyncio files: broken.py messages: 256081 nosy: SunDwarf, gvanrossum, haypo, yselivanov priority: normal severity:

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
Changes by Isaac Dickinson : -- title: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server. -> asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Isaac Dickinson
Isaac Dickinson added the comment: I completely forgot asyncio has a debug mode. Ignore this. -- resolution: -> not a bug ___ Python tracker ___

[issue25819] print "Hi" in python 3 exception handling doesn't work

2015-12-07 Thread Calvin Simpkinson
New submission from Calvin Simpkinson: When you execute the code: try: print "Hi" except: print("Hello") in python 3.5, it creates a syntax error in Terminal on Mac and a pop-up error in IDLE, while it should just print Hello in the console. -- messages: 256083 nosy: Calvin

[issue25818] asyncio: If protocol_factory raises an error, the connection closes but no stacktrace is printed on the server.

2015-12-07 Thread Emanuel Barry
Changes by Emanuel Barry : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25819] print "Hi" in python 3 exception handling doesn't work

2015-12-07 Thread Emanuel Barry
Emanuel Barry added the comment: The reason you are experiencing this behviour is because of the way Python works. Python needs to compile your code before it can execute it. It parses the code, sees an invalid token ('print "Hi"'), fails to compile and throws an error. Your code never gets

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: There is not reproducer for this currently. Its a case of implied or shared usage between a function and the code that uses it. This function is only used in the Python core, so unless it is used incorrectly, by a python extension or modification, it may never

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Steve Dower
Steve Dower added the comment: Did you deselect everything else? That will remove it all. -- ___ Python tracker ___

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Mark Lawrence
Mark Lawrence added the comment: Of course I deselected everything, the only thing I wanted modified was the launcher, I wanted everything else left alone. -- ___ Python tracker

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: There are format string like "O&" being passed in to Py_BuildValue which eventually make their way to 'countformat'. It looks like it would just break after the first & and not count anything else. So Im not sure it gives an accurate count. --

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Martin Panter
Martin Panter added the comment: I am not seeing any problem. The function is declared static, and is only called with nonzero endchar from do_mkvalue() that I can see. It should not be directly callable from elsewhere. -- nosy: +martin.panter ___

[issue25819] print "Hi" in python 3 exception handling doesn't work

2015-12-07 Thread R. David Murray
R. David Murray added the comment: By the way, if your goal is to write python2/3 compatible code, notice that 'print("hello")' is valid in python2 and will do the same thing as print "hello"...as long as you don't use commas in the argument list to print. -- nosy: +r.david.murray

[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2015-12-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50711c80ff76 by Martin Panter in branch '3.5': Issue #25701: Document C API functions that both set and delete objects https://hg.python.org/cpython/rev/50711c80ff76 New changeset 7bb7173cd97a by Martin Panter in branch 'default': Issue #25701:

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Martin Panter
Martin Panter added the comment: The breaking for “&” is to keep the count right, because the preceding “O” would already have been counted as one. The “es” code is only documented for parsing values, not for building values. I suggest to close this, unless you can find a specific bug.

Re: Issue

2015-12-07 Thread Ian Kelly
On Sun, Dec 6, 2015 at 5:16 PM, Steven D'Aprano wrote: > Oh, I can make one guess... if you're using Windows XP, I'm afraid that > Python 3.5 is not supported. You'll have to either downgrade to Python 3.4, > or upgrade to Windows 7 or higher, or another operating system.

Re: Accessing container's methods

2015-12-07 Thread Erik
Hi Tony, On 07/12/15 18:10, Tony van der Hoff wrote: A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to access a method of the outer class; here the method get_name. Generally, an object should not

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
Anthony Green added the comment: The following example comes from IRC user ztane: > import threading, time > > main_thread = threading.current_thread() > > def foo(): > time.sleep(10) > print(main_thread.is_alive()) > print(list(threading.enumerate())) > > t =

Re: python 3.5: upgrading smart_open package

2015-12-07 Thread Terry Reedy
On 12/7/2015 12:15 PM, Anupam Mediratta wrote: Hello, I have to use python 3.5 in my use case and one of the packages I use (gensim), in turn uses smart_open (https://github.com/piskvorky/smart_open/) smart_open depends on boto and boto fails on my machine running ubuntu 15.10. So in order

[issue25816] https://www.python.org/downloads/ not working for 3.5.1 for windows 10 users

2015-12-07 Thread Laura Creighton
New submission from Laura Creighton: webmaster has heard from 2 windows 10 users who say that when they click on 'download windows 3.5.1' they are sent to this page https://www.python.org/downloads/windows/ instead of actually getting a download. -- messages: 256063 nosy: lac

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
New submission from Anthony Green: The documentation at https://docs.python.org/3/library/threading.html#threading.Thread.is_alive relates: > The module function enumerate() returns a list of all alive threads. The documentation at

[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2015-12-07 Thread Myron Walker
Myron Walker added the comment: Yes, there are some other cases that look odd to me as if the code is not up to date though. I was looking at the documentation and it mentions format character combinations like 'es' which contain two characters sequences. When I look at this function, it

[issue25089] Can't run Python Launcher on Windows

2015-12-07 Thread Steve Dower
Steve Dower added the comment: The convention when modifying installations is to specify the end-state that you're want, so unchecking something indicates that you want to remove it. This could be made clearer, but it's probably a significant redesign of the UI. At the least we could specify

Re: increment/decrement operators

2015-12-07 Thread Ian Kelly
On Dec 5, 2015 10:21 AM, "BartC" wrote: > > > The latter is not the same. Some of the differences are: > > * ++ and -- are often inside inside expressions and return values (unlike x+=1 in Python) > > * x++ and x-- return the /current/ value of x, unlike x+=1 even if it

Accessing container's methods

2015-12-07 Thread Tony van der Hoff
Hi, I have a class A, containing embedded embedded classes, which need to access methods from A. . A highly contrived example, where I'm setting up an outer class in a Has-a relationship, containing a number of Actors. The inner class needs to access a method of the outer class; here the

  1   2   >