[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The new items can be new issues, with 6 maybe the highest priority.  Currently
:1: DeprecationWarning: invalid escape sequence \e
becomes
Warning (from warnings module):
  File "", line 1
'\e'
DeprecationWarning: invalid escape sequence \e

For both Shell and Editor input, the Warning Line is not really needed.  For 
Shell, the fake filename is not needed, nor is the line # and line if somehow 
otherwise marked.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

To review: Serhiy reported 3 'IDLE' bugs: tripled DeprecationWarning (now 
joined by SyntaxWarning), printing to console (if available) instead of Shell, 
and an exit exception.

1. Codeop generates the tripicates; #40807 will fix that.
2. PR-15311 prints warnings to Shell, but I held off  pending some fix.  3. The 
exception (a duplicate report) was fixed on #35623.
4. PR-15500 stopped turning a SyntaxWarning into a SyntaxError.

Additional issues, semi-independent.
5. REPL prints warning after code, IDLE before
6. REPL prints 1 line, IDLE 4, but this is related to Shell warnings going to 
the console.  IDLE should use 1 and highlight.
7. Should IDLE extend scope of deduplication?  Yes with 4 lines, maybe not with 
1 line.
8. REPL partially deduplicates within compound statement; see #40807.

--
versions:  -Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40805] Can no longer patch flask.g

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Sorry, but I believe you were misdirected*.  mock, as opposed to unittest.mock, 
pytest, flask, and werkzeug  are 3rd party modules.  The error report seems to 
be missing part of the stacktrace at both ends.  What line is your file 
resulted in the error?  (This time we can guess == @patch. @What called 
_lookup_app_object in flask?  (I have no idea.)

However, once contextlib._GeneratorContextManager calls next(self.gen), the 
rest of the trace is outside the stdlib.  At the end, the RuntimeError is 
raised by flask, not by python, because the flask _app_ctx_stack.top does not 
exist.  If you do not understand their error message, ask flask people.

* I assume that cjw296 *glanced* at your report, saw 'RuntimeError', and too 
quickly assumed 'cpython error'.  flask could have defined, for instance, 
FlaskRuntimeError for its error reporting.

--
nosy: +terry.reedy
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2020-05-29 Thread Kyle Stanley


Kyle Stanley  added the comment:

> is there a workaround for earlier Python versions that does not involve 
> patching the standard library?

You could potentially try using the new default watcher, 
`ThreadedChildWatcher`, by implementing it locally and setting it as the child 
watcher to use (instead of `SafeChildWatcher`) with `set_child_watcher()`. 
AFAICT, the current implementation should work well for earlier versions of 
Python that don't have it, we just can't include it earlier than 3.8 since it's 
a new feature.

See 
https://github.com/python/cpython/blob/4649202ea75d48e1496e99911709824ca2d3170e/Lib/asyncio/unix_events.py#L1326
 for reference.

--
nosy: +aeros

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40804] Bug report in python3.6.8 using argparse module

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3.6 has only gotten security fixed for 1.5 years.  We need a test file that can 
be run as is in the master branch to see if there is a current bug.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Something rebuilds the online docs once a day.  That same something might be 
appropriate for running a link checker (including external links) once a week, 
say.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38324] [Windows] test_locale and test__locale failures on Windows

2020-05-29 Thread Tiago Illipronti Girardi


Change by Tiago Illipronti Girardi :


--
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38324] [Windows] test_locale and test__locale failures on Windows

2020-05-29 Thread Tiago Illipronti Girardi


Change by Tiago Illipronti Girardi :


--
nosy: +TIGirardi
nosy_count: 7.0 -> 8.0
pull_requests: +19773
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20529

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset ef2f9acf8fc813f66523e7702654f919d20ff0c3 by Miss Islington (bot) 
in branch '3.8':
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
https://github.com/python/cpython/commit/ef2f9acf8fc813f66523e7702654f919d20ff0c3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 78cf711d1ff261b6be359d6c12f47dd0997546b2 by Miss Islington (bot) 
in branch '3.9':
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
https://github.com/python/cpython/commit/78cf711d1ff261b6be359d6c12f47dd0997546b2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset f165647e3d2addd03d0393f4f5d31bd1cc9b74a2 by Miss Islington (bot) 
in branch '3.7':
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
https://github.com/python/cpython/commit/f165647e3d2addd03d0393f4f5d31bd1cc9b74a2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19771
pull_request: https://github.com/python/cpython/pull/20527

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 4649202ea75d48e1496e99911709824ca2d3170e by Samuel Gaist in 
branch 'master':
closes bpo-29017: Update the bindings for Qt information with PySide2 (GH-20149)
https://github.com/python/cpython/commit/4649202ea75d48e1496e99911709824ca2d3170e


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19772
pull_request: https://github.com/python/cpython/pull/20528

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19770
pull_request: https://github.com/python/cpython/pull/20526

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I make 5 core developers who agree that csv should definitely *not* assume that 
bytes given to it represent encoded text, reverting to the confusion of Python 
1 and 2.  (And even it if did, it should not assume that the encoding of the 
given to it and the encoding of the file are the same, or even that all bytes 
given to it have the same encoding!)

If a user does not like the current default wonky mixed ascii-hex string 
representation of bytes, the user should explicitly convert bytes to the 
representation they want.  Here are just 3 examples, 2 with possible variations.

>>> b'\xc2a9'.hex()  # One might want to add prefix '0x' or r'\x'.
'c26139' # Or add a separator.
>>> str(list(b'\xc2a9'))  # One might want to change or strip brackets, 
'[194, 97, 57]'   # change separator, or strip spaces.
>>> b'\xc2a9'.decode('latin-1')
'Âa9'

What is best depends on the expected reader of the output.  Pandas users who 
don't like Pandas' csv output should talk to its authors.  They are welcome to 
ask advice on python-list.

Eric: I agree that adding 'strict=False' might be a good idea (in a new issue).

--
nosy: +terry.reedy
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: I cannot download python files from external source.

