Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Sun, 01 Jul 2018 17:22:43 -0500, Tim Daneliuk wrote: >> x: int = 3 [...] > This strikes me as syntactic noise. Python is dynamically typed and > will remain so. Why clutter the language - even optionally - with stuff > like this? There's no need to declare x:int = 3 since any linter worth

Infinity [was Re: PEP 526 - var annotations and the spirit of python]

2018-07-03 Thread Steven D'Aprano
On Wed, 04 Jul 2018 12:31:16 +1000, Chris Angelico wrote: [...] >> Ah, I see we're not going to leave it alone. In that case, >> "indefinite" >> is a "number", in that it was a quantity you cited along with the other >> two. If you'd prefer to call it a "quantity", that's fine with me. >> Talk

openstack connection

2018-07-03 Thread jayshankar nair via Python-list
Hi, I am trying to establish a connection to openstack cloud . I am able to establish a connection with the following statement from openstack import connectionconn = connection.Connection(auth_url="http://192.168.0.19:5000/v3",                      project_name="admin",username="admin",     

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 22:03, Ben Finney wrote: Jim Lee writes: I claimed that Steven was using three different numbers to refer to the time it takes to master a subject: 10,000 hours an indefinite number 2 years Yes. He did so in the context of showing that *there is no precise number* that

[issue34010] tarfile stream read performance

2018-07-03 Thread hajoscher
hajoscher added the comment: Yes, it performance is really bad for large files, and memory consumption as well. I will write something for NEWS. -- ___ Python tracker ___

Re: Congrats to Chris for breaking his PEP curse

2018-07-03 Thread Ian Kelly
Now that I've actually read the PEP (sorry, I just assumed it would never fly), I have a couple of (tongue-in-cheek) observations about it: > group = re.match(data).group(1) if re.match(data) else None The only problem with this example of doing more work to save a line of code is that

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Jim Lee writes: > I claimed that Steven was using three different numbers to refer to > the time it takes to master a subject: > > 10,000 hours > an indefinite number > 2 years Yes. He did so in the context of showing that *there is no precise number* that universally applies for the amount of

Re: Python 3.7 configuration issue

2018-07-03 Thread dieter
Robin Becker writes: > On a Ubuntu trusty system I ran > ./configure --prefix=/home/rptlab/PYTHON > make && make install > and get an error related to the ctypes module not being importable. > > I needed to do > > sudo apt-get install libffi-dev > ./configure --prefix=/home/rptlab/PYTHON

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 21:35, Ben Finney wrote: Abdur-Rahmaan Janhangeer writes: apart from programming, other questions go like this : […] *cut at this point* Ooh, I like that last step! How do we make that happen on demand? You could start by not adding to the noise... :) --

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 21:25, Ben Finney wrote: Jim Lee writes: On 07/03/18 19:58, Ben Finney via Python-list wrote: Jim Lee writes: If you were to say John had 2 apples, Jane had 4 apples, and Joe had an indefinite number of apples, how many numbers are we talking about? Three numbers. And

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Abdur-Rahmaan Janhangeer
conversation dies it denotes the end of the picture i was painting Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Abdur-Rahmaan Janhangeer writes: > apart from programming, other questions go like this : > > […] > *cut at this point* Ooh, I like that last step! How do we make that happen on demand? -- \ “Everything you read in newspapers is absolutely true, except | `\for that rare story

[issue34038] urllib2.urlopen fails if http_proxy(s) is set to a sock5 proxy

2018-07-03 Thread T L
New submission from T L : Changing the urlopen call to a curl commnand invoke works. $ export http_proxy=socks5://127.0.0.1: https_proxy=socks5://127.0.0.1: # this will raise an exception with string representation is a blank string # at least for url:

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread Ben Finney
T Berger writes: > On Tuesday, July 3, 2018 at 4:00:03 PM UTC-4, Ben Finney wrote: > > Given that history [of ignoring user requests for improvement], you > > might want to avoid Google Groups for interacting with forums, and > > choose software that works better with discussion forums. I am

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Abdur-Rahmaan Janhangeer
list members have a nice way to wriggle out of the subject ^^_ apart from programming, other questions go like this : asker : what do you think about this python thing? next post : *on track* next post : *on track* next post : *on track* btw thon is the name of a fish in french next post :

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney
Jim Lee writes: > On 07/03/18 19:58, Ben Finney via Python-list wrote: > > Jim Lee writes: > > > >> If you were to say John had 2 apples, Jane had 4 apples, and Joe had > >> an indefinite number of apples, how many numbers are we talking about? > > Three numbers. And “indefinite” is not one of

Re: Congrats to Chris for breaking his PEP curse

2018-07-03 Thread Abdur-Rahmaan Janhangeer
https://www.reddit.com/r/Python/comments/8vmq27/pep_572_assignment_expressions_is_officially/ XD nice feedbacks about the pep Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Wed, 4 Jul 2018, 06:02 Steven D'Aprano, < steve+comp.lang.pyt...@pearwood.info> wrote: > Congratulations

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread T Berger
On Tuesday, July 3, 2018 at 4:00:03 PM UTC-4, Ben Finney wrote: > T Berger writes: > > > I'm posting directly to the forum (computer.lang.python, at this web > > address: > > https://groups.google.com/forum/#!topic/comp.lang.python/vWCvLYjOWUQ) > > Thanks for being specific. So, from that

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 19:58, Ben Finney via Python-list wrote: Jim Lee writes: If you were to say John had 2 apples, Jane had 4 apples, and Joe had an indefinite number of apples, how many numbers are we talking about? Three numbers. And “indefinite” is not one of those numbers. So, no, that doesn't

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Ben Finney via Python-list
Jim Lee writes: > If you were to say John had 2 apples, Jane had 4 apples, and Joe had > an indefinite number of apples, how many numbers are we talking about? Three numbers. And “indefinite” is not one of those numbers. So, no, that doesn't support “"indefinite" is a number”. -- \

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 19:31, Chris Angelico wrote: I've had debates with people about whether "infinity" is a number or not, but I've never yet heard anyone say that "indefinite" is a number. Hmm. This could be interesting. ChrisA If you were to say John had 2 apples, Jane had 4 apples, and Joe had

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Marko Rauhamaa
Grant Edwards : > Found a NetBSD 7.1 system to test on... > > After killing a server with an active connection, a new server can > bind to the same socket regardless of the SO_REUSEADDR setting in > either server. I don't know if that's some sort of system > configuration setting or what... The

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Chris Angelico
On Wed, Jul 4, 2018 at 12:28 PM, Jim Lee wrote: > > > On 07/03/18 16:51, Steven D'Aprano wrote: >> >> >> I love watching pedantically precise people panic and dig themselves into >> a hole. Since I'm an extremely pedantic person myself, I can recognise it >> in others -- especially when they're

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 16:51, Steven D'Aprano wrote: I love watching pedantically precise people panic and dig themselves into a hole. Since I'm an extremely pedantic person myself, I can recognise it in others -- especially when they're not as precisely correct as they think they're being. It was two

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3c452404ae178b742967589a0bb4a5ec768d76e0 by INADA Naoki in branch 'master': bpo-33418: Add tp_clear for function object (GH-8058) https://github.com/python/cpython/commit/3c452404ae178b742967589a0bb4a5ec768d76e0 --

Re: Congrats to Chris for breaking his PEP curse

2018-07-03 Thread Chris Angelico
On Wed, Jul 4, 2018 at 11:59 AM, Steven D'Aprano wrote: > Congratulations to Chris Angelico for breaking the dreaded "any PEP > written by Chris will be rejected" curse :-) I'm actually somewhat astonished at that part. But thanks anyway. ChrisA --

Congrats to Chris for breaking his PEP curse

2018-07-03 Thread Steven D'Aprano
Congratulations to Chris Angelico for breaking the dreaded "any PEP written by Chris will be rejected" curse :-) Guido has announced his intention to accept PEP 572 (assignment expressions) once the PEP has been cleaned up a bit. https://www.python.org/dev/peps/pep-0572/ (The current version

[issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet

2018-07-03 Thread Bradley Laney
Bradley Laney added the comment: Hey again @pablogsal. Thanks for reviewing the email issue again. I'll try to fix and submit a PR for this if that's ok. -- nosy: +Bradley Laney ___ Python tracker

Re: .replace("a" or "b")

2018-07-03 Thread Steven D'Aprano
On Tue, 03 Jul 2018 07:52:42 +0400, Abdur-Rahmaan Janhangeer wrote: > .replace("a" or "b") Oh I *wish* Python accepted that syntax to mean what you thought it meant. That's a common error: a surprising number of beginners are fooled by how close Python is to natural language and try writing

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Tue, 03 Jul 2018 09:14:37 -0700, Jim Lee wrote: > On 07/03/18 01:34, Steven D'Aprano wrote: >> I said *indefinite* not infinite. > > Yes, you did.  My bad. Thanks Jim, your acknowledgement is appreciated. >> You did read the article I linked to, right? You know that people don't >>

[issue32710] test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x

2018-07-03 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-33735: my commit 23401fb960bb94e6ea62d2999527968d53d3fc65 fixes a false alarm in regrtest when hunting leaks in test_multiprocessing_spawn or test_multiprocessing_forkserver. -- ___ Python tracker

[issue32710] test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x

2018-07-03 Thread STINNER Victor
Change by STINNER Victor : -- title: test_asyncio leaked [4, 4, 3] memory blocks, sum=11 on AMD64 Windows8.1 Refleaks 3.x -> test_asyncio: ProactorEventLoopTests.test_sendfile_close_peer_in_middle_of_receiving() leaked [4, 4, 3] memory blocks on AMD64 Windows8.1 Refleaks 3.x

[issue34037] test_asyncio: test_run_in_executor_cancel() leaked a dangling thread on AMD64 FreeBSD 10.x Shared 3.7

2018-07-03 Thread STINNER Victor
New submission from STINNER Victor : AMD64 FreeBSD 10.x Shared 3.7: http://buildbot.python.org/all/#/builders/124/builds/410 ... test_remove_fds_after_closing (test.test_asyncio.test_events.KqueueEventLoopTests) ... ok test_run_in_executor (test.test_asyncio.test_events.KqueueEventLoopTests)

Re: Python 3.7 Windows Help Behaviour

2018-07-03 Thread BlindAnagram
On 03/07/2018 03:41, Terry Reedy wrote: > On 7/2/2018 8:57 PM, Steven D'Aprano wrote: >> On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote: >> >>> On 6/29/2018 6:14 AM, BlindAnagram wrote: In Python 3.7.0 on Windows the help file (python370.chm) displays with a fixed line length and

[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2018-07-03 Thread Eric Snow
Change by Eric Snow : -- nosy: +emilyemorehouse, eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Multi-threading with a simple timer?

2018-07-03 Thread David D
I have some success with this. I am not sure if this would work longer term, as in restarting it, but so far so good. Any issue with this new code? import time from threading import Thread th=Thread() class Answer(Thread): def run(self): a=input("What is your answer:") if

[issue33944] Deprecate and remove pth files

2018-07-03 Thread Eric Snow
Eric Snow added the comment: @barry, make sure you take a look at https://bugs.python.org/issue14803. -- ___ Python tracker ___

[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7681 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset e1ebf51f76037b7e02711aaeb9bf66c9147f4c74 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8069)

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 20ae4c60258479a0732d12af292f422679444e2c by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8070)

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread Ben Finney
T Berger writes: > I'm posting directly to the forum (computer.lang.python, at this web > address: > https://groups.google.com/forum/#!topic/comp.lang.python/vWCvLYjOWUQ) Thanks for being specific. So, from that description, you are using the Google Groups web interface to read and send

[issue29708] support reproducible Python builds

2018-07-03 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: also related to this topic: https://github.com/pypa/pip/pull/5525 for pip's RECORD file. -- ___ Python tracker ___

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +7680 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +7679 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

django-raster rendering raster url

2018-07-03 Thread Xristos Xristoou
i want to add raster functionality in django using postgis database using django-raster package and this docs http://django-raster.readthedocs.io/en/latest/tms.html here my code : models.py from django.contrib.gis.db import models class RasterWithName(models.Model): raster =

[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset d8cba5d16f1333fd625726fc72e66afbd45b8d00 by Antoine Pitrou (Zackery Spytz) in branch 'master': bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918)

[issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change

2018-07-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: It could be many different things. The bottom line here, though, is that the Process class is not designed to be picklable (how would it work?), which is probably why you're seeing this. -- nosy: +pitrou ___

Re: Multi-threading with a simple timer?

2018-07-03 Thread Michael Vilain
The way I've done the "input with timeout" requirement the OP requested is dependent on the operating system. The current implementation of the input function doesn't offer that feature. https://docs.python.org/3/library/functions.html#input In another language, I used low-levelsystem calls

[issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class

2018-07-03 Thread Evgeny Prilepin
Evgeny Prilepin added the comment: I think the line 1031 also contains the misprint and will raise NameError. > self._decompressor = zipfile._get_decompressor(self._compress_type) "zipfile." is not correct code in this place. -- ___ Python

Re: Multi-threading with a simple timer?

2018-07-03 Thread Akkana Peck
David D wrote: > Is there a SIMPLE method that I can have a TIMER count down at a user input > prompt - if the user doesn't enter information within a 15 second period, it > times out. Does this do what you want? from threading import Timer import sys import os def run_later(): print("Timed

[issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux

2018-07-03 Thread Semyon Levin
New submission from Semyon Levin : make install failed with File "/tmp/tmp2gwe2ma_/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", line 3, in File "/common/dev/slevin/tools/Python-3.7.0/Lib/ctypes/__init__.py", line 7, in from _ctypes import Union, Structure, Array

[issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux

2018-07-03 Thread Semyon Levin
Change by Semyon Levin : -- components: +Installation versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33944] Deprecate and remove pth files

2018-07-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think we'll clearly need a PEP for this clean up. I'd like to see a separate "preload" feature as well, especially one that is deterministic and happens before site.py. Not sure if that should be one PEP or two. --

[issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class

2018-07-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch type: crash -> behavior versions: +Python 3.6, Python 3.8 ___ Python tracker ___

[issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class

2018-07-03 Thread Evgeny Prilepin
New submission from Evgeny Prilepin : The misprint in the file lib/zipfile.py in the line 704 leads to AttributeError: '_SharedFile' object has no attribute 'writing' "self.writing()" should be replaced by "self._writing()". I also think this code shold be covered by tests. --

[issue34034] Python 3.7.0 multiprocessing forkserver ForkingPickler behaviour change

2018-07-03 Thread Santiago Hernandez
New submission from Santiago Hernandez : Hi, I am splitting some processing among different processes with the forkserver start method using multiprocessing. In python 3.4 to 3.6 this worked fine. In python 3.7.0 it's breaking with the following Traceback: ``` File

