Re: Invoke an independent, non-blocking process from Python 3.6?

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 2:32 PM, wrote: > On Monday, March 26, 2018 at 5:45:40 PM UTC-7, Chris Angelico wrote: >> On Tue, Mar 27, 2018 at 11:18 AM, wrote: >> > I have used multiprocessing before when I wrote some parallelized code. >> > That program required

Re: A question related to the PYTHONPATH

2018-03-26 Thread dieter
oyono writes: > ... > I was thinking, maybe it could have been done this way to enforce not running > module files that are supposed to be bundled into packages as "independant" > python scripts...Therefore, running "python script.py" should be reserved to > effectively

[issue33151] importlib.resources breaks on subdirectories

2018-03-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +5993 stage: -> patch review ___ Python tracker ___

[issue33151] importlib.resources breaks on subdirectories

2018-03-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: is_resource() from zip submodules is also affected -- ___ Python tracker ___

[issue33151] importlib.resources breaks on subdirectories

2018-03-26 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : Found a bug when trying to read a resource from a subpackage in a zip file. I was actually surprised we didn't have a test for this AFAICT, and when I added one, it did fail. I have a PR coming soon. -- assignee: barry

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-26 Thread Ethan Welty
Ethan Welty added the comment: Terry Reedy: I just tried your suggestion of a main clause (code below) and it made no difference. ``` import _tkinter import numpy as np # multiprocessing.set_start_method("spawn") import multiprocessing def parallel_matmul(x): R =

Re: Entering a very large number

2018-03-26 Thread Richard Damon
On 3/26/18 8:46 AM, bartc wrote: On 26/03/2018 13:30, Richard Damon wrote: On 3/26/18 6:31 AM, bartc wrote: The purpose was to establish how such int("...") conversions compare in overheads with actual arithmetic with the resulting numbers. Of course if this was done in C with a version

[issue33144] random._randbelow optimization

2018-03-26 Thread Tim Peters
Tim Peters added the comment: I'm the wrong guy to ask about that. Since I worked at Zope Corp, my natural inclination is to monkey-patch everything - but knowing full well that will offend everyone else ;-) That said, this optimization seems straightforward to me: two

Re: Invoke an independent, non-blocking process from Python 3.6?

2018-03-26 Thread jladasky
On Monday, March 26, 2018 at 5:45:40 PM UTC-7, Chris Angelico wrote: > On Tue, Mar 27, 2018 at 11:18 AM, wrote: > > I have used multiprocessing before when I wrote some parallelized code. > > That program required significant communication between processes, and it's > >

[issue33149] Parser stack overflows

2018-03-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> duplicate ___ Python tracker ___

[issue33149] Parser stack overflows

2018-03-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- superseder: -> s_push: parser stack overflow MemoryError ___ Python tracker ___

[issue33144] random._randbelow optimization

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > the optimized `_randbelow()` also avoids populating its locals > with 5 unused formal arguments Yes, that clean-up would be nice as well :-) Any thoughts on having __init__ set a flag versus using __init__subclass__ to

[issue33149] Parser stack overflows

2018-03-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Duplicate of issue3971 -- nosy: +pablogsal ___ Python tracker ___

[issue30100] WeakSet should allow discard and remove on items that can't have weak references

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > my original motivating case was objects that are hashable but not weakly > referenceable. It is probably not good design to extend discard() to handle types that aren't handled by the other methods. To me, it isn't at all

[issue33144] random._randbelow optimization

2018-03-26 Thread Tim Peters
Tim Peters added the comment: I don't see anything objectionable about the class optimizing the implementation of a private method. I'll note that there's a speed benefit beyond just removing the two type checks in the common case: the optimized `_randbelow()` also avoids

[issue33150] Signature error for methods of class configparser.Interpolation

2018-03-26 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez : I am not sure whether this is already covered by an issue, it is present in 3.6.2 and 3.6.4. The class Interpolation in the configparser module causes an exception: File

[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset c8698cff7ccc8dc730c58523c7ef4113ea8d3049 by Raymond Hettinger (Miss Islington (bot)) in branch '3.6': bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (GH-6267)

[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset f328caf4caafd4521c356af8cb8a299f27603c90 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (#GH-6266)

Re: issues when buidling python3.* on centos 7

2018-03-26 Thread Michael Torrie
On 03/25/2018 10:15 AM, joseph pareti wrote: > The following may give a clue because of inconsistent python versions: > > [joepareti54@xxx ~]$ python -V > Python 3.5.2 :: Anaconda 4.3.0 (64-bit) What does 'which python' return? As Joseph said, hopefully you didn't overwrite /usr/bin/python with

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 6:11:31 PM UTC-5, Python wrote: > On Mon, Mar 26, 2018 at 02:19:12PM -0700, Rick Johnson wrote: [...] > > Hmm. If "syntax parser rules" could prevent poorly > > formatted code, then there'd be no need for style guides. > > It may be telling that my team has minimal

[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5992 ___ Python tracker ___

[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5991 ___ Python tracker ___

[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset da1734c58d2f97387ccc9676074717d38b044128 by Raymond Hettinger (Cheryl Sabella) in branch 'master': bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195)

[issue33144] random._randbelow optimization

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it could also be done at instantiation time (the attached patch > uses __init_subclass__ for that purpose FWIW, a 10-25% speedup is only possible because the remaining code is already somewhat fast. All that is being

[issue33148] RuntimeError('Event loop is closed') after cancelling getaddrinfo and closing loop

2018-03-26 Thread Nathaniel Smith
Nathaniel Smith added the comment: Yeah, getaddrinfo isn't actually cancellable (because it's a blocking call that has to be run in a thread), but it's side-effect-free so if the user requests that it be cancelled then it's safe to return immediately while it keeps running in

[issue33114] random.sample() behavior is unexpected/unclear from docs

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > However, let me argue my case one more time, and if you still disagree, feel > free to close this. Thank you for expressing your ideas so clearly. However, I'm going to go with Tim's recommendation and leave the docs as

Re: Invoke an independent, non-blocking process from Python 3.6?

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 11:18 AM, wrote: > I have used multiprocessing before when I wrote some parallelized code. That > program required significant communication between processes, and it's > overkill for my purpose here. I don't need communication between the >

RE: issues when buidling python3.* on centos 7

2018-03-26 Thread Joseph L. Casale
-Original Message- From: Python-list On Behalf Of joseph pareti Sent: Sunday, March 25, 2018 10:15 AM To: python-list@python.org Subject: issues when buidling python3.* on centos 7 > The following may give a clue because of inconsistent python versions: > > [joepareti54@xxx ~]$ python

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 10:10 AM, Python wrote: > Ruby touts itself as being a simple language with elegant syntax. > This thread is my only exposure to it to date, but what I've seen here > is, frankly, the exact opposite of that. You should not need a map to >

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Ned Batchelder
On 3/26/18 7:10 PM, Python wrote: Humans are already good enough at making mistakes that they require no additional encouragement, such as what is provided by allowing such syntactical horrors. Agreed. And that's why we must respect and follow the code styling wisdom which has been passed down

Invoke an independent, non-blocking process from Python 3.6?

2018-03-26 Thread jladasky
Hi folks, I've run into an odd situation. I have a custom USB peripheral device which generates real-time data. I monitor this device using a PyQt5 app that I wrote. Periodically I want to capture some of this data in files. Because of a transient OS bug which apparently involves a corner

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
Isaac Elliott added the comment: Because of the way recursive descent parsing works, [[ is actually the minimal input required to reproduce this in python3. In python2, the bug

Re: String Formatting with new .format()

2018-03-26 Thread W Yg
在 2018年3月26日星期一 UTC+8下午11:37:46,Ganesh Pal写道: > Hi Team, > > Just a quick suggestion, on string formatting with .format() which of the > below is better , given both give the same result . > > >>> attempts = 1 > >>> msg2 = "Hello" > >>> print "Retry attempt:{0} for

[issue33149] Parser stack overflows

2018-03-26 Thread Isaac Elliott
New submission from Isaac Elliott : python3's parser stack overflows on deeply-nested expressions, for example:

Re: A question related to the PYTHONPATH

2018-03-26 Thread oyono
Le lundi 26 mars 2018 08:11:02 UTC+2, dieter a écrit : > adrien oyono writes: > > I have recently read the documentation about how imports work on python, > > and I was wondering why, when you execute a python file, the current > > directory is not added by default to the

Fw: Fwd: Welcome to the "Python-list" mailing list

2018-03-26 Thread nadir musallam
Dear All, I have tried installing Python3.6.4 on my computer as I am eager to begin a new career in data analytics. However I am running in to some problems when attempting to set up the software. I have downloaded Dev C++ software as per your recommendation earlier but still getting the same

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 02:19:12PM -0700, Rick Johnson wrote: > On Monday, March 26, 2018 at 3:09:38 PM UTC-5, Python wrote: > > On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: > [...] > > > Ruby followed the rules. > > > But you didn't. > > > > Nonsense... Your language's syntax

Fwd: Fwd: ftplib sending data out of order

2018-03-26 Thread Charles Wilt
Just to close out this thread in case anybody finds it... We're reasonably sure the issue was cause by version 14.6 MP1 of Symantec Vontu; which is a Data Loss Prevention (DLP) product that "inspects" packets before they leave the PC. I believe the issue was reported to Symantec. In the

[issue33148] RuntimeError('Event loop is closed') after cancelling getaddrinfo and closing loop

2018-03-26 Thread Vitaly Kruglikov
New submission from Vitaly Kruglikov : I see this exception on the terminal: ``` exception calling callback for Traceback (most recent call last): File