2020-05-29 Thread MRAB

On 2020-05-30 00:55, Michio Suginoo wrote:
Yes, it’s clear to me what you wrote. I was just communicating what 
happened when I tried to download python files from external sources.


My question is how I can enable the installed Python (Anaconda) to 
download files from external sources.


Thanks


Please keep this on python-list.

How you download files depends on what/where they are. Some are 
downloaded via a browser (probably how you got Anaconda); some via FTP; 
if you're using version control software such as Git (GitHub), via that; 
if you're talking about Python modules and extensions on PyPI, via pip.



On Fri, 29 May 2020 at 18:01 MRAB > wrote:


On 2020-05-29 21:24, Michio Suginoo wrote:
> Hi
>
> I installed python via Anaconda some months ago.
> And since then, I could not download python files from external
sources.
> Basically, every time I tried to download python files, the
python system
> that I installed via Anaconda gives me a system message with
three options:
>
>     - Modify (add or modify individual features),
>     - Repair (ensure all current features are correctly
installed), and
>     - Uninstall (remove the entire Python 3.7.4 (32 bit)
installation).
>
> Basically, none of these choices is what I want. I simply want
to download
> a python file and open it in Jupyter Notebook.
>
> As an example, if I choose Repair, this will give me another
system message
> saying ‘Repair was successful’. But nothing else. At the end, I
do not get
> what I want, the python file that I wanted to download from an
external
> source.
>
> I just wonder what causes this problem. I would appreciate it if
you can
> provide me a solution to resolve this problem.
>
That program is an installer for Python. It's only purpose is to
install
or uninstall Python, and nothing else. It's not for downloading
other files.
-- 
https://mail.python.org/mailman/listinfo/python-list


--
Michio Suginoo,
Chartered Financial Analyst^®
^
Website:

www.reversalpoint.com ;
www.monetarywonderland.com 

Social Network:
https://au.linkedin.com/in/reversalpoint 


--
https://mail.python.org/mailman/listinfo/python-list


[issue40754] Test installers before releasing (ModuleNotFoundErrors)

2020-05-29 Thread Ned Deily


Ned Deily  added the comment:

> So it seems that only Linux has "installed" builbot tests. I suppose the next 
> step is adding some macOS and Windows ones.

Having more buildbots test from "installed" locations, rather than the build 
directory, is good.

But that's not the whole issue here. Those "installed" tests are only testing 
that a Python runs from an installed location on the same system it was built.  
The Windows and macOS installers use various packaging methods to provide 
complete Python installations, including binaries, that can be installed on 
other systems using various OS-native install methods familiar to users of each 
platform. And the binaries are generally built in such a way to support running 
on multiple release versions of its operating system. For example, the current 
Python installers for macOS from python.org are usable on macOS 10.9 through 
10.15. To produce the various installer packages, there are other layers of 
tooling involved, say, on top of "make install" in the Unixy build process for 
macOS; something similar is true for Windows releases.

FWIW, every macOS installer is test installed on a vanilla system, the whole 
standard test suite is run, and an IDLE smoke test is run to ensure there are 
no noticeable regressions before handing the build artifacts off to the release 
manager. Every installer is tested on at least one supported macOS version and 
usually more than one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40754] Test installers before releasing (ModuleNotFoundErrors)

2020-05-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We have a bunch of buildbots that test the installed Python. For instance, if 
you search for "installed" in 
https://buildbot.python.org/all/#/builders?tags=%2B3.x we have:

aarch64 Fedora Rawhide Clang Installed 3.x  
aarch64 Fedora Stable Clang Installed 3.x   
AMD64 Fedora Rawhide Clang Installed 3.x
AMD64 Fedora Stable Clang Installed 3.x
PPC64LE Fedora Rawhide Clang Installed 3.x
PPC64LE Fedora Stable Clang Installed 3.x
s390x Fedora Clang Installed 3.x
s390x Fedora Rawhide Clang Installed 3.x
x86 Gentoo Installed with X

So it seems that only Linux has "installed" builbot tests. I suppose the next 
step is adding some macOS and Windows ones.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40759] Deprecate the symbol module

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If PEG does not use this file, then not deprecating it along with parser in 3.9 
could be considered a bug.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40754] Test installers before releasing (ModuleNotFoundErrors)

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified that running tests for installed 64-bit 3.9.0b1 on Win10 is somewhat 
a joke.  I got 22 failures.  Multiple tests failed on missing 
_testinternalcapi, and at least 1 on _xxtestfuzz.  Several tests had multiple 
failures and would need to be run individually and verbosely to see why.  For 
instance, test_itertools tries to run test.support.__init__.checksizeof 4 
times, and the latter imports _testinternalcapi, resulting is 4 failures.

Release managers: I think installers should be run and the suite run with the 
result.  This is not the first time a file has been omitted.  One needed by 
IDLE was once omitted, I believe on Windows.  There is now a test that reads 
it, but is useless unless run.  (And I should add checks for all the other 'not 
.py' files.)

honglei: Thank you for both posts.  Next time, please remove the quoted message 
when replying by email.  Once posted on the web page, below the quoted message, 
the quote becomes redundant noise.

--
nosy: +lukasz.langa, ned.deily, pablogsal, terry.reedy
title: ModuleNotFoundError: No module named '_testinternalcapi' under Win10 -> 
Test installers before releasing (ModuleNotFoundErrors)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-05-29 Thread Chris Meyer


Change by Chris Meyer :


--
keywords: +patch
pull_requests: +19769
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20525

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40133] Provide additional matchers for unittest.mock

2020-05-29 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage: resolved -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39343] Travis CI: documentation job fails in library/nntplib.rst with random network issue on news.gmane.io

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

gmane was down for maybe a day early this week.  We should expect this to 
continue happening on and off, as it has for years (I use it daily).  I suggest 
that we run the test when we can and skip (or connect elsewhere) when we cannot.

try:
s = NNTP('news.gmane.io')
except ConnectionRefusedError as e:
self.skipTest(f'Gmane down: {e}')

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

