[issue26338] remove duplicate bind addresses in create_server

2016-03-02 Thread Yury Selivanov
Yury Selivanov added the comment: Committed. Thanks, Sebastien! -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.6 ___ Python tracker

Re: urlopen, six, and py2

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 2:36 AM, Fabien wrote: > On 03/02/2016 03:35 PM, Matt Wheeler wrote: >> >> I agree that six should probably handle this, > > > Thank you Matt and Chris for your answers. Do you think I should open an > issue on six? It sounds unlikely that I am

[issue26347] BoundArguments.apply_defaults doesn't handle empty arguments

2016-03-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94879997ea5f by Yury Selivanov in branch '3.5': inspect: Fix BoundArguments.apply_defaults to handle empty arguments https://hg.python.org/cpython/rev/94879997ea5f New changeset 779a0d51f7e2 by Yury Selivanov in branch 'default': Merge 3.5 (issue

[issue25647] Return of asyncio.coroutine from asyncio.coroutine doesn't work with enabled asyncio debug

2016-03-02 Thread Yury Selivanov
Yury Selivanov added the comment: Vladimir, thanks for the patch! -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue25647] Return of asyncio.coroutine from asyncio.coroutine doesn't work with enabled asyncio debug

2016-03-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd21f162e377 by Yury Selivanov in branch '3.5': asyncio: Fix @coroutine to recognize CoroWrapper (issue #25647) https://hg.python.org/cpython/rev/fd21f162e377 New changeset e3aee2f16937 by Yury Selivanov in branch 'default': Merge 3.5 (issue

Re: urlopen, six, and py2

2016-03-02 Thread Fabien
On 03/02/2016 03:35 PM, Matt Wheeler wrote: I agree that six should probably handle this, Thank you Matt and Chris for your answers. Do you think I should open an issue on six? It sounds unlikely that I am the first one having this problem... (until this difference with urlopen I have

Re: Explaining names vs variables in Python

2016-03-02 Thread Jussi Piitulainen
Ian Kelly writes: > On Wed, Mar 2, 2016 at 2:35 AM, Jussi Piitulainen wrote: >> The following are too delicate for me. I suppose the answers could have >> been different, but I can't guess what mechanism actually leads to these >> results. Just idle curiosity on my part. >> > 890 is 890 >>

Re: Correct IDLE usage (was Reason for not allowing import twice but allowing reload())

2016-03-02 Thread Rustom Mody
On Tuesday, March 1, 2016 at 12:23:02 PM UTC+5:30, Terry Reedy wrote: > On 2/29/2016 7:42 AM, Rustom Mody wrote: > > > Is import needed at all when trying out in Idle? > ... > > So it does appear that > > 1. import not necessary with(in) idle > > 2. However import and f5 (ie is run as main) are

Re: Reason for not allowing import twice but allowing reload()

2016-03-02 Thread Grant Edwards
On 2016-03-02, Ian Kelly wrote: > Software updates? The nice thing about *nix systems is that *most* > updates don't require a reboot. I'm still going to reboot any time > there's a kernel update though, and those are fairly frequent. I could > read the patch notes to

Re: Explaining names vs variables in Python

2016-03-02 Thread Ian Kelly
On Wed, Mar 2, 2016 at 2:35 AM, Jussi Piitulainen wrote: > The following are too delicate for me. I suppose the answers could have > been different, but I can't guess what mechanism actually leads to these > results. Just idle curiosity on my part. > 890 is 890

Re: Explaining names vs variables in Python

2016-03-02 Thread Rustom Mody
On Wednesday, March 2, 2016 at 7:42:09 PM UTC+5:30, Marko Rauhamaa wrote: > Chris Angelico : > > > On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote: > >> Chris Angelico : > >> > >>> Python defines that every object has an identity, which can be > >>> represented as an integer. Since this is

Re: urlopen, six, and py2

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 1:35 AM, Matt Wheeler wrote: >> from six.moves.urllib.request import urlopen >> >> try: >> with urlopen('http://www.google.com') as resp: >> _ = resp.read() >> except AttributeError: >> # python 2 >> resp =

Re: urlopen, six, and py2

2016-03-02 Thread Matt Wheeler
On 2 March 2016 at 14:05, Fabien wrote: > [snip] > My question is: why does the python3 version need a "with" block while the > python2 version doesn't? Can I skip the "with" entirely, or should I rather > do the following: It's not a case of "need", using the "with"

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-03-02 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +zach.ware ___ Python tracker ___ ___

Re: Explaining names vs variables in Python

2016-03-02 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> Python defines that every object has an identity, which can be >>> represented as an integer. Since this is an intrinsic part of the >>>

urlopen, six, and py2

2016-03-02 Thread Fabien
Hi, it seems that urlopen had no context manager for versions < 3. The following code therefore will crash on py2 but not on py3. from six.moves.urllib.request import urlopen with urlopen('http://www.google.com') as resp: _ = resp.read() Error: AttributeError: addinfourl instance has no

Re: Explaining names vs variables in Python

2016-03-02 Thread Chris Angelico
On Thu, Mar 3, 2016 at 12:39 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> Python defines that every object has an identity, which can be >> represented as an integer. Since this is an intrinsic part of the >> object, no two distinct objects can truly have

Re: Explaining names vs variables in Python

2016-03-02 Thread Marko Rauhamaa
Chris Angelico : > Python defines that every object has an identity, which can be > represented as an integer. Since this is an intrinsic part of the > object, no two distinct objects can truly have identical > characteristics. Python's objects are like rifles - there are many >

[issue26472] Infinite loop

2016-03-02 Thread Christian Heimes
Christian Heimes added the comment: In open(False) Fale is interpreted as int 0. The function call opens file descriptor 0 (stdin) and waits for incoming data. Try this code, enter some text and press enter to see what is going on: with open(False) as f: for line in f:

[issue26472] Infinite loop

2016-03-02 Thread Tibichte
New submission from Tibichte: The code below runs indefinitely: with open(False) as f: for line in f: print(line) -- components: IO messages: 261113 nosy: DarkMagus priority: normal severity: normal status: open title: Infinite loop type: behavior versions: Python 3.5

Re: Explaining names vs variables in Python

2016-03-02 Thread Jussi Piitulainen
Chris Angelico writes: > Python defines that every object has an identity, which can be > represented as an integer. Since this is an intrinsic part of the > object, no two distinct objects can truly have identical > characteristics. Python's objects are like rifles - there are

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-03-02 Thread Barun Parruck
Barun Parruck added the comment: So...firstly hi, and sorry for disappearing like that! You want tests for the dis.findlabels library? What sort of tests are you looking for? Similiarly sized bytecode streams like the ones we worked with, or did you have something else in mind? B --

Re: Explaining names vs variables in Python

2016-03-02 Thread Chris Angelico
On Wed, Mar 2, 2016 at 11:34 PM, Marko Rauhamaa wrote: > The ontological question is, can two *distinct* objects with *identical* > characteristics exist? > > The fermionic answer is, no. > > The bosonic answer is, sure. > > Set theory has fermionic ontology (it's called

Re: Explaining names vs variables in Python

2016-03-02 Thread Marko Rauhamaa
Steven D'Aprano : > On Wed, 2 Mar 2016 08:03 pm, Jesper K Brogaard wrote: > >> As I understand it, when you use 'is', you are comparing addresses to >> objects, not the values contained in the objects. Use '==' instead. > > You should not think about addresses, because the

[issue26465] Upgrade OpenSSL shipped with python installers

2016-03-02 Thread Christian Heimes
Christian Heimes added the comment: New security releases of Python are scheduled for the near future, most likelye mid to end of March. -- ___ Python tracker

[issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod

2016-03-02 Thread Vojtěch Pachol
Vojtěch Pachol added the comment: Actually it is a remote fs mounted via samba. OS is Linux. Tracebacks with Python versions I have: $ python2.7 Python 2.7.11 (default, Jan 11 2016, 21:04:40) [GCC 5.3.1 20160101] on linux2 Type "help", "copyright", "credits" or "license" for more information.

[issue26471] load_verify_locations(cadata) should load AUX ASN.1 to supported trusted certs

2016-03-02 Thread Christian Heimes
New submission from Christian Heimes: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_verify_locations can load certs from a file, a directory or from memory. OpenSSL's loaders for cafile and capath load auxiliary data of trusted certs. The custom loader for cadata ignores AUX

[issue26465] Upgrade OpenSSL shipped with python installers

2016-03-02 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker ___

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-03-02 Thread Christian Heimes
New submission from Christian Heimes: OpenSSL 1.1.0 is changing a lot of internals. Most structs are opaque, RC4 and SSLv2 are gone. I've a rough patch in my private repos. I'll submit the patch as soon as the code is compatible with OpenSSL 1.0.2, too.

Re: Everything good about Python except GUI IDE?

2016-03-02 Thread Marko Rauhamaa
Gordon Levi : > I find it difficult to believe that you _love_ updating your contacts > using Emacs even if it gives you an excuse to get some therapy from > Eliza. It seems equally unlikely that you can do without phone numbers > and addresses for your contacts. WP8

[issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux

2016-03-02 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: Is there anything else that I can do for this issue? -- ___ Python tracker ___

Re: How to know if an object is still be referenced?

2016-03-02 Thread jfong
Terry Reedy at 2016/3/2 UTC+8 3:04:10PM wrote: > On 3/1/2016 9:35 PM, jf...@ms4.hinet.net wrote: > > Recently I was puzzled by a tkinter problem. The codes below (from a book) > > can display the picture correctly. > > > > gifdir = "../gifs/" > > from tkinter import * > > win =

[issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod

2016-03-02 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that copy2 should not fail because chmod fails. Could you please provide the entire traceback message when it fails (on both 2.7 and 3.4 or 3.5)? And what OS are you running on, and what filesystem? It looks like the error happens because errno=95

Re: What arguments are passed to the __new__ method ?

2016-03-02 Thread Steven D'Aprano
On Wed, 2 Mar 2016 08:23 pm, ast wrote: > An other question: > > What is the very first method launched when an instantiation is done ? > e.g obj = MyClass(0, 5, 'xyz') > > is it __call__ (from object or MyClass if overriden) ? No, not object or MyClass. The *metaclass* __call__ is called.

Re: Explaining names vs variables in Python

2016-03-02 Thread Salvatore DI DIO
Thank you very much ast and all of you. I better understant now Regards -- https://mail.python.org/mailman/listinfo/python-list

[issue17873] _ctypes/libffi missing bits for aarch64 support

2016-03-02 Thread Berker Peksag
Berker Peksag added the comment: This has been fixed as part of updating libffi in issue 22176: https://github.com/python/cpython/blob/master/Modules/_ctypes/libffi/fficonfig.py.in#L20 Thanks for the report and for the patch, Andreas! -- nosy: +berker.peksag resolution: -> out of

Re: Explaining names vs variables in Python

2016-03-02 Thread ast
"Salvatore DI DIO" a écrit dans le message de news:a894d5ed-d906-4ff7-a537-32bf0187e...@googlegroups.com... It is a little difficult to explain this behavior to a newcommer in Python Can someone give me the right argument to expose ? It is explained with many

Explaining names vs variables in Python (follow)

2016-03-02 Thread Salvatore DI DIO
Thank you very much all of you. I better understand now Regards -- https://mail.python.org/mailman/listinfo/python-list

[issue26466] cannot build python 2.7.11 on AIX

2016-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Does Python 2.7.10 build fine ? If so, then perhaps xlc doesn't like the computed gotos in ceval.c. You could try compiling with: ./configure ... --without-computed-gotos ... to check. -- nosy: +lemburg ___

[issue13492] ./configure --with-system-ffi=LIBFFI-PATH

2016-03-02 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

Re: Explaining names vs variables in Python

2016-03-02 Thread Steven D'Aprano
On Wed, 2 Mar 2016 08:03 pm, Jesper K Brogaard wrote: > As I understand it, when you use 'is', you are comparing addresses to > objects, not the values contained in the objects. Use '==' instead. You should not think about addresses, because the location of objects is not part of the language.

[issue25660] tabs don't work correctly in python repl

2016-03-02 Thread Berker Peksag
Changes by Berker Peksag : -- status: open -> closed ___ Python tracker ___ ___

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

2016-03-02 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

Re: Reason for not allowing import twice but allowing reload()

2016-03-02 Thread Rustom Mody
On Wednesday, March 2, 2016 at 3:45:28 PM UTC+5:30, Rustom Mody wrote: > On Wednesday, March 2, 2016 at 7:53:10 AM UTC+5:30, Ian wrote: > > On Tue, Mar 1, 2016 at 6:19 PM, Steven D'Aprano wrote: > > > On Wed, 2 Mar 2016 09:29 am, Ian Kelly wrote: > > > > > >> There's a big difference between > >

Re: Explaining names vs variables in Python

2016-03-02 Thread Steven D'Aprano
On Wed, 2 Mar 2016 07:32 pm, Salvatore DI DIO wrote: > Hello, > > I know Python does not have variables, but names. > Multiple names cant then be bound to the same objects. Multiple names CAN be bound to the same object: py> x = y = [] py> x is y True py> z = x py> y.append("Hello world!") py>

Re: Reason for not allowing import twice but allowing reload()

2016-03-02 Thread Rustom Mody
On Wednesday, March 2, 2016 at 7:53:10 AM UTC+5:30, Ian wrote: > On Tue, Mar 1, 2016 at 6:19 PM, Steven D'Aprano wrote: > > On Wed, 2 Mar 2016 09:29 am, Ian Kelly wrote: > > > >> There's a big difference between > >> that and clocking a year of uptime just because you can, though. > > > > What

[issue26466] cannot build python 2.7.11 on AIX

2016-03-02 Thread Michael Felt
Michael Felt added the comment: Patched to fp22: vacpp.11.1.0.22.aix53TL7-71.sept2015.ptf.tar.Z after reinstalling system! to be sure no garbage left around. Only updates are openSSL/SSH packages; no RPM's installed. Same error message(s). Tried compiling ceval.o with -O0 (capt. O, zero) -

[issue26469] Bug in ConfigParser when setting new values in extended interpolation

2016-03-02 Thread Michael Jacob
Michael Jacob added the comment: My bad. ConfigParser expects an interpolation object, not a class. Instead of c=ConfigParser(interpolation=ExtendedInterpolation) you need to create it with: c=ConfigParser(interpolation=ExtendedInterpolation()) Sorry about that. -- resolution: ->

Re: Everything good about Python except GUI IDE?

2016-03-02 Thread Gordon Levi
Marko Rauhamaa wrote: >Gordon Levi : > >> Nobody likes filling in forms but how do you suggest converting a form >> based app into something loveable. > >Straight HTML does forms just fine without CSS or JavaScript, yet few >can resist. > >> What

[issue26469] Bug in ConfigParser when setting new values in extended interpolation

2016-03-02 Thread Michael Jacob
New submission from Michael Jacob: There seems to be a bug in configparser when setting new values in extended interpolation: python --version Python 3.5.1 from configparser import ConfigParser, ExtendedInterpolation c=ConfigParser(interpolation=ExtendedInterpolation) c.add_section('test')

Re: Explaining names vs variables in Python

2016-03-02 Thread Jussi Piitulainen
Salvatore DI DIO writes: [- -] > But where is the consistency ? if I try : > v = 890 w = 890 v is w > False I think it goes as follows. Python keeps a cached pool of some numbers that may occur relatively often. When a numerical expression evaluates to a cached value, it returns

Re: What arguments are passed to the __new__ method ?

2016-03-02 Thread ast
"ast" a écrit dans le message de news:56d5d043$0$632$426a7...@news.free.fr... ty for the détailed explanations. An other question: What is the very first method launched when an instantiation is done ? e.g obj = MyClass(0, 5, 'xyz') is it __call__ (from object or

[issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod

2016-03-02 Thread Vojtěch Pachol
New submission from Vojtěch Pachol: `copy2` checks if `os` nodule has `chmod` and then it uses it without thinking. On filesystems that doesn't support `chmod` it ends with OSError: [Errno 95] Operation not supported: which is not acceptable since documentation says "copy2() never

Effects of caching frequently used objects, was Re: Explaining names vs variables in Python

2016-03-02 Thread Peter Otten
Salvatore DI DIO wrote: > Hello, > > I know Python does not have variables, but names. > Multiple names cant then be bound to the same objects. > > So this behavior > b = 234 v = 234 b is v > True > > according to the above that is ok > > > > But where is the consistency ?

Re: Explaining names vs variables in Python

2016-03-02 Thread Antoon Pardon
On 02/03/2016 09:32, Salvatore DI DIO wrote: > Hello, > > I know Python does not have variables, but names. > Multiple names cant then be bound to the same objects. > > So this behavior Python has variables. They are just not the kind of variables you find in C and variations but more like

Re: Explaining names vs variables in Python

2016-03-02 Thread Jesper K Brogaard
Den 02-03-2016 kl. 09:32 skrev Salvatore DI DIO: Hello, I know Python does not have variables, but names. Multiple names cant then be bound to the same objects. So this behavior b = 234 v = 234 b is v True according to the above that is ok But where is the consistency ? if I try : v =

Explaining names vs variables in Python

2016-03-02 Thread Salvatore DI DIO
Hello, I know Python does not have variables, but names. Multiple names cant then be bound to the same objects. So this behavior >>> b = 234 >>> v = 234 >>> b is v True according to the above that is ok But where is the consistency ? if I try : >>> v = 890 >>> w = 890 >>> v is w False It

Re: Everything good about Python except GUI IDE?

2016-03-02 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Mar 2, 2016 at 4:41 PM, Marko Rauhamaa wrote: >> I was talking about JSON for the standard I/O, not the command-line >> arguments, as in: >> >>ps -ef | awk '/httpd/ { print $2 }' >> >> where "ps -ef" emits SPC-separated fields

[issue26466] cannot build python 2.7.11 on AIX

2016-03-02 Thread Michael Felt
Michael Felt added the comment: At first I thought it might be a 0x0001 rather than 0x0003 (as I have no idea what the additional info is AND that the lines starting with [0] are the Symbol 0 (zero) you indicate the message. Also thought it might have been the double listing of some symbols

Re: rdflib subclass problem

2016-03-02 Thread dieter
duncan smith writes: > I'm just getting to grips with RDF and rdflib, and I've hit > something I can't figure out. > > I have a graph with information on two people. (I haven't shown the > imports below because they're scattered around my interactive session > and I

<    1   2