[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-07-03 Thread Błażej Michalik
Błażej Michalik added the comment: I found it. Our app had CLI that was so vast, that it didn't made sense to put all of the 'do_xyz' methods into the same class that would run the interface internals. Instead, we had a child Cmd class that had a "add_command(self, command, func,

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread Richard Damon
On 7/3/18 9:45 AM, Jim Lee wrote: > > > On 07/03/18 08:49, T Berger wrote: >> >>   It would help if my conversations showed up in my gmail, but they >> don't. I thought that would happen when I chose the "Automatically >> subscribe me to email updates when I post to a topic" option in the >> forum

[issue32888] Improve exception message in ast.literal_eval

2018-07-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please wait until issue32892 and issue32893 be committed or rejected before merging this PR. -- dependencies: +Remove specific constant AST types in favor of ast.Constant, ast.literal_eval() shouldn't accept booleans as numbers in AST nosy:

[issue34027] python 3.7 openpty/forkpty build failure using nix package manager macOS environment

2018-07-03 Thread Daiderd Jordan
Daiderd Jordan added the comment: Either patch looks fine to me, should I close the pull request? -- ___ Python tracker ___ ___

[issue1222585] C++ compilation support for distutils

2018-07-03 Thread Dmitry Kalinkin
Change by Dmitry Kalinkin : Added file: https://bugs.python.org/file47669/python-3.8-distutils-C++.patch ___ Python tracker ___ ___

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread Jim Lee
On 07/03/18 08:49, T Berger wrote: It would help if my conversations showed up in my gmail, but they don't. I thought that would happen when I chose the "Automatically subscribe me to email updates when I post to a topic" option in the forum settings. Am I wrong? And is there some way to

Re: Multi-threading with a simple timer?

2018-07-03 Thread David D
This works, but does not do exactly what I want. When the user enters in a correct answer, the program and threading stops. Any ideas on what I should change? import time from threading import Thread class Answer(Thread): def run(self): a=input("What is your answer:") if

Re: Multi-threading with a simple timer?

2018-07-03 Thread David D
This works, but does not do exactly what I want. What I want to happen is : when the user enters in a correct answer, the program and threading stops. Any ideas on what I should change? import time from threading import Thread class Answer(Thread): def run(self):

[issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux

2018-07-03 Thread Matej Cepl
Change by Matej Cepl : -- pull_requests: +7678 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 06:32, Dennis Lee Bieber wrote: On Mon, 2 Jul 2018 19:51:29 -0500, Tim Daneliuk declaimed the following: Except that the current attempt is to use techniques like agile, scrum, pair programming, and so forth to turn programming into a factory activity. High degrees of

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Grant Edwards
On 2018-07-03, Steven D'Aprano wrote: > On Tue, 03 Jul 2018 14:24:26 +, Grant Edwards wrote: >> On 2018-07-03, Dan Stromberg wrote: >> >>> I used to write useful programs that ran in 256 bytes of RAM. >> >> Me too. >> >> Less than 10 years ago. >> >> In a real product. >> >> That's

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Jim Lee
On 07/03/18 01:34, Steven D'Aprano wrote: I said *indefinite* not infinite. Yes, you did.  My bad. You did read the article I linked to, right? You know that people don't suddenly and instantly turn from "beginner" to "expert" when they exceed 9,999 hours 59 minutes and 59 seconds?

Re: File names with slashes [was Re: error in os.chdir]

2018-07-03 Thread Thomas Jollans
On 2018-07-03 14:06, Mikhail V wrote: > Greg wrote: > >> Mikhail V wrote: >>> s= "\"s\"" -> >>> s= {"s"} >> >> But now you need to find another way to represent set literals. > > > I need to find? That comment was not about (current) Python but > rather how I think string should have

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Steven D'Aprano
On Tue, 03 Jul 2018 14:24:26 +, Grant Edwards wrote: > On 2018-07-03, Dan Stromberg wrote: > >> I used to write useful programs that ran in 256 bytes of RAM. > > Me too. > > Less than 10 years ago. > > In a real product. > > That's still shipping. Well don't be shy. Got a link? --

Re: Getting posts to sort chronologically in tree view

2018-07-03 Thread T Berger
On Monday, July 2, 2018 at 2:36:00 PM UTC-4, Dan Stromberg wrote: > On Mon, Jul 2, 2018 at 11:02 AM, T Berger wrote: > > > Is there any way to set posts to appear chronologically in tree view? And > > why is the tree view completely out of order? My last two posts in this > > view are from 6/27

[issue34033] distutils is not reproducible

2018-07-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: I agree that we should fix the underlying issue (marshal) rather than papering over it by sorting. In fact, we should have a test that compiles a bunch of pycs in a random orders and sees if they're the same or not. -- nosy: +benjamin.peterson

[issue34033] distutils is not reproducible

2018-07-03 Thread STINNER Victor
STINNER Victor added the comment: Copy of https://bugzilla.opensuse.org/show_bug.cgi?id=1049186 first message: """ e.g. python-simplejson has one-bit diffs in .pyc files See http://rb.zq1.de/compare.factory-20170713/python-simplejson-compare.out in python3-simplejson.rpm we get -4e50 68

[issue34033] distutils is not reproducible

2018-07-03 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +7677 stage: -> patch review ___ Python tracker ___ ___

[issue29708] support reproducible Python builds

2018-07-03 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-34033: distutils is not reproducible. -- ___ Python tracker ___ ___

[issue34033] distutils is not reproducible

2018-07-03 Thread STINNER Victor
New submission from STINNER Victor : Follow up of bpo-29708: OpenSUSE uses a downstream patch for distutils to fix https://bugzilla.opensuse.org/show_bug.cgi?id=1049186: distutils-reproducible-compile.patch. I converted the patch as a PR: PR 8057. Naoki INADA wrote: """ Currently, marshal

[issue33996] Crash in gen_send_ex(): _PyErr_GetTopmostException() returns freed memory

2018-07-03 Thread STINNER Victor
STINNER Victor added the comment: It's not a bug in Python but in greenlet: * greenlet bug: https://github.com/python-greenlet/greenlet/issues/131 * my greenlet fix: https://github.com/python-greenlet/greenlet/pull/132 * Red Hat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1594248

Re: Multi-threading with a simple timer?

2018-07-03 Thread Chris Angelico
On Wed, Jul 4, 2018 at 12:05 AM, Marko Rauhamaa wrote: > Gregory Ewing : > >> Robin Becker wrote: >>> if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then >>> the timeout function gets called anyway. >> >> Yes, it needs some more stuff around it to make it useful. Probably >> you

[issue34015] doc Add link to Descriptor HowTo Guide in Data Model

2018-07-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't want to do this. The docs are the authoritative source and the how-to is a secondary source that is primarily about how particular descriptors are implemented. -- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved

[issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux

2018-07-03 Thread Matej Cepl
New submission from Matej Cepl : Many Linux distribution (most of them) distinguish between library directory /usr/lib for noarch or 32bit libraries and /usr/lib64. This patch (originally from openSUSE) enables to capture this distinction. -- components: Build files:

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Grant Edwards
On 2018-07-03, Grant Edwards wrote: > On 2018-07-03, Grant Edwards wrote: >> On 2018-07-01, Marko Rauhamaa wrote: >>> Gregory Ewing : >>> I don't see how the address-reuse timeout can be a security measure, because the process trying to take over the address can easily circumvent

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Grant Edwards
On 2018-07-03, Grant Edwards wrote: > On 2018-07-01, Marko Rauhamaa wrote: >> Gregory Ewing : >> >>> I don't see how the address-reuse timeout can be a security measure, >>> because the process trying to take over the address can easily >>> circumvent it by setting SO_REUSEADDR. >> >> [...] >>

[issue24085] large memory overhead when pyc is recompiled

2018-07-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: VmRSS for different versions: malloc jmalloc 2.7: 237316 kB 90524 kB 3.4: 53888 kB 14768 kB 3.5: 51396 kB 14908 kB 3.6: 90692 kB 31776 kB 3.7: 130952 kB 28296 kB 3.8: 130284 kB 27644 kB --

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Grant Edwards
On 2018-07-01, Marko Rauhamaa wrote: > Gregory Ewing : > >> I don't see how the address-reuse timeout can be a security measure, >> because the process trying to take over the address can easily >> circumvent it by setting SO_REUSEADDR. > > [...] > > Nevertheless, the later socket object cannot

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Gene Heskett
On Tuesday 03 July 2018 09:32:52 Dennis Lee Bieber wrote: > On Mon, 2 Jul 2018 19:51:29 -0500, Tim Daneliuk > > declaimed the following: > >Except that the current attempt is to use techniques like agile, > >scrum, pair programming, and so forth to turn programming into > >a factory activity.

Re: Multi-threading with a simple timer?

2018-07-03 Thread Michael Vilain
Won't this code send a signal *regardless* of the user input to the process within 15 seconds. I don't see how it's tied to terminal input. From what I can tell, you need to create your own version of input with a timeout option. This doesn't do that. -- Michael Vilain 650-322-6755 > On

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Jul 3, 2018 at 10:26 PM, Marko Rauhamaa wrote: >> It's crucial that the killed party is the server for the situation to >> arise. >> >> That's why polite clients close their end of the connection before >> the server. Whoever closes first will suffer the TIME-WAIT

[issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet

2018-07-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +easy title: Incorrect usage of unittest.TestCase in test_urllib2_localnet -> [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet ___ Python tracker

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Grant Edwards
On 2018-07-03, Dan Stromberg wrote: > I used to write useful programs that ran in 256 bytes of RAM. Me too. Less than 10 years ago. In a real product. That's still shipping. -- Grant Edwards grant.b.edwardsYow! Are you mentally here

Re: Multi-threading with a simple timer?

2018-07-03 Thread Marko Rauhamaa
Gregory Ewing : > Robin Becker wrote: >> if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then >> the timeout function gets called anyway. > > Yes, it needs some more stuff around it to make it useful. Probably > you also want the signal handler to raise an exception and catch it >

[issue34030] easy_install from Python 3.7 (Win64) cannot install modules

2018-07-03 Thread Ned Deily
Ned Deily added the comment: easy_install is part of the setuptools project and issues with it are handled here: https://github.com/pypa/setuptools/issues https://pypi.org/project/setuptools/ -- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed

Re: EXTERNAL: OSError: [Errno 48] Address already in use

2018-07-03 Thread Chris Angelico
On Tue, Jul 3, 2018 at 10:26 PM, Marko Rauhamaa wrote: > Gregory Ewing : > >> Marko Rauhamaa wrote: >>> Nevertheless, the later socket object cannot unilaterally take over a >>> socket using SO_REUSEADDR. The earlier socket object must have set the >>> same option previously. >> >> I just did an

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Bart
On 01/07/2018 18:06, Abdur-Rahmaan Janhangeer wrote: was viewing pep526, so, finally, python cannot do without hinting the type as other languages? will python finally move to int x = 3 where int is a pre annotation? i am not arguing it's usefulness but rather, does it fit with python? Not in

Re: PEP 526 - var annotations and the spirit of python

2018-07-03 Thread Chris Angelico
On Tue, Jul 3, 2018 at 6:34 PM, Steven D'Aprano wrote: > Or as my wife would say, "did you mean an Aussie couple or an actual > couple?" I meant an Aussie couple, which could be anything from two to > four or five. Six at a stretch. As in, "no worries mate, it'll be ready > in a coupla days." cf

Re: Multi-threading with a simple timer?

2018-07-03 Thread Gregory Ewing
Robin Becker wrote: if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then the timeout function gets called anyway. Yes, it needs some more stuff around it to make it useful. Probably you also want the signal handler to raise an exception and catch it somewhere rather than

[issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto

2018-07-03 Thread Ryan
Ryan added the comment: Okay so I'm an idiot and forgot that I'd commented out the pywinauto import in one of my project files, which is how I found out that was the issue in the first place. Crash is still occurring after a pywinauto reinstall. -- status: closed -> open

[issue24085] large memory overhead when pyc is recompiled

2018-07-03 Thread INADA Naoki
INADA Naoki added the comment: since anon_city_hoods has massive constants, compiler_add_const makes dict larger and larger. It creates many large tuples too. I suspect it makes glibc malloc unhappy. Maybe, we can improve pymalloc for medium and large objects, by porting strategy from

[issue24085] large memory overhead when pyc is recompiled

2018-07-03 Thread INADA Naoki
INADA Naoki added the comment: In case repro2, unreturned memory is in glibc malloc. jemalloc mitigates this issue. There are some fragmentation in pymalloc, but I think it's acceptable level. $ python3 -B repro2.py ready 1079124 VmHWM: 1079124 kB VmRSS: 83588 kB $

  1   2   >