hang.py uses the default multiprocessing start method, which was then 'fork'.  
It is now 'spawn' on macOS.  And there have been many other changes.  When I 
run the following from IDLE, it finishes immediately.

import multiprocessing, sqlite3
def hang():
   sqlite3.connect('/tmp/foo')
if __name__ == '__main__':
   multiprocessing.Pool(2).apply_async(hang, []).get(999)
print('done')

Unless I am missing something, this should be closed as 'out of date'.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 9f3f70fd0b6922840b3ef8018c446a6c8ac74ece by Miss Islington (bot) 
in branch '3.9':
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
https://github.com/python/cpython/commit/9f3f70fd0b6922840b3ef8018c446a6c8ac74ece


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 3dcccd1186febe0bca5936aed750d55c68b78bcd by Miss Islington (bot) 
in branch '3.8':
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
https://github.com/python/cpython/commit/3dcccd1186febe0bca5936aed750d55c68b78bcd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 80b6a05d38ce34ef543a2376b8132eef4ada67ce by Miss Islington (bot) 
in branch '3.7':
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
https://github.com/python/cpython/commit/80b6a05d38ce34ef543a2376b8132eef4ada67ce


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 97e4e0f53d6690db6b942678489716a30925b8af by Terry Jan Reedy in 
branch 'master':
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
https://github.com/python/cpython/commit/97e4e0f53d6690db6b942678489716a30925b8af


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40819] IDLE: Test right-click and context menu tests

2020-05-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks for the report. I verified the context menu defect on Windows and Mac 
Mohave.  The menu and shortcuts still work on both.

This regression was introduced by the first PR for #39885.  I mistakenly 
delayed the fixer, PR-18951, to finish new tests. (On current Win10, disabled 
items are nearly black dark gray that I easily confuse with enabled black.  On 
Mac, the contrast between its light-medium gray and black is unmistakable.)

I polished the fixer and merged it, with only manual testing, to immediately 
fix the regression.  I re-labelled this issue to add an automated test that 
would have caught it.

--
title: Idle Context Menu Copy/Cut Grayed Out -> IDLE: Test right-click and 
context menu tests
versions: +Python 3.10, Python 3.7, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19767
pull_request: https://github.com/python/cpython/pull/20523

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19766
pull_request: https://github.com/python/cpython/pull/20522

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39885] IDLE right click outside of any selection should clear it

2020-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19768
pull_request: https://github.com/python/cpython/pull/20524

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 14:28:59 +0900, Inada Naoki wrote:
> pymalloc manages only small blocks of memory.
> Large (more than 512 byte) memory blocks are managed by malloc/free.
> 
> glibc malloc doesn't return much freed memory to OS.

That depends on what "much" means.

Glibc does return blocks to the OS which it allocated via mmap, By
default, these are allocations larger than 128 kB.

So that means that

* Blocks smaller than 512 bytes are returned to the OS if the arena they
  are in is completely empty.

* Blocks between 512 bytes and 128 kB are not returned to the OS (unless
  they happen to be at the end of the heap).

* Blocks larger than 128 kB are returned to the OS:

Most Python objects are probably smaller than 512 bytes, so whether
"much" is returned to the OS mostly depends on whether arenas ever get
completely empty.

This stupid little test program returns memory to the OS quite nicely,
because it allocates and frees lots of objects together:

---8<--8<--8<--8<--8<--8<--8<--8<---
#!/usr/bin/python3
import time

a = []
for i in range(10):
print('a', i)
x = []
for j in range(100):
x.append(j)
a.append(x)
time.sleep(1)
if i >= 5:
print('d', i - 5)
a[i - 5] = None
time.sleep(1)
print('f')
---8<--8<--8<--8<--8<--8<--8<--8<---

(run it with strace to watch the mmap/munmap system calls)

A program with more random allocation patterns may suffer severe
internal fragmentation and end up with many mostly empty arenas.

> You can try jemalloc instead of glibc.

I think that would only make a difference if you have lots of objects
between 512 B and 128 kB. And only if those of similar size are
allocated and freed together.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: I cannot download python files from external source.

2020-05-29 Thread MRAB

On 2020-05-29 21:24, Michio Suginoo wrote:

Hi

I installed python via Anaconda some months ago.
And since then, I could not download python files from external sources.
Basically, every time I tried to download python files, the python system
that I installed via Anaconda gives me a system message with three options:

- Modify (add or modify individual features),
- Repair (ensure all current features are correctly installed), and
- Uninstall (remove the entire Python 3.7.4 (32 bit) installation).

Basically, none of these choices is what I want. I simply want to download
a python file and open it in Jupyter Notebook.

As an example, if I choose Repair, this will give me another system message
saying ‘Repair was successful’. But nothing else. At the end, I do not get
what I want, the python file that I wanted to download from an external
source.

I just wonder what causes this problem. I would appreciate it if you can
provide me a solution to resolve this problem.

That program is an installer for Python. It's only purpose is to install 
or uninstall Python, and nothing else. It's not for downloading other files.

--
https://mail.python.org/mailman/listinfo/python-list


I cannot download python files from external source.

2020-05-29 Thread Michio Suginoo
Hi

I installed python via Anaconda some months ago.
And since then, I could not download python files from external sources.
Basically, every time I tried to download python files, the python system
that I installed via Anaconda gives me a system message with three options:

   - Modify (add or modify individual features),
   - Repair (ensure all current features are correctly installed), and
   - Uninstall (remove the entire Python 3.7.4 (32 bit) installation).

Basically, none of these choices is what I want. I simply want to download
a python file and open it in Jupyter Notebook.

As an example, if I choose Repair, this will give me another system message
saying ‘Repair was successful’. But nothing else. At the end, I do not get
what I want, the python file that I wanted to download from an external
source.

I just wonder what causes this problem. I would appreciate it if you can
provide me a solution to resolve this problem.

Thanks

Michio


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: why no camelCase in PEP 8?

