[issue33366] `contextvars` documentation incorrectly refers to "non-local state".

2018-04-27 Thread Tom Christie
Tom Christie added the comment: Refs: https://github.com/python/cpython/pull/6617 -- ___ Python tracker ___

Re: setuptools setup.py commands are unintuitive and undiscoverable (--help-commands should replace --help)

2018-04-27 Thread Thomas Jollans
On 27/04/18 06:06, jimbo1qaz wrote: > Frequently I have encountered projects packaged using setuptools, with a > setup.py. To find out how to install it, I usually turned to Stack Overflow > (https://stackoverflow.com/a/1472014) which doesn't explain what options > exist or do. > > Surprisingly,

Question about Decimal and rounding

2018-04-27 Thread Frank Millman
Hi all I have an object which represents a Decimal type. It can receive input from various sources. It has to round the value to a particular scale factor before storing it. The scale factor can vary, so it has to be looked up every time, which is a slight overhead. I thought I could speed

[issue33366] `contextvars` documentation incorrectly refers to "non-local state".

2018-04-27 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6313 stage: -> patch review ___ Python tracker ___

setuptools setup.py commands are unintuitive and undiscoverable (--help-commands should replace --help)

2018-04-27 Thread jimbo1qaz
Frequently I have encountered projects packaged using setuptools, with a setup.py. To find out how to install it, I usually turned to Stack Overflow (https://stackoverflow.com/a/1472014) which doesn't explain what options exist or do. Surprisingly, neither "setup.py" nor "setup.py --help" doesn't

How to add values from test steps in pytest excel report

2018-04-27 Thread Sum
Hi, I am using python 2.7 and pytest version 3.2.1 I am using pytest excel plugin to run the pytest and generate test report in excel format. Step to install pytest excel : pip install pytest-excel I am running my pytest test using below : py.test --excelreport=report.xls e_test.py Output

Re: Question about Decimal and rounding

2018-04-27 Thread Thomas Jollans
On 27/04/18 10:21, Frank Millman wrote: > Hi all > > I have an object which represents a Decimal type. > > It can receive input from various sources. It has to round the value to > a particular scale factor before storing it. The scale factor can vary, > so it has to be looked up every time,

[issue29652] Fix evaluation order of keys/values in dict comprehensions

2018-04-27 Thread Nick Coghlan
Nick Coghlan added the comment: The current discrepancy is odd when you compare it to the equivalent generator expression: {k:v for k, v in iterable} dict(((k, v) for k, v in iterable)) It would never have occurred to me to expect the evaluation order to match a

[issue33358] [EASY] x86 Ubuntu Shared 3.x: test_embed.test_pre_initialization_sys_options() fails

2018-04-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4114846265536344538ae44cb8ffd8ce2903faf7 by Victor Stinner (Pablo Galindo) in branch 'master': bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)

[issue33361] readline() + seek() on io.EncodedFile breaks next readline()

2018-04-27 Thread Elena Oat
Elena Oat added the comment: I've modified a little your example and it's clearly that the readline moves the cursor. ``` from __future__ import print_function import codecs import io def run(stream): offset = stream.tell() try: stream.seek(0)

[issue33361] readline() + seek() on io.EncodedFile breaks next readline()

2018-04-27 Thread Elena Oat
Elena Oat added the comment: For you specific example I get also a weird result. Tried this in Python 2.7.10 and Python 3.6.0. -- ___ Python tracker

ANN: poliastro 0.9 released 

2018-04-27 Thread Juan Luis Cano
Hi all, It fills us with astronomical joy to announce the release of *poliastro 0.9.0*!  poliastro is a pure Python library that allows you to simulate and analyze interplanetary orbits in a Jupyter notebook in an interactive and easy way, used in academia and the industry by people from all

[issue27277] Fatal Python error: Segmentation fault in test_exceptions

2018-04-27 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: This is an issue with the stack size. It was encountered recently while building Python 3.6 under CentOS 6 [0] and the way to fix it was to increase the maximum stack size using ulimit e.g. [1] [0]

Fwd: Reporting Documentation Bug in Documentation » The Python Tutorial »6.Modules

2018-04-27 Thread VijithNambiar
Hi I think there is a bug in the section https://docs.python.org/3/ tutorial/modules.html#more-on-modules where the outputs of the statements below is given as wrong as it is starting with a '0' >>> import fibo as fib>>> fib.fib(500)0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 >>> import fibo as

[issue33358] [EASY] x86 Ubuntu Shared 3.x: test_embed.test_pre_initialization_sys_options() fails

2018-04-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +6314 ___ Python tracker ___

[issue31727] FTP_TLS errors when use certain subcommands

2018-04-27 Thread Matthieu Pepin
Matthieu Pepin added the comment: I can confirm. I'm having the exact same issue in Python 3.6.5. -- nosy: +Matthieu Pepin ___ Python tracker

[issue33041] Issues with "async for"

2018-04-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 078c4e3519deeef8014541925da057bb064eb5a8 by Victor Stinner in branch 'master': bpo-33041: Fix downcast warning on Windows (#6595) https://github.com/python/cpython/commit/078c4e3519deeef8014541925da057bb064eb5a8 --

[issue33358] [EASY] x86 Ubuntu Shared 3.x: test_embed.test_pre_initialization_sys_options() fails

2018-04-27 Thread miss-islington
miss-islington added the comment: New changeset dd3ede7537653a62815c2fedbb67d6f2fb870d4c by Miss Islington (bot) in branch '3.7': bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)

[issue1692664] warnings.py gets filename wrong for eval/exec

2018-04-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: Time for some bug archaeology! The reason given for not using frame.f_code.co_filename for warnings was that it can be wrong when the path of .pyc files changes. However, it looks like that was fixed in #1180193 (thanks for the pointer

[issue33041] Issues with "async for"

2018-04-27 Thread STINNER Victor
STINNER Victor added the comment: I didn't check if the new warning, fixed by my PR-6595 in the master branch, exists on Windows in 3.6 and 3.7. If it does, you might want to request a backport of my PR. Usually, I only fix compiler warnings in the master branch.

[issue33361] readline() + seek() on io.EncodedFile breaks next readline()

2018-04-27 Thread Elena Oat
Elena Oat added the comment: I've tried this with Python 3.6.0 on OSX 10.13.4 -- ___ Python tracker ___

[issue27277] Fatal Python error: Segmentation fault in test_exceptions

2018-04-27 Thread STINNER Victor
STINNER Victor added the comment: > It was encountered recently while building Python 3.6 under CentOS 6 [0] and > the way to fix it was to increase the maximum stack size using ulimit e.g. [1] In a perfect world, unit tests should not depend on the environment. So Python

Re: Question about Decimal and rounding

2018-04-27 Thread Frank Millman
"Thomas Jollans" wrote in message news:19223891-2006-d496-bdfe-32776834e...@tjol.eu... On 27/04/18 10:21, Frank Millman wrote: > I have an object which represents a Decimal type. > > It can receive input from various sources. It has to round the value to > a particular scale factor before

Passing all pandas DataFrame columns to function as separate parameters

2018-04-27 Thread zljubisic
Hi, I have pandas DataFrame with several columns. I have to pass all columns as separate parameter to a function. Something like this if I have 4 columns. f, p = stats.f_oneway(df_piv.iloc[:, 0], df_piv.iloc[:, 1], df_piv.iloc[:, 2], df_piv.iloc[:, 3]) As number of columns varies, how to do

[issue33370] Addition of mypy cache to gitignore

2018-04-27 Thread Brett Cannon
Brett Cannon added the comment: Python's standard library isn't typed so running mypy on it isn't really beneficial at the moment. Plus you can add .mypy_cache to your global .gitignore file. I'm not saying we can't add it, I'm just saying it isn't a priority. --

[issue33339] Using default encoding with `subprocess.run()` is not obvious

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue33327] Add a method to move messages to IMAPlib

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue33370] Addition of mypy cache to gitignore

2018-04-27 Thread Brett Cannon
Change by Brett Cannon : -- type: -> enhancement ___ Python tracker ___ ___

[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-04-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you. Yes, we require a signed CA for something this non-trivial. Victor, I don't know who maintains configure. If you don't, maybe you know who does. -- nosy: +terry.reedy, vstinner stage: -> patch review

[issue24209] Allow IPv6 bind in http.server

2018-04-27 Thread Jason R. Coombs
Change by Jason R. Coombs : -- nosy: +jason.coombs ___ Python tracker ___ ___

[issue33335] turtle.onkey doesn't pass key information when key is None

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Library (Lib) -Tkinter nosy: +gregorlingl, willingc stage: -> test needed type: behavior -> enhancement versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python

[issue24209] Allow IPv6 bind in http.server

2018-04-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: >From what I can tell, there's not currently any tests for the behavior of >`http.server` as a script, and that sounds like a non-trivial behavior to >test. I agree documentation updates for this change are essential, but I'd >suggest a

[issue33347] zlibmodule undefined reference

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +serhiy.storchaka, twouters versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-04-27 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +6316 ___ Python tracker ___ ___

[issue33351] Support compiling with clang-cl on Windows

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed ___ Python tracker

[issue33352] Windows: test_regrtest fails on installed Python

2018-04-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: On my system: py -3.n -m test.test_regrtest (or test test_regrtest) fails for n in {5, 6, 7}. 2.7 runs, but there are far fewer test methods. Repository builds work fine. -- nosy: +terry.reedy stage: -> needs patch type: ->

[issue33343] [argparse] Add subcommand abbreviations

2018-04-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this as a duplicate of #12713. Paul, if you think that also should be closed, say so there if you have not done so yet. -- nosy: +terry.reedy resolution: -> duplicate stage: -> resolved status: open -> closed

[issue33363] async for statement is not a syntax error in sync context

2018-04-27 Thread Zsolt Dollenstein
Change by Zsolt Dollenstein : -- pull_requests: +6315 ___ Python tracker ___ ___

Understanding pdb result

2018-04-27 Thread Rich Shepard
Running python3-3.6.5 and wxPython-4.0.1 on Slackware-14.2. The module begins this way: #!/usr/bin/env python3 import sys, os import pdb import wx When pdb is invoked and I step through the code I get these results: $ python3 -m pdb openEDMS.py

[issue32608] Incompatibilities with the socketserver and multiprocessing packages

2018-04-27 Thread Michael Durso
Michael Durso added the comment: Hi Antoine, were you able to check out the pull request? I'd like to get the issues resolved so the code can be merged into the next version. Thanks! -- ___ Python tracker

[issue33336] [imaplib] MOVE is a legal command

2018-04-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- type: -> enhancement versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue33373] ttk modules Label class does not respect background config option

2018-04-27 Thread C.D. MacEachern
New submission from C.D. MacEachern : Python tkinter.ttk.Label instance is not respecting background configuration. I'm running 3.6.5 64-bit python with Tk 8.6 on OS X 10.13.4. Here is an output of an interactive session to demonstrate the steps. Notice that the

[issue1692664] warnings.py gets filename wrong for eval/exec

2018-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: I recommend opening a new issue (you can link to this one for past discussion). -- ___ Python tracker

[issue33369] Removing Popen log files in threads is racy on Windows

2018-04-27 Thread Peter Boström
Peter Boström added the comment: Wow that's old, yeah that's fair (I wouldn't expect this to be backported to any old releases). Our current "workaround" is to try os.remove, sleep, repeat X times. This seems still racy and not something we'd like to have in our script if it

Re: Passing all pandas DataFrame columns to function as separate parameters

2018-04-27 Thread Thomas Jollans
On 27/04/18 15:50, zljubi...@gmail.com wrote: > Hi, > > I have pandas DataFrame with several columns. I have to pass all columns as > separate parameter to a function. > > Something like this if I have 4 columns. > > f, p = stats.f_oneway(df_piv.iloc[:, 0], df_piv.iloc[:, 1], df_piv.iloc[:,

ANN: telluric 0.1 released 

2018-04-27 Thread Juan Luis Cano
Hi all, We are pleased to announce the release of telluric 0.1, the first public version of the library! telluric is a MIT licensed Python library to manage vector and raster geospatial data in an interactive and easy way. It lets you read the common vector and raster geospatial formats

[issue1692664] warnings.py gets filename wrong for eval/exec

2018-04-27 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Guido, the new issue is #33375. -- ___ Python tracker ___

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-04-27 Thread Thomas Kluyver
New submission from Thomas Kluyver : The warnings module tries to find and show the line of code which is responsible for a warning, for the same reasons that tracebacks show a line of code from each stack frame. However, they work in quite different ways. Native

[issue33363] async for statement is not a syntax error in sync context

2018-04-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset e2396506606115e785c94ec129eb86e2ed0aa744 by Yury Selivanov (Zsolt Dollenstein) in branch 'master': bpo-33363: raise SyntaxError for async for/with outside async functions (#6616)

[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2018-04-27 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-04-27 Thread Piotr Dobrogost
New submission from Piotr Dobrogost : When building Python 2.7.14 on Fedora 28 I get the following error: [piotr@demon]/tmp/Python-2.7.14% make (…) ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ;

[issue32718] Install PowerShell activation scripts for venv for all platforms

2018-04-27 Thread Brett Cannon
Change by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2018-04-27 Thread Tom Grigg
Change by Tom Grigg : -- nosy: +tgrigg ___ Python tracker ___ ___ Python-bugs-list

[issue33363] async for statement is not a syntax error in sync context

2018-04-27 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks so much! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33363] async for statement is not a syntax error in sync context

2018-04-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset a93a663d6c2fdfbddbda9729c96e2737c0012522 by Yury Selivanov (Zsolt Dollenstein) in branch '3.7': [3.7] bpo-33363: raise SyntaxError for async for/with outside async functions (GH-6616). (GH-6619)

[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-04-27 Thread Tom Grigg
Change by Tom Grigg : -- nosy: +fweimer ___ Python tracker ___ ___ Python-bugs-list

[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-04-27 Thread Tom Grigg
Tom Grigg added the comment: I beleive this is caused by https://bugs.python.org/issue27987 in combination with GCC 8. Florian Weimer proposed a patch which is included in the Fedora build:

[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2018-04-27 Thread cary
New submission from cary : # Description Rolling back a transaction causes all statements associated with that transaction to be reset, which allows the statements to be used again from the pysqlite statement cache. This can interact with various methods on `Cursor` objects

[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-04-27 Thread Ned Deily
Change by Ned Deily : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue33366] `contextvars` documentation incorrectly refers to "non-local state".

2018-04-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +6317 ___ Python tracker ___

[issue33366] `contextvars` documentation incorrectly refers to "non-local state".

2018-04-27 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you, Tom! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Understanding pdb result

2018-04-27 Thread Steven D'Aprano
On Fri, 27 Apr 2018 10:34:27 -0700, Rich Shepard wrote: > Running python3-3.6.5 and wxPython-4.0.1 on Slackware-14.2. > >The module begins this way: > > #!/usr/bin/env python3 > > import sys, os > import pdb > import wx [...] >Please pass me a pointer to a resource that teaches me how

[issue33373] Tkinter ttk Label background ignored on MacOS

2018-04-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: ttk Label backgrounds work fine on Windows and, possibly, Linux (Serhiy?), and even, possibly with tcl/tk 8.6 on macOS (Ned?). tk 8.6 for macOS has gotten several bug fixes. C.D., please download and try out the python.org 3.7.0b3 macOS

I need help with this python regex

2018-04-27 Thread Ed Manning
Here is the source code. import re log = open("csg.txt", "r") # Opens a file call session.txt regex = re.compile(r'policy id \d+') # search for the policy ID regex1 = re.compile(r'log count \d+') # search for the policy ID for match in log: x = regex.findall(match) y =

[issue33372] Wrong calculation

2018-04-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with Tim that this is likely to be the difference between Python 2 truncating division and Python 3 division. For the record, I get the following results: 9997809507L Python 2.7 9997809307.0 Python 3.5 9997809307 R

[issue33372] Wrong calculation

2018-04-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Even Ruby gets the right answer (9997809507) for that :-) Oops, I forgot to say... Ruby 1.8 also does truncating division like Python 2. -- ___ Python tracker

[issue33372] Wrong calculation

2018-04-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: Ah sheesh I copied and pasted the wrong bits. After the division terms go to zero, you get -590072-200112-18-18-18-18-18-18-18-18+9998599835 which goes to 9997809507 as calculated by Ruby and Python 2, and I promise that's the