please test the new PyPI (now in beta)

2018-03-26 Thread Sumana Harihareswara
The new Python Package Index at https://pypi.org is now in beta. This means the site is robust, but we anticipate needing more user testing and changes before it is "production-ready" and can fully replace https://pypi.python.org . We hope to complete the transition before the end of April 2018.

[issue32873] Pickling of typing types

2018-03-26 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32873] Pickling of typing types

2018-03-26 Thread miss-islington
miss-islington added the comment: New changeset d0e04c82448c750d4dc27f2bddeddea74bd353ff by Miss Islington (bot) in branch '3.7': bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

Re: [OT] multicore/cpu history

2018-03-26 Thread Gene Heskett
On Monday 26 March 2018 12:12:46 Dennis Lee Bieber wrote: > On Mon, 26 Mar 2018 11:30:54 -0400, Gene Heskett > > > declaimed the following: > >On Monday 26 March 2018 10:06:36 Dennis Lee Bieber wrote: > > > > >>As I recall, the bootloader on the Raspberry Pi runs

[issue32873] Pickling of typing types

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5990 ___ Python tracker ___

[issue32873] Pickling of typing types

2018-03-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 834940375ae88bc95794226dd8eff1f25fba1cf9 by Ivan Levkivskyi in branch 'master': bpo-32873: Treat type variables and special typing forms as immutable by copy and pickle (GH-6216)

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 3:09:38 PM UTC-5, Python wrote: > On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: [...] > > Ruby followed the rules. > > But you didn't. > > Nonsense... Your language's syntax parser is what defines > the rules. All of the expressions Stephen wrote did

Re: Entering a very large number

2018-03-26 Thread Christian Gollwitzer
Am 26.03.18 um 12:31 schrieb bartc: On 26/03/2018 10:34, Steven D'Aprano wrote: So what exactly did you do? I did this: def fn():     C = int(     "28871482380507712126714295971303939919776094592797"     "22700926516024197432303799152733116328983144639225"    

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread miss-islington
miss-islington added the comment: New changeset 57db13e582ad269d6e067fe934122207cc992739 by Miss Islington (bot) in branch '3.6': bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)

[issue33146] contextlib.suppress should capture exception for inspection and filter on substrings

2018-03-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: What kind useful information to you expect to get before an exception is raised? For example: with suppress(FileNotFoundError) as e: os.remove(somefile) What could *e* possibly be that would be useful. AFAICT,

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread miss-islington
miss-islington added the comment: New changeset 05455637f3ba9bacd459700f4feab783e5967d69 by Miss Islington (bot) in branch '3.7': bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 11:37:35AM -0700, Rick Johnson wrote: > > Because of this "fix", the printed strings no longer match > > the code being executed, but the strange, inconsistent > > behaviour still occurs. > > The supposed "inconsistent behavior" here has absolutely > nothing to do with

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 5:37 AM, Rick Johnson wrote: > The supposed "inconsistent behavior" here has absolutely > nothing to do with Ruby, no, it's all on _you_. _YOU_ are > the one who created a non-sensical function with a single > char name; and _YOU_ are the one

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5989 ___ Python tracker ___

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Mon, Mar 26, 2018 at 10:43:32AM +, Steven D'Aprano wrote: > The kicker is that out of these four legal, parenthesis-free ways of > calling function a, *three* of them interpret the expression as: > > call a with no arguments > then add b using the binary plus operator > > but the

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5988 ___ Python tracker ___

[issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed

2018-03-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 0e7144b064a19493a146af94175a087b3888c37b by Gregory P. Smith (Alexey Izbyshev) in branch 'master': bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Python
On Sun, Mar 25, 2018 at 10:33:49AM -0700, Rick Johnson wrote: > > [steve@ando ruby]$ ruby ws-example.rb > > a + b => 7 > > a+b => 7 > > a+ b => 7 > > a +b => 3 > > > > Here's the source code: > > > > # --- cut --- > > def a(x=4) > > x+2 > > end > > > > b = 1 > > print "a + b => ", (a + b),

[issue33128] PathFinder is twice on sys.meta_path

2018-03-26 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +3.7regression nosy: +brett.cannon ___ Python tracker ___

Re: A question related to the PYTHONPATH

2018-03-26 Thread Ian Kelly
On Mon, Mar 26, 2018 at 1:24 PM, Dan Stromberg wrote: > On Sun, Mar 25, 2018 at 11:10 PM, dieter wrote: >> adrien oyono writes: >>> I have recently read the documentation about how imports work on python, >>> and I was wondering

[issue4819] Misc/cheatsheet needs updating

2018-03-26 Thread Mark Dickinson
Mark Dickinson added the comment: Given that Misc/cheatsheet doesn't exist any more in the Python 3 repo, and Python 2 is nearing end-of-life, I suspect this should just be closed. -- stage: needs patch -> resolved status: pending -> closed

Re: A question related to the PYTHONPATH

2018-03-26 Thread Dan Stromberg
On Sun, Mar 25, 2018 at 11:10 PM, dieter wrote: > adrien oyono writes: >> I have recently read the documentation about how imports work on python, >> and I was wondering why, when you execute a python file, the current >> directory is not added by

[issue1704621] interpreter crash when multiplying large lists

2018-03-26 Thread Guido van Rossum
Guido van Rossum added the comment: @imz Please file a new issue. -- ___ Python tracker ___

[issue1704621] interpreter crash when multiplying large lists

2018-03-26 Thread Ivan Zakharyaschev
Ivan Zakharyaschev added the comment: Hi! This is broken for tuples (but not for lists, as in the example here) in 2.7.14 for me. Should we reopen this issue and fix it better? [builder@localhost ~]$ python Python 2.7.14 (default, Nov 7 2017, 17:07:17) [GCC 6.3.1

Re: Ruby parens-free function calls [was Re: Accessing parent objects]

2018-03-26 Thread Rick Johnson
On Monday, March 26, 2018 at 5:46:03 AM UTC-5, Steven D'Aprano wrote: > Rick, you're supposedly familiar with Ruby. And yet, you > didn't notice that your supposed "fix" didn't touch any > executable code, all it did was modify the strings being > printed. Because the goal was to *UN-OBFUSCATE*

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the bug report. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread miss-islington
miss-islington added the comment: New changeset c6147acd2ce5fa9e344f179b539f3b21b9ae1a6d by Miss Islington (bot) in branch '3.7': bpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument. (GH-6260)

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2018-03-26 Thread Rolf Eike Beer
Rolf Eike Beer added the comment: So, what is the problem with this? Either the compiler knows that unaligned accesses are no problem and optimizes them away anyway, or it is kept because it would crash otherwise. I can confirm that no sparc version >= 3.5 (have not tried

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +5987 ___ Python tracker ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset de7a2f04d6b9427d568fcb43b6f512f9b4c4bd84 by Eric V. Smith in branch 'master': bpo-33141: Have dataclasses.Field pass through __set_name__ to any default argument. (GH-6260)

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Rick Teachey
Rick Teachey added the comment: Looks great to me. Thanks! -- ___ Python tracker ___ ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: I've updated the PR. I left those lines in, and added a different test. After all, it does need to work with real descriptors. -- ___ Python tracker

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Rick Teachey
Rick Teachey added the comment: Yeah and I think lines 2709-2712 of TestDescriptors also needs removed. -- ___ Python tracker ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I noticed the same thing. I'll remove the test. -- ___ Python tracker ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Rick Teachey
Rick Teachey added the comment: Eric, looking at the PR; note that if you do this for the __set_name__ check: if inspect.ismethoddescriptor(self.default): ...an object like the one below will not get its __set_name__ called, even though PEP 487 says it should: class

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2018-03-26 Thread Rolf Eike Beer
Change by Rolf Eike Beer : -- pull_requests: +5986 ___ Python tracker ___ ___

[issue33147] Update references for RFC 3548 to RFC 4648

2018-03-26 Thread Paul Hoffman
Paul Hoffman added the comment: I signed the contributor agreement form on 2017-06-23 -- ___ Python tracker ___

[issue33145] unaligned accesses in siphash24() lead to crashes on sparc

2018-03-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Actually this looks like a duplicate of issue28055. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pyhash's siphash24 assumes alignment of the data

[issue33147] Update references for RFC 3548 to RFC 4648

2018-03-26 Thread Paul Hoffman
New submission from Paul Hoffman : serhiy-storchaka asked me to open an issue about whether Python implements RFC 4648. As far as I can tell it does, correctly, for the parts of RFC 4648 covered in the doc. My PR was about simply updating a reference to an RFC that was

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: I don't expect there to be too much usage of Field objects, so I'm not so worried about it. If you can, try out the code in the PR. Thanks. -- ___ Python tracker

[issue33146] contextlib.suppress should capture exception for inspection and filter on substrings

2018-03-26 Thread Jason R. Coombs
New submission from Jason R. Coombs : I propose the following expansion of the interface of contextlib.suppress. Currently, when entering the context, suppress returns None. Instead, it could return an object that provides some detail about the exception. Inspiration for an

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +5984 stage: -> patch review ___ Python tracker ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Rick Teachey
Rick Teachey added the comment: I suppose one downside of that solution is __set_name__ will be called for every Field whether or not it is need. Probably can't be helped without major complications. -- ___ Python tracker

Re: Pip Version Confusion

2018-03-26 Thread Rob Gaddi
On 03/24/2018 08:40 AM, Tim Johnson wrote: I'm on Ubuntu 16.04. I'm getting the following message from pip: You are using pip version 8.1.1, however version 9.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. # But then I get this :

[issue33145] unaligned accesses in siphash24() lead to crashes on sparc

2018-03-26 Thread Rolf Eike Beer
Change by Rolf Eike Beer : -- components: Library (Lib) nosy: Dakon priority: normal pull_requests: 5983 severity: normal status: open title: unaligned accesses in siphash24() lead to crashes on sparc versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

Re: Getting "LazyImporter' object is not callable" error when trying to send email using python smtplib

2018-03-26 Thread Sum
Thanks Steve for your inputs. Now I am able to run the code successfully. # Made changes to import statements as below: from email.mime.base import MIMEBase from email.mime.text import MIMEText Apologies for the typo and indentation error in above mail. Regards, Sumit On Mon,

[issue31920] pygettext ignores directories as inputfile argument

2018-03-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5982 stage: needs patch -> patch review ___ Python tracker ___

[issue24356] venv documentation incorrect / misleading

2018-03-26 Thread Steven Downum
Change by Steven Downum : -- nosy: +steven.downum ___ Python tracker ___ ___

Re: String Formatting with new .format()

2018-03-26 Thread Chris Angelico
On Tue, Mar 27, 2018 at 2:37 AM, Ganesh Pal wrote: > Hi Team, > > Just a quick suggestion, on string formatting with .format() which of the > below is better , given both give the same result . > attempts = 1 msg2 = "Hello" print "Retry attempt:{0} for

Re: [OT] multicore/cpu history

2018-03-26 Thread Gene Heskett
On Monday 26 March 2018 10:06:36 Dennis Lee Bieber wrote: > On Mon, 26 Mar 2018 10:02:15 + (UTC), Steven D'Aprano > > declaimed the following: > >Hardware people can probably tell you what it is that CPUs do that > > FPUs and GPUs don't do. Or

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Rick Teachey
Rick Teachey added the comment: Sounds like a relatively easy solution then. Hopefully it makes the beta 3 so I can use it immediately- thanks! -- ___ Python tracker

String Formatting with new .format()

2018-03-26 Thread Ganesh Pal
Hi Team, Just a quick suggestion, on string formatting with .format() which of the below is better , given both give the same result . >>> attempts = 1 >>> msg2 = "Hello" >>> print "Retry attempt:{0} for error:{1}".format(attempts,msg2) Retry attempt:1 for error:Hello OR >>> attempts = 1 >>>

Re: Entering a very large number

2018-03-26 Thread Chris Angelico
On Mon, Mar 26, 2018 at 11:46 PM, bartc wrote: > On 26/03/2018 13:30, Richard Damon wrote: >> >> On 3/26/18 6:31 AM, bartc wrote: > > >>> The purpose was to establish how such int("...") conversions compare in >>> overheads with actual arithmetic with the resulting numbers. >>>

[issue31201] make test: module test that failed doesn't exist

2018-03-26 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +easy stage: -> needs patch title: module test that failed doesn't exist -> make test: module test that failed doesn't exist type: -> enhancement versions: +Python 3.7, Python 3.8 ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: Nick Coghlan suggested (on python-dev) to have Field implement __set_name__ and call through to the default value, if it exists. That approach seems to work fine. I'll generate a PR with tests sometime before today's release. --

[issue6986] _json crash on scanner/encoder initialization error

2018-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7c2d97827fd2ccd72ab7a98427f87fcfe3891644 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-6986: Add a comment to clarify a test of _json.make_encoder(). (GH-3789)

[issue31504] Documentation for return value for string.rindex is missing when search string is empty

2018-03-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue33144] random._randbelow optimization

2018-03-26 Thread Wolfgang Maier
New submission from Wolfgang Maier : Given that the random module goes a long way to ensure optimal performance, I was wondering why the check for a match between the random and getrandbits methods is performed per call of Random._randbelow, when it

[issue33114] random.sample() behavior is unexpected/unclear from docs

2018-03-26 Thread Scott Eilerman
Scott Eilerman added the comment: Raymond, Tim, thanks for your replies so far. I understand (and for the most part, agree with) your points about not being able to list every behavior, and not wanting to cause uncertainty in users. However, let me argue my case

Synthesize a new series

2018-03-26 Thread qrious
I have a set of series of numbers. The set bears some common property about the series. For example, in one case, Series 1 can be the set of random number of odd numbers starting from 1 and Series N can be the set of random number of odd numbers starting from N. In another case, Series 1 can

  1   2   >