2020-05-29 Thread Peter J. Holzer
On 2020-05-28 18:14:53 -0400, Terry Reedy wrote:
> On 5/28/2020 4:18 PM, Peter J. Holzer wrote:
> > On 2020-05-19 05:59:30 +1000, Chris Angelico wrote:
> > > Nobody ever requires you to comply with it for any other code.
> > 
> > That's obviously not true: 
[...]
> Revise Chris' claim to "Neither the PSF nor the Python core developers
> require* that owners of non-stdlib code comply with PEP 8" and it would be
> true.

Well, yes. But "Neither the PSF nor the Python core developers" is quite
different from "Nobody ever".

That's like saying "Nobody has ever been on the moon" is true if you
replace "Nobody" with "No catholic bishop".

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40821] os.getlogin() not working

2020-05-29 Thread Manickaraja Kumarappan


New submission from Manickaraja Kumarappan :

Hi,
We are using below command to get the original login user. In some cases folks 
sudo as different user and run commands. In some cases folks use switch to 
different user (su - <>) and then run command. In all cases we would like to 
get original user who logged into the terminal to run the command. We are using 
below command to get the same.

user=os.getlogin()

We got three RHEL linux systems with Python 3 and strangely on two of them this 
command works fine. However only on third system it is failing with below error

OSError: [Errno 6] No such device or address

Not sure if it is some o/s env setup which is causing this command to fail. Any 
pointers to run this command will be of great help so that we can pin point the 
issue.

Please note on faiing system if I do python and then run the command it works 
fine without any issue. However if it is triggered through our Scheduler 
(Control M) it is failing with above message.

Give below is the command how Scheduler triggers the job.

/bin/su - edwadm -c /bin/sh -x <>

Thanks
Manick.

--
components: Extension Modules
messages: 370336
nosy: Manickaraja Kumarappan
priority: normal
severity: normal
status: open
title: os.getlogin() not working
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: why no camelCase in PEP 8?

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 06:27:31 +1000, Chris Angelico wrote:
> On Fri, May 29, 2020 at 6:20 AM Peter J. Holzer  wrote:
> > On 2020-05-19 05:59:30 +1000, Chris Angelico wrote:
> > > PEP 8 is a style guide for the Python standard library. It is the
> > > rules you must comply with if you are submitting a patch *to Python
> > > itself*. Nobody ever requires you to comply with it for any other
> > > code.
> >
> > That's obviously not true: Many companies and projects have a coding
> > standard. Many of those coding standards will be based on or even
> > identical to PEP 8. And as an employee or contributor you may be
> > required to comply with it.
[...]
> The OP said:
> > My preference for using camelCase (in PEP 8, AKA mixedCase) is
> > putting me at odds with my colleagues, who point to PEP 8 as "the
> > rules".
> >
> 
> This smells like the incredibly strong misconception that PEP 8 needs
> to govern every line of Python code ever written, or else it's "bad
> code". This thread wouldn't have been started if it had been any other
> style guide that the company had been chosen, because then it's
> obvious that the choice is the company's. It's only when PEP 8 is
> considered to be some sort of universal standard that we get this kind
> of discussion.

I got a bit side-tracked in my previous reply, so I'm trying to stick to my
original point more closely this time.

Your claim was that "nobody ever requires you to comply with [PEP 8] for
any other code".

For this claim to be false, only one person/company/project needs to
require somebody to comply with PEP 8. Their motives are completely
irrelevant. They may believe that compliance with PEP 8 is necessary
for any Python code. They may just think that PEP 8 is a good idea. They
may have had a vision of Elvis singing the text of PEP 8 to the tune of
Jailhouse Rock. It doesn't matter. Your claim was about their actions,
not their motives.

The OP seems to feel that he is required by his colleagues to comply
with PEP 8. So his company would serve as a counter-example (though
maybe a weak one, since it doesn't seem to be a hard requirement).

hp

PS: We have "PEP 8, unless you have a good reason to deviate" in our
style guide, but we don't enforce that at all (unfortunately).

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Format Logfile Name with logging.ini

2020-05-29 Thread Peter J. Holzer
On 2020-05-29 09:52:07 -0700, connor.r.no...@gmail.com wrote:
> In an effort to clean up my python logging practices when creating
> libraries, I have begun reading into "Advanced Logging" and converting
> my logging practices into logging configuration `.ini` files:
> 
> [link](https://docs.python.org/3.4/howto/logging.html#configuring-logging)
> 
> My question is: When defining a FileHandler in a `.ini` file, all of
> the examples that I've seen hardcode the name and location of the log
> file. In the code snippet below, `python.log` is hardcoded into the
> `.ini` file:

This is a strange usage of the term "hardcoded", Normally, hardcoded
means that it is in the *code*, not a configuration file.


> ```
> [handler_hand02]
> class=FileHandler
> level=DEBUG
> formatter=form02
> args=('python.log', 'w')
> ```
> [code reference 
> link](https://docs.python.org/3.4/library/logging.config.html#logging-config-fileformat)
> 
> Desired Behavior:
> On each run of the program, a new logfile is created in the `logs/`
> directory named "_program.log".
> 
> Current Behavior: 
> The format in the example above overwrites a single file called
> "python.log" on each run, which is not the desired behavior.
> 
> Question: Is there a standard procedure for using .ini files to create
> a new logfile prepended with the current Unix timestamp on each run of
> the program?

You would have to use a different class for that. I don't know one
offhand which implements the behaviour you want, but for example
TimedRotatingFileHandler switches log files after a configurable
interval. So for example

class=TimedRotatingFileHandler
when=H

would start a new log every hour (and rename the old log to contain a
timestamp).

You may need to write a handler which implements the behaviour you want.
Or maybe there is one on PyPi.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40820] Mock Call attributes args and kwargs have no changeversion

2020-05-29 Thread Andrius Gobis


Change by Andrius Gobis :


--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2020-05-29 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24048] remove_module() needs to save/restore exception state

2020-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 5aa40e587e63bcad22c7e196fc3559e2b5e0792b by Miss Islington (bot) 
in branch '3.7':
bpo-24048: Save the live exception during import.c's remove_module() (GH-13005)
https://github.com/python/cpython/commit/5aa40e587e63bcad22c7e196fc3559e2b5e0792b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24048] remove_module() needs to save/restore exception state

2020-05-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19765
pull_request: https://github.com/python/cpython/pull/20521

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-29 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
keywords: +patch
pull_requests: +19764
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20520

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread Steve Dower


Steve Dower  added the comment:

> import subprocess
> subprocess._cleanup = lambda: None

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-29 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Thanks, Steve!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-29 Thread Steve Dower


Steve Dower  added the comment:

I've checked and merged the cpython-source-deps update. (For everyone's info, I 
downloaded the sources myself and checked hashes/etc. as per normal, even 
though I eventually merged the PR and tagged it manually.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40820] Mock Call attributes args and kwargs have no changeversion

2020-05-29 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +19763
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20519

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33725] Python crashes on macOS after fork with no exec

2020-05-29 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I don't think there's really anything more to do here.  I'm closing the issue.  
Let's open a new one if needed at some future point.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40820] Mock Call attributes args and kwargs have no changeversion

2020-05-29 Thread Andrius Gobis


New submission from Andrius Gobis :

In Python 3.8, the ``args`` and ``kwargs`` properties were added to Mock 
``Call`` objects (PR: https://github.com/python/cpython/pull/11807 Issue: 
https://bugs.python.org/issue21269).

However, the change did not add a change version to the documentation.

The ``Doc/library/unittest.mock.rst`` file should include the following in the 
``Call`` section:
```
The ``Doc/library/unittest.mock.rst`` file should include the following in the 
``Call`` section:
```
   .. versionchanged:: 3.8

  Added the ``args`` and ``kwargs`` properties to more easily access the 
positional args and keyword args within a ``Call``object tuple.
```

--
assignee: docs@python
components: Documentation
messages: 370330
nosy: Andrius Gobis, docs@python
priority: normal
severity: normal
status: open
title: Mock Call attributes args and kwargs have no changeversion
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24048] remove_module() needs to save/restore exception state

2020-05-29 Thread Brett Cannon


Brett Cannon  added the comment:

Assigning to Nick to decide if he wants to backport it to 3.7 before it's no 
longer possible.

--
assignee:  -> ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24048] remove_module() needs to save/restore exception state

2020-05-29 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread Sylvain Corlay


Sylvain Corlay  added the comment:

Yes, I understand that.

I was wondering if there was a workaround that we could use to not drop 3.6
support right away!

On Fri, May 29, 2020, 19:29 STINNER Victor  wrote:

>
> STINNER Victor  added the comment:
>
> Sadly, 3.6 no longer get bug fixes, only security fixes:
> https://devguide.python.org/#status-of-python-branches
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24165] Free list for single-digits ints

2020-05-29 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23967] Make inspect.signature expression evaluation more powerful

2020-05-29 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24391] Better repr for threading objects

2020-05-29 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24391] Better repr for threading objects

2020-05-29 Thread Brett Cannon


Brett Cannon  added the comment:

Assigning to Serhiy in case he wants to finish this.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24651] Mock.assert* API is in user namespace

2020-05-29 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, 3.6 no longer get bug fixes, only security fixes:
https://devguide.python.org/#status-of-python-branches

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29882] Add an efficient popcount method for integers

2020-05-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19762
pull_request: https://github.com/python/cpython/pull/20518

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: .dll problem

2020-05-29 Thread Rhodri James

[Re-ordered because top-posting is evil ]:-)

On 29/05/2020 17:38, Souvik Dutta wrote:

On Fri, 29 May, 2020, 9:50 pm Preetha M,  wrote:


Hello. Warm regards from india. I am a kid who is currently learning
python. Hope you are doing well. I know that it is not a problem that you
can fix but whenever i try to open the software it shows that
api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
is not working. Every application i install shows that something.dll is
missing. Please help.



Do you have DirectX installed. It must solve the problem.



DirectX is highly unlikely to be involved, as you have been told before 
Souvik.  What the OP actually needs is the missing Windows runtime, 
which can be obtained straightforwardly from Microsoft.  Here's the 
link: https://www.microsoft.com/en-in/download/details.aspx?id=48145


Incidentally, the first link Google turns up when you search for 
"windows runtime missing" explains what's going on and points to this link.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


[issue40744] Explicitly drop support for SQLite version < 3.7.3

2020-05-29 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
versions:  -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Format Logfile Name with logging.ini

2020-05-29 Thread connor . r . novak
In an effort to clean up my python logging practices when creating libraries, I 
have begun reading into "Advanced Logging" and converting my logging practices 
into logging configuration `.ini` files:

[link](https://docs.python.org/3.4/howto/logging.html#configuring-logging)

My question is: When defining a FileHandler in a `.ini` file, all of the 
examples that I've seen hardcode the name and location of the log file. In the 
code snippet below, `python.log` is hardcoded into the `.ini` file:

```
[handler_hand02]
class=FileHandler
level=DEBUG
formatter=form02
args=('python.log', 'w')
```
[code reference 
link](https://docs.python.org/3.4/library/logging.config.html#logging-config-fileformat)

Desired Behavior:
On each run of the program, a new logfile is created in the `logs/` directory 
named "_program.log".

Current Behavior: 
The format in the example above overwrites a single file called "python.log" on 
each run, which is not the desired behavior.

Question: Is there a standard procedure for using .ini files to create a new 
logfile prepended with the current Unix timestamp on each run of the program?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread Sylvain Corlay


Sylvain Corlay  added the comment:

Hello,

Is there a means to work around that bug for Python 3.6 ? It seems that the fix 
was only backported to 3.7, and we were not planning on dropping Python 3.6 
support quite yet in our project.

--
nosy: +sylvain.corlay

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: .dll problem

2020-05-29 Thread Souvik Dutta
Do you have DirectX installed. It must solve the problem.

On Fri, 29 May, 2020, 9:50 pm Preetha M,  wrote:

> Hello. Warm regards from india. I am a kid who is currently learning
> python. Hope you are doing well. I know that it is not a problem that you
> can fix but whenever i try to open the software it shows that
> api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
> is not working. Every application i install shows that something.dll is
> missing. Please help.
>
>
>
> Sincerely,
>
> A random person
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40819] Idle Context Menu Copy/Cut Grayed Out

2020-05-29 Thread Bev


New submission from Bev :

In Idle on macOS, when I select text in either the Shell or a file, both copy 
and cut should be available in the context menu, but they are grayed out (not 
selectable).  Both copy and cut are still available via the menu bar Edit menu 
and keyboard shortcuts, c and x, respectively.  I tried this 
on macOS El Capitan 10.11.6 and Catalina 10.15.4

--
assignee: terry.reedy
components: IDLE
files: copy and cut missinf from context menu.png
messages: 370324
nosy: BevInTX, terry.reedy
priority: normal
severity: normal
status: open
title: Idle Context Menu Copy/Cut Grayed Out
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49202/copy and cut missinf from context 
menu.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29882] Add an efficient popcount method for integers

2020-05-29 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 8bd216dfede9cb2d5bedb67f20a30c99844dbfb8 by Niklas Fiekas in 
branch 'master':
bpo-29882: Add an efficient popcount method for integers (#771)
https://github.com/python/cpython/commit/8bd216dfede9cb2d5bedb67f20a30c99844dbfb8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29882] Add an efficient popcount method for integers

2020-05-29 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Custom logging function

2020-05-29 Thread zljubisic
Hi Peter.
Finally I got it. :)

That's it. It works. Thanks.

So, in each class, I will in init method execute:
self.logger = logging.getLogger()

and than everywhere use self.logger.debug('...') in order to produce the 
message.

Best regards.
-- 
https://mail.python.org/mailman/listinfo/python-list


.dll problem

2020-05-29 Thread Preetha M
Hello. Warm regards from india. I am a kid who is currently learning
python. Hope you are doing well. I know that it is not a problem that you
can fix but whenever i try to open the software it shows that
api-ms-win-crt-runtime-l1-0-0.dll is missing. I tried reinstalling but it
is not working. Every application i install shows that something.dll is
missing. Please help.



Sincerely,

A random person
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40818] Run sys.__interactivehook__ for asyncio REPLs

2020-05-29 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
keywords: +patch
pull_requests: +19761
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20517

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40818] Run sys.__interactivehook__ for asyncio REPLs

2020-05-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38035] shared_semaphores cannot be shared across unrelated processes

2020-05-29 Thread Tal Einat


Tal Einat  added the comment:

Sorry this hasn't been followed up. I think this would best be discussed a bit 
on the Python-Ideas mailing list. Please send an email there suggesting this 
feature, and link to the discussion thread in the mailing list archives here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40818] Run sys.__interactivehook__ for asyncio REPLs

2020-05-29 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

As a nice side effect, it gives the same completion than the standard shell.

--
components: Library (Lib)
messages: 370321
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Run sys.__interactivehook__ for asyncio REPLs
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40817] Document the asyncio shell

2020-05-29 Thread STINNER Victor


STINNER Victor  added the comment:

I understood that it was more added as an "experimental" feature. Not sure if 
it's still considered as experimental in Python 3.9?

A few more bugs have been fixed in the parser/compiler recently for async/await 
keywords.

--
nosy: +vstinner, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40817] Document the asyncio shell

2020-05-29 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

Python 3.8 introduced `python -m asyncio` to run a Python shell with asyncio 
support. It had a note in What's New but was not documented, I think a note in 
https://docs.python.org/3/library/asyncio.html should be helpful.


This could be a good issue for a new contributor.

--
assignee: docs@python
components: Documentation
messages: 370319
nosy: docs@python, remi.lapeyre
priority: normal
severity: normal
status: open
title: Document the asyncio shell
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



David Beazley's Practical Python Course Now Open & Free

2020-05-29 Thread Abdur-Rahmaan Janhangeer
Greetings,

A Great Py Course:

https://dabeaz-course.github.io/practical-python/

David Beazley is a celebrated python dev, previously he was a lecturer in
compiler theory.

His practical py course is:

"A no-nonsense treatment of Python that has been actively taught to more
than 400 in-person groups since 2007."

It has been taught to:
"Traders, systems admins, astronomers, tinkerers, and even a few hundred
rocket scientists who used Python to help land a rover on Mars–they’ve all
taken this course. Now, I’m pleased to make it available under a Creative
Commons license. Enjoy!"

If you need to recommend a beginner material, please add it to your list!

Kind Regards,


Abdur-Rahmaan Janhangeer

https://www.github.com/Abdur-RahmaanJ

Mauritius

sent from gmail client on Android, that's why the signature is so ugly.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Adam Preble
On Friday, May 29, 2020 at 7:30:32 AM UTC-5, Eryk Sun wrote:
> On 5/28/20, Adam Preble  wrote:
> Sometimes a user will open a script via "open with" and browse to
> python.exe or py.exe. This associates .py files with a new progid that
> doesn't pass the %* command-line arguments.
> 
> The installed Python.File progid should be listed in the open-with
> list, and, if the launcher is installed, the icon should have the
> Python logo with a rocket on it. Select that, lock it in by selecting
> to always use it, and open the script. This will only be wrong if a
> user or misbehaving program modified the Python.File progid and broke
> its "open" action.

Thank you for responding! The computers showing the problem are remote to me 
and I won't be able to access one for a few days, but I will be making it a 
point in particular to check their associations before continuing without 
anything else with it.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-05-29 Thread E. Paine


E. Paine  added the comment:

This is simply because the Python interpreter is running from /usr/bin. This is 
shown if you call:

cp /usr/bin/idle idle
./idle

In this case, the Python interpreter is running from the directory you are in 
and /usr/bin shouldn't(!) show in the path (at least on my system...)

--
nosy: +epaine

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



How to convert csv to netcdf please help me python users

2020-05-29 Thread kotichowdary28
Hi all

I hope all are  doing well

please help me how to convert CSV to NetCDF. Im trying but its not working


#!/usr/bin/env ipython
import pandas as pd
import numpy as np
import netCDF4
import pandas as pd
import xarray as xr


stn_precip='ts_sept.csv'
orig_precip='ts_sept.csv'
stations = pd.read_csv(stn_precip)

stncoords = stations.iloc[:]
orig = pd.read_csv(orig_precip)
lats = stncoords['latitude']
lons = stncoords['longitude']
nstations = np.size(lons)
ncout = netCDF4.Dataset('Precip_1910-2018_homomod.nc', 'w')

ncout.createDimension('station',nstations)
ncout.createDimension('time',orig.shape[0])

lons_out = lons.tolist()
lats_out = lats.tolist()
time_out = orig.index.tolist()

lats = ncout.createVariable('latitude',np.dtype('float32').char,('station',))
lons = ncout.createVariable('longitude',np.dtype('float32').char,('station',))
time = ncout.createVariable('time',np.dtype('float32').char,('time',))
precip = ncout.createVariable('precip',np.dtype('float32').char,('time', 
'station'))

lats[:] = lats_out
lons[:] = lons_out
time[:] = time_out
precip[:] = orig
ncout.close()

 

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40814] Update typing module documentation based on PEP 585

2020-05-29 Thread Florian Dahlitz


Change by Florian Dahlitz :


--
nosy: +DahlitzFlorian

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Mats Wichmann
On 5/28/20 3:20 PM, Peter J. Holzer wrote:
> On 2020-05-23 13:22:26 -0600, Mats Wichmann wrote:
>> On 5/23/20 12:23 AM, Adam Preble wrote:
>>> I wanted to update from 3.6.8 on Windows without necessarily moving
>>> on to 3.7+ (yet), so I thought I'd try 3.6.9 or 3.6.10. 
>>>
>>> All I see for both are source archives:
> [...]
>>
>> During the early part of a release cycle, installers are built.  Once
>> the cycle moves into security fix-only mode, installers are not built.
>> That's all you are seeing.
> 
> This seems a rather odd policy to me. Distributing a security fix in
> source-only form will prevent many people from applying it (especially
> on Windows).


As others have pointed out, it's a problem of how many versions to
build.  By the time 3.N is at the stage of receiving security-only,
patch-only types of releases, both 3.N+1 and 3.N+2 are being actively
built and supported, including Windows installers, both later releases
will will include those fixes (assuming they're necessary), so you have
plenty to choose from.  You have the option of picking the patches and
building your own if something _requires_ you to stay on 3.N, though
admittedly that is less easy.  It seems to be a reasonable compromise to
me, but that's from the point of view of a kibitzer!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40816] Add missed AsyncContextDecorator to contextlib

2020-05-29 Thread Андрей Казанцев

Change by Андрей Казанцев :


--
keywords: +patch
pull_requests: +19760
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20516

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-05-29 Thread Андрей Казанцев

New submission from Андрей Казанцев :

I can use context manager as decorator but can't use async context manager. 
Seems it because didn't implemented AsyncContextDecorator class

--
components: Library (Lib)
messages: 370317
nosy: heckad
priority: normal
severity: normal
status: open
title: Add missed AsyncContextDecorator to contextlib
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



EuroPython 2020: Schedule published

2020-05-29 Thread M.-A. Lemburg
We are very excited to announce the first version of our EuroPython
2020 schedule:

 * EuroPython 2020 Schedule *

https://ep2020.europython.eu/schedule/


More sessions than we ever dreamed of
-

After the 2nd CFP, we found that we had so many good talk submissions
that we were able to open a fourth track. Together with the newly
added slots for the Indian / Asian / Pacific and Americas time zones,
we now have a fully packed program, with:

- more than 110 sessions
- more than 110 speakers from around the world
- 4 brilliant keynotes, two of which are already published
- 2 exciting lightning talk blocks
- 4 all-day tracks, with a whole track dedicated to data science topics
- a poster track, which we’ll announce next week
- a virtual social event
- an after party
- and lots of socializing on our conference platform

We are proud to have reached almost the size of our in-person event
with the online version of EuroPython 2020.


Never miss a talk
-

All talks will be made available to the attendees as live Webinars,
with easy switching between tracks, as well as online streams, which
will allow rewinding to watch talks you may have missed during the
day.


Conference Tickets
--

Conference tickets are available on our registration page. We have
simplified and greatly reduced the prices for the EuroPython 2020
online edition:

https://ep2020.europython.eu/registration/buy-tickets/

As always, all proceeds from the conference will go into our grants
budget, which we use to fund financial aid for the next EuroPython
edition, special workshops and other European conferences and
projects:

* EuroPython Society Grants Program *

  https://www.europython-society.org/grants

We hope to see lots of you at the conference in July. Rest assured
that we’ll make this a great event again — even within the limitations
of running the conference online.


Sprints
---

On Saturday and Sunday, we will have sprints/hackathons on a variety
of topics. Registration of sprint topics has already started. If you
would like to run a sprint, please add your sprint topic to the wiki
page we have available for this:


 * EuroPython 2020 Sprints Listing *

 https://wiki.python.org/moin/EuroPython2020/Sprints


If registrations continue as they currently do, we will have a few
hundred people waiting to participate in your sprint projects, so this
is the perfect chance for you to promote your project and find new
contributors.

Participation in the sprints is free, but does require
registration. We will provide the necessary collaboration tools in
form of dedicated Jitsi or Zoom virtual rooms and text channels on our
Discord server.


EuroPython is your conference
-

EuroPython has always been a completely volunteer based effort. The
organizers work hundreds of hours to make the event happen and will
try very hard to create an inspiring and exciting event.

However, we can only provide the setting. You, as our attendees, are
the ones who fill it with life and creativity.

We are very much looking forward to having you at the conference !


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/619453140468629504/europython-2020-schedule-published

Tweet:

https://twitter.com/europython/status/1266352353961299971

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue40813] Output SyntaxError is not defective

2020-05-29 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Indeed, the exception has the correct line number when compiling manually:


>>> try:
... compile('if __name__ == "__main__":\n   print("hello world"\n', 
'', 'exec')
... except SyntaxError as e:
... print(e.lineno)
...
2


but not when running `python3 main.py`:
  File "main.py", line 3

  ^
SyntaxError: unexpected EOF while parsing



I tried with all version of Python >= 3.6 and Python2 and they all exhibit the 
same behavior.

--
nosy: +remi.lapeyre
versions: +Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



EuroPython 2020: Schedule published

2020-05-29 Thread M.-A. Lemburg
We are very excited to announce the first version of our EuroPython
2020 schedule:

 * EuroPython 2020 Schedule *

https://ep2020.europython.eu/schedule/


More sessions than we ever dreamed of
-

After the 2nd CFP, we found that we had so many good talk submissions
that we were able to open a fourth track. Together with the newly
added slots for the Indian / Asian / Pacific and Americas time zones,
we now have a fully packed program, with:

- more than 110 sessions
- more than 110 speakers from around the world
- 4 brilliant keynotes, two of which are already published
- 2 exciting lightning talk blocks
- 4 all-day tracks, with a whole track dedicated to data science topics
- a poster track, which we’ll announce next week
- a virtual social event
- an after party
- and lots of socializing on our conference platform

We are proud to have reached almost the size of our in-person event
with the online version of EuroPython 2020.


Never miss a talk
-

All talks will be made available to the attendees as live Webinars,
with easy switching between tracks, as well as online streams, which
will allow rewinding to watch talks you may have missed during the
day.


Conference Tickets
--

Conference tickets are available on our registration page. We have
simplified and greatly reduced the prices for the EuroPython 2020
online edition:

https://ep2020.europython.eu/registration/buy-tickets/

As always, all proceeds from the conference will go into our grants
budget, which we use to fund financial aid for the next EuroPython
edition, special workshops and other European conferences and
projects:

* EuroPython Society Grants Program *

  https://www.europython-society.org/grants

We hope to see lots of you at the conference in July. Rest assured
that we’ll make this a great event again — even within the limitations
of running the conference online.


Sprints
---

On Saturday and Sunday, we will have sprints/hackathons on a variety
of topics. Registration of sprint topics has already started. If you
would like to run a sprint, please add your sprint topic to the wiki
page we have available for this:


 * EuroPython 2020 Sprints Listing *

 https://wiki.python.org/moin/EuroPython2020/Sprints


If registrations continue as they currently do, we will have a few
hundred people waiting to participate in your sprint projects, so this
is the perfect chance for you to promote your project and find new
contributors.

Participation in the sprints is free, but does require
registration. We will provide the necessary collaboration tools in
form of dedicated Jitsi or Zoom virtual rooms and text channels on our
Discord server.


EuroPython is your conference
-

EuroPython has always been a completely volunteer based effort. The
organizers work hundreds of hours to make the event happen and will
try very hard to create an inspiring and exciting event.

However, we can only provide the setting. You, as our attendees, are
the ones who fill it with life and creativity.

We are very much looking forward to having you at the conference !


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/619453140468629504/europython-2020-schedule-published

Tweet:

https://twitter.com/europython/status/1266352353961299971

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue40813] Output SyntaxError is not defective

2020-05-29 Thread timofej


timofej  added the comment:

About of numbers of line. I tested on different files and i forget change 
number of line.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40813] Output SyntaxError is not defective

2020-05-29 Thread timofej


timofej  added the comment:

here attached file with SyntaxError

--
Added file: https://bugs.python.org/file49201/main.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-29 Thread Mark Dickinson


Mark Dickinson  added the comment:

Fixed in master and 3.9; not backporting to 3.8 or 3.7, as discussed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40813] Output SyntaxError is not defective

2020-05-29 Thread Zachary Ware


Change by Zachary Ware :


--
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-29 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset ad088ca5c6adc4a107411cad62b83f5c6e06b5ed by Miss Islington (bot) 
in branch '3.9':
bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) 
(GH-20514)
https://github.com/python/cpython/commit/ad088ca5c6adc4a107411cad62b83f5c6e06b5ed


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40813] Output SyntaxError is not defective

2020-05-29 Thread Zachary Ware


Zachary Ware  added the comment:

Without some example code, there's no way to really tell what's going on here.  
In particular, it's suspicious that you're expecting an error on line 7 but 
seeing one on line 3.

Can you attach your `main.py` file to the issue?

--
components: +Interpreter Core -Build
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40815] Multiprocessing docs don't describe thread-safety

2020-05-29 Thread Alan Briolat


Change by Alan Briolat :


--
nosy: +alan.briolat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40815] Multiprocessing docs don't describe thread-safety

2020-05-29 Thread Ben


New submission from Ben :

The Multiprocessing docs specifically say that Queue is process- and thread- 
safe: 
https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes.

But this information is not given for the various synchronisation primitives 
and such (Lock, Semaphore, Event, etc)

Are they thread-safe?  Should the docs say whether they are or are not?

--
assignee: docs@python
components: Documentation
messages: 370310
nosy: bjs, docs@python
priority: normal
severity: normal
status: open
title: Multiprocessing docs don't describe thread-safety

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-29 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 895c9c1d438367722f74f437fda96767d770662b by Mark Dickinson in 
branch 'master':
bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435)
https://github.com/python/cpython/commit/895c9c1d438367722f74f437fda96767d770662b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19759
pull_request: https://github.com/python/cpython/pull/20514

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2020-05-29 Thread sgaist


Change by sgaist :


--
keywords: +patch
nosy: +sgaist
nosy_count: 2.0 -> 3.0
pull_requests: +19758
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20149

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >