[issue41480] python won't save

2020-08-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
assignee:  -> terry.reedy
components: +IDLE
nosy: +terry.reedy

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread Vedran Čačić

Vedran Čačić  added the comment:

Thanks for a very precise report. Have you tried to manually save your file 
(File > Save As)? Also, how did the file get that name (PPTests0.1.py)?

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread miss-islington


miss-islington  added the comment:


New changeset f0e030cacb940f061e0b09efbffc2fd984b95259 by Miss Islington (bot) 
in branch '3.8':
bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)
https://github.com/python/cpython/commit/f0e030cacb940f061e0b09efbffc2fd984b95259


--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread miss-islington


miss-islington  added the comment:


New changeset ea680631b478f091a171dc802d861f5014f58c8f by Miss Islington (bot) 
in branch '3.9':
bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)
https://github.com/python/cpython/commit/ea680631b478f091a171dc802d861f5014f58c8f


--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20884
pull_request: https://github.com/python/cpython/pull/21738

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20885
pull_request: https://github.com/python/cpython/pull/21739

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-08-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 270b4ad4df795783d417ba15080da8f95e598689 by Inada Naoki in branch 
'master':
bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)
https://github.com/python/cpython/commit/270b4ad4df795783d417ba15080da8f95e598689


--

___
Python tracker 

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



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

I made a record of my investigations here: 
https://github.com/python-trio/trio/issues/1586

One reason we might care about this is that asyncio ought to be using a clock 
that stops ticking while suspended.

(On which note: Please don't switch macOS to use 
clock_gettime(CLOCK_MONOTONIC); that would be a breaking change for us!)

At least Linux, macOS, FreeBSD, and Windows all have a way to access a 
monotonic clock that stops ticking while the system is suspended.

--

___
Python tracker 

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



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Rishav Kundu

Rishav Kundu  added the comment:

> Maybe a new clock is needed, clock which has a well defined behavior for 
> system suspend, on any platform.

I’d like to work on this, if possible. Linux and macOS support seems to be 
straightforward. I will have to look into other platforms.

What would be the protocol exactly? Should I float a discussion on the ideas 
mailing list? Open a new bpo?

--

___
Python tracker 

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



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Or would a different API that distinguishes between clocks that track during 
> suspend versus those that not be a better idea? Given that at least macOS and 
> Linux offer both variants (not sure about Windows)

I don't think that all platforms provide a clock for Python time.perf_counter() 
which include suspend. So I'm not sure that it's useful to only change the 
behavior on macOS, and only depending on the macOS version (and macOS target 
version).

Maybe a new clock is needed, clock which has a well defined behavior for system 
suspend, on any platform. Such clock may not be available on all platforms.

FYI on Python 3.3, time.monotonic() was not available on all platforms. It 
became available on all platforms on Python 3.5.
https://docs.python.org/dev/library/time.html#time.monotonic

--
nosy: +njs

___
Python tracker 

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



[issue38912] test_asyncio altered the execution environment

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

Another error?

aarch64 RHEL8 LTO + PGO 3.x:
https://buildbot.python.org/all/#/builders/618/builds/835

1 test altered the execution environment:
test_asyncio

0:01:55 load avg: 7.00 [329/423/1] test_asyncio failed (env changed) (1 min 25 
sec) -- running: test_peg_generator (1 min)
Warning -- Unraisable exception
Exception ignored in: 
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/sslproto.py",
 line 321, in __del__
self.close()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/sslproto.py",
 line 316, in close
self._ssl_protocol._start_shutdown()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/sslproto.py",
 line 590, in _start_shutdown
self._abort()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/sslproto.py",
 line 731, in _abort
self._transport.abort()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/selector_events.py",
 line 678, in abort
self._force_close(None)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/selector_events.py",
 line 729, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/base_events.py",
 line 746, in call_soon
self._check_closed()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/asyncio/base_events.py",
 line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
(...)

The error occurred in _SSLProtocolTransport.__del__() on self.close(). The 
previous line is:

_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)

But I cannot see the warning in tests. Maybe the bug occurred in a test which 
hides logs.

--

___
Python tracker 

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



[issue38912] test_asyncio altered the execution environment

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> I created bpo-41467: asyncio: recv_into() must not return b'' if the 
> socket/pipe is closed.

This was a real asyncio bug, specific to Windows, and it's now fixed.

But the initial bug report was on Unix (Linux?) and is different:

> Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, 
> dangling: 2)

--

___
Python tracker 

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



[issue41467] asyncio: recv_into() must not return b'' if the socket/pipe is closed

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
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



[issue31819] Add sock_recv_into to AbstractEventLoop

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



Re: Updating a variable problem.

2020-08-04 Thread dn via Python-list

On 04/08/2020 20:38, Steve wrote:

Why should line 6 fail until line 7 is commented out?
Python complains that MSN is "referenced before assignment".

def ReadTheEQfile():
   global MSN
   MSN = ("1 Monitor") #This line works every time.
 
def EditTheEQlist():

   print("MSN2 = " + MSN) # Works if the next line is commented out.
   MSN = ("3 Monitor")
 
# Main()

ReadTheEQfile()
print("MSN1 = " + MSN) # This line works every time
EditTheEQlist()


NB there are no lineNRs above!
(added comment/guide == good job!)


Others have answered the question. Here is some reading to consolidate 
your understanding:-


What are the rules for local and global variables in Python?
https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python

Assignment is defined recursively depending on the form of the target 
(list). When a target is part of a mutable object (an attribute 
reference, subscription or slicing), the mutable object must ultimately 
perform the assignment and decide about its validity, and may raise an 
exception if the assignment is unacceptable. The rules observed by 
various types and the exceptions raised are given with the definition of 
the object types (see section The standard type hierarchy).

...
If the target is an identifier (name):

If the name does not occur in a global or nonlocal statement in the 
current code block: the name is bound to the object in the current local 
namespace.


Otherwise: the name is bound to the object in the global namespace 
or the outer namespace determined by nonlocal, respectively.

https://docs.python.org/3/reference/simple_stmts.html#assignment-statements

...we have the function modifying x. It may appear somewhat confusing 
since x is being used in multiple locations...

https://pythonprogramming.net/global-local-variables/

"Scope", particularly in its applications to Classes and Namespaces:
https://docs.python.org/3/tutorial/classes.html

The "LEGB" 'rule' (NB not a term you'll find in the Python docs) ie 
Local, Enclosing, Global, and Built-in scopes:

https://realpython.com/python-scope-legb-rule/
and more in:
https://realpython.com/python-namespaces-scope/
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue41475] __future__.annotations set to become default in Python 4.0?

2020-08-04 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Keep it focused one place — there's no benefit to multiple tracker entries 
and/or multiple PRs.  Do look to see all the places that would be need to be 
updated.  Also, let Łukasz reply — this was his PEP.

Also, I'm not sure that we're backporting anything to 3.7 at this point.

--

___
Python tracker 

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



[issue41481] pip install will install version 0.0.0 if existing in stead of newer ones

2020-08-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is a bug tracker for issues with the Python language, interpreter and 
standard library. For third party applications like pip, please report bugs to 
their maintainers.

https://github.com/pypa/pip/issues

--
nosy: +steven.daprano
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



[issue41479] pip install== will install 0.0.0 version in stead of showing alll

2020-08-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is a bug tracker for issues with the Python language, interpreter and 
standard library. For third party applications like pip, please report bugs to 
their maintainers.

https://github.com/pypa/pip/issues

--
nosy: +steven.daprano
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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


LX Cubing  added the comment:

And it still shows the * there.

--

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


Change by LX Cubing :


Added file: https://bugs.python.org/file49363/Annotation 2020-08-04 144803.png

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


Change by LX Cubing :


Added file: https://bugs.python.org/file49362/Annotation 2020-08-04 144726.png

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


LX Cubing  added the comment:

So then, I click on the run button, which shows four more buttons:
Run Module
Run... Customized
Check Module
Python Shell

So I click on the Run Module button, and this thing pops up that says 

Source Must Be Saved
OK to Save?
Okay  Cancel


So I clicked Okay, and it doesn't run at all.

--
Added file: https://bugs.python.org/file49360/Annotation 2020-08-04 144527.png

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


Change by LX Cubing :


Added file: https://bugs.python.org/file49361/Annotation 2020-08-04 144709.png

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


LX Cubing  added the comment:

Okay, so in the first picture, you see the * up there in the title right? That 
means that it needs to be saved.

--
Added file: https://bugs.python.org/file49359/Annotation 2020-08-04 144455.png

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread Vedran Čačić

Vedran Čačić  added the comment:

What exactly do you type/click and where?

--
nosy: +veky

___
Python tracker 

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



[issue41482] docstring errors in ipaddress.IPv4Network

2020-08-04 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes


Nathan Maynes  added the comment:

Im still trying to get the hang of the PR workflow so my apologies in advance.

I closed the first PR by accident. I made the mistake of including a commit for 
another issue as well as the commit for this issue. When trying to clean up, I 
reverted back too far and Github closed the PR. I have submitted another PR 
that imports the lzma library as follows:

from test.support.import_helper import import_module

lzma = import_module('lzma')

Let me know if something still does not look right. I'll have some time this 
evening to work it out.

--

___
Python tracker 

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



[issue41482] docstring errors in ipaddress.IPv4Network

2020-08-04 Thread Eric Frederich


New submission from Eric Frederich :

The __init__ method for IPv4Network has a typo where it says all three of 
'192.0.2.0/24', '192.0.2.0/255.255.255.0' and '192.0.0.2/0.0.0.255' should be 
equal.

--
assignee: docs@python
components: Documentation
messages: 374841
nosy: docs@python, eric.frederich
priority: normal
severity: normal
status: open
title: docstring errors in ipaddress.IPv4Network
type: enhancement
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, 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



[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-04 Thread Rishav Kundu

Rishav Kundu  added the comment:

Wouldn’t using mach_continuous_time (and its equivalents on other platforms) 
wherever possible be preferable?

Or would a different API that distinguishes between clocks that track during 
suspend versus those that not be a better idea? Given that at least macOS and 
Linux offer both variants (not sure about Windows)

--

___
Python tracker 

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



[issue41475] __future__.annotations set to become default in Python 4.0?

2020-08-04 Thread Ram Rachum


Ram Rachum  added the comment:

If you'd like me to patch that too, let me know. Also, I'll need a decision on 
whether it should be on a separate PR and if so, to which versions it should be 
backported.

--

___
Python tracker 

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



[issue41481] pip install will install version 0.0.0 if existing in stead of newer ones

2020-08-04 Thread Immo Wetzel


New submission from Immo Wetzel :

if a version 0.0.0 is existing in repo/index ...
pip will install this version and not the newer ones.

--
components: Installation
messages: 374838
nosy: iwetzel
priority: normal
severity: normal
status: open
title: pip install will install version 0.0.0 if existing in stead of newer ones
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-08-04 Thread David Edelsohn


David Edelsohn  added the comment:

As mentioned in the stgdict.c comment, this relates back to #22273 and #29565. 
The passing of arrays/structs is fragile, to use a euphemism. The ctypes 
behavior conforms to the x64 Linux ABI and x64 libffi, even the comment from 
#22273,

"Structs that are larger than 32 bytes get copied to the stack (see 
classify_argument in ffi64.c), so we don't have to worry about classifying 
their elements for register passing. Thus if a new field is added for this in 
StgDictObject, then PyCArrayType_new should only allocate it for array types 
that are 32 bytes or less. Using it for larger array types would serve no point.

And now we're at the crux of the problem.  I don't know what Ronald and others 
recommend.  ctypes is choosing x64 behavior to define an inherently 
target-dependent and ABI-dependent design decisions.  The real solution 
requires that _ctypes/stgdict.c incorporate target-specific logic, but it's not 
clear that the Python community wants to go down that path.

--

___
Python tracker 

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



[issue41480] python won't save

2020-08-04 Thread LX Cubing


New submission from LX Cubing :

When I try to run python, it asks me if I want to save it or not. So I clicked 
yes, like I always do, but nothing happened. It didn't run at all. I keep 
trying, but still it won't save.

--
messages: 374836
nosy: leoxie0733
priority: normal
severity: normal
status: open
title: python won't save
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



[issue41479] pip install== will install 0.0.0 version in stead of showing alll

2020-08-04 Thread Immo Wetzel


New submission from Immo Wetzel :

I do have a pip package with version id 0.0.0 on my own registry.

If I try to get the list of available versions like  before 
with pip install package_name==
it will install version 0.0.0 of the package package_name

thats not right

--
messages: 374835
nosy: iwetzel
priority: normal
severity: normal
status: open
title: pip install== will install 0.0.0 version in stead of showing alll
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-08-04 Thread Tony Reix


Tony Reix  added the comment:

I do agree that the example with memchr is not correct.

About your suggestion, I've done it. With 32. And that works fine.
All 3 values are passed by value.


# cat Pb-3.8.5.py
#!/usr/bin/env python3

from ctypes import *

mine = CDLL('./MemchrArgsHack2.so')

class MemchrArgsHack2(Structure):
_fields_ = [("s",   c_char_p),
("c_n", c_ulong * 2)]

memchr_args_hack2 = MemchrArgsHack2()
memchr_args_hack2.s = b"abcdef"
memchr_args_hack2.c_n[0] = ord('d')
memchr_args_hack2.c_n[1] = 7

print( "sizeof(MemchrArgsHack2): ", sizeof(MemchrArgsHack2) )

print( CFUNCTYPE(c_char_p, MemchrArgsHack2, c_void_p)   (('my_memchr', 
mine)) (memchr_args_hack2, None) )


# cat MemchrArgsHack2.c
#include 
#include 

struct MemchrArgsHack2
{
char *s;
unsigned long c_n[2];
};

extern char *my_memchr(struct MemchrArgsHack2 args)
{
printf("s   element  : char pointer: %p %s\n", args.s, args.s);
printf("c_n element 0: a Long:   %ld\n",   args.c_n[0]);
printf("c_n element 1: a Long:   %ld\n",   args.c_n[1]);

return(args.s +3);
}



TONY Modules/_ctypes/stgdict.c: MAX_STRUCT_SIZE=32
sizeof(MemchrArgsHack2):  24
TONY: libffi: src/powerpc/ffi_darwin.c : ffi_prep_cif_machdep()
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
s->size:24 s->type:13 : FFI_TYPE_STRUCT
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
FFI_TYPE_STRUCT Before s->size:24
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() p->size: 
8 s->size: 8
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
s->size:16 s->type:13 : FFI_TYPE_STRUCT
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
FFI_TYPE_STRUCT Before s->size:16
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:11 : FFI_TYPE_UINT64
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() p->size: 
8 s->size: 8
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:11 : FFI_TYPE_UINT64
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() p->size: 
8 s->size:16
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() After 
ALIGN s->size:16
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
p->size:16 s->size:24
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() After 
ALIGN s->size:24
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c: ffi_call: FFI_AIX
TONY: libffi: cif->abi:  1  -(long)cif->bytes : -144  cif->flags :  8  
ecif.rvalue : fffd210  fn: 9001000a0227760  FFI_FN(ffi_prep_args) : 
9001000a050a108

s   element  : char pointer: a154d40 abcdef
c_n element 0: a Long:   100
c_n element 1: a Long:   7  Correct value appears.
b'def'

With the regular version (16), I have:

sizeof(MemchrArgsHack2):  24
TONY: libffi: src/powerpc/ffi_darwin.c : ffi_prep_cif_machdep()
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
s->size:24 s->type:13 : FFI_TYPE_STRUCT
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() 
FFI_TYPE_STRUCT Before s->size:24
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() p->size: 
8 s->size: 8
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() p->size: 
8 s->size:16
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() After 
ALIGN s->size:16
TONY: libffi: src/powerpc/ffi_darwin.c : aix_adjust_aggregate_sizes() s->size: 
8 s->type:14 : FFI_TYPE_POINTER
TONY: libffi: src/powerpc/ffi_darwin.c: ffi_call: FFI_AIX
TONY: libffi: cif->abi:  1  -(long)cif->bytes : -144  cif->flags :  8  
ecif.rvalue : fffd210  fn: 9001000a0227760  FFI_FN(ffi_prep_args) : 
9001000a050a108

s   element  : char pointer: a154d40 abcdef
c_n element 0: a Long:   100
c_n element 1: a Long:   0<<< Python pushed nothing for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes


Change by Nathan Maynes :


--
pull_requests: +20879
pull_request: https://github.com/python/cpython/pull/21734

___
Python tracker 

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



Re: Updating a variable problem.

2020-08-04 Thread MRAB

On 2020-08-04 18:25, Steve wrote:

How is MSN a new variable? It is not intended to be.

If line 8 is commented out, it is printable in all three locations.

If line 8 is not commented out, then MSN in the previous line is determined to 
be undeclared.

It looks as if I am not allowed to change the contents of the variable MSN.

  
If there's an assignment to a variable anywhere in a function, then that 
variable is assumed to be local to that function unless it's explicitly 
declared global.


In 'EditTheEQlist', you're assigning to 'MSN' on the third line, and 
you're not declaring that it's global in that function, so it's assumed 
to be local. However, on the second line you're trying to use its value, 
but you haven't assigned to it yet.


You declared that 'MSN' was global in 'ReadTheEQfile', but that's a 
different function. 'global' applies only to the function it's used in.




From: Souvik Dutta 
Sent: Tuesday, August 4, 2020 5:12 AM
To: Steve 
Subject: Re: Updating a variable problem.

  


I don't know your exact meaning of fail. But as much as I can say there is a 
new variable MSN being declared in the function that is only seen locally that 
is inside the function. Now python sees this and probably says variable used 
before assigning. You might try declaring a global msn in the function again. 
And then changing msn after the print statement. Also this error occurred 
because python first searches the variable in the local scope which is absent 
earlier and so it searches for the variable in the global scope where it is 
present and so no errors are raised.

Souvik flutter dev

  


On Tue, Aug 4, 2020, 2:30 PM Steve mailto:Gronicus@sga.ninja> 
> wrote:

The print statement works in the EditTheEQlist() therefore the variable is seen 
as having been declared.  If I replace the value in the variable in the next 
line then the print statement fails. Is this still a matter of globality?

If it is, how do I fix it?

FootNote:
If money does not grow on trees, then why do banks have branches?

From: Souvik Dutta mailto:souvik.vik...@gmail.com> >
Sent: Tuesday, August 4, 2020 4:50 AM
To: Steve mailto:Gronicus@sga.ninja> >
Cc: Python List mailto:python-list@python.org> >
Subject: Re: Updating a variable problem.

  Probably because the MSN variable in the second function is not global.

  On Tue, Aug 4, 2020, 2:08 PM Steve mailto:Gronicus@sga.ninja> > wrote:

Why should line 6 fail until line 7 is commented out?
Python complains that MSN is "referenced before assignment".

def ReadTheEQfile():
   global MSN
   MSN = ("1 Monitor") #This line works every time.

def EditTheEQlist():
   print("MSN2 = " + MSN) # Works if the next line is commented out.
   MSN = ("3 Monitor")

# Main()
ReadTheEQfile()
print("MSN1 = " + MSN) # This line works every time
EditTheEQlist()


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


Re: Problems with tool tips...

2020-08-04 Thread Terry Reedy

On 8/3/2020 5:57 PM, Steve wrote:


Python/IDLE How do I get rid of the "suggestion" box tool tips


AFAIK, you are the first person to request this, though perhaps not the 
first to think it.  Escape closes the box.



that always blocks the work I need to see when writing code?


AFAIK, the popup is always below the entry line, to avoid blocking the 
code above it, which defines the named arguments you might want to 
enter.  If the entry line is the last visible line, the box starts on 
top of the status line.  If you see a situation otherwise, please explain.



When you enter code sequentially, so that the entry line is the last 
line, the box does not cover anythings.  'Always' is an exaggeration. 
When you enter a call in the middle of existing code, the most relevant 
code is above, not below.

 > Do they really have to cram it right up at the data entry point?

Most of the time, this seems to be the most useful place ;-).


Can't it be down in the border and out of the way?


Yes, could be, and it sometimes is, but that would generally be less 
useful.  If one zooms the editor window to full window height (avoiding 
the toolbar), then 1-line status bar border allows only the first line 
of the tip.


> I don't use it as much as it is interfering with my work. Very 
distracting.


Since I do nearly all my python coding in IDLE, I find the box easy to 
ignore when I don't need it.


-
Terry Jan Reedy

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


[issue41475] __future__.annotations set to become default in Python 4.0?

2020-08-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

$ python3.9
Python 3.9.0b4 (v3.9.0b4:69dec9c8d2, Jul  2 2020, 18:41:53)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> annotations
_Feature((3, 7, 0, 'beta', 1), (4, 0, 0, 'alpha', 0), 16777216)

--
nosy: +lukasz.langa, rhettinger
title: Fix mistake in "What's new in Python 3.7" -> __future__.annotations set 
to become default in Python 4.0?
type: crash -> 

___
Python tracker 

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



RE: Updating a variable problem.

2020-08-04 Thread Steve
How is MSN a new variable? It is not intended to be.

If line 8 is commented out, it is printable in all three locations.

If line 8 is not commented out, then MSN in the previous line is determined to 
be undeclared.

It looks as if I am not allowed to change the contents of the variable MSN.

 

FootNote:
If money does not grow on trees, then why do banks have branches?

 

From: Souvik Dutta  
Sent: Tuesday, August 4, 2020 5:12 AM
To: Steve 
Subject: Re: Updating a variable problem.

 

I don't know your exact meaning of fail. But as much as I can say there is a 
new variable MSN being declared in the function that is only seen locally that 
is inside the function. Now python sees this and probably says variable used 
before assigning. You might try declaring a global msn in the function again. 
And then changing msn after the print statement. Also this error occurred 
because python first searches the variable in the local scope which is absent 
earlier and so it searches for the variable in the global scope where it is 
present and so no errors are raised. 

Souvik flutter dev

 

On Tue, Aug 4, 2020, 2:30 PM Steve mailto:Gronicus@sga.ninja> > wrote:

The print statement works in the EditTheEQlist() therefore the variable is seen 
as having been declared.  If I replace the value in the variable in the next 
line then the print statement fails. Is this still a matter of globality?

If it is, how do I fix it?

FootNote:
If money does not grow on trees, then why do banks have branches?

From: Souvik Dutta mailto:souvik.vik...@gmail.com> > 
Sent: Tuesday, August 4, 2020 4:50 AM
To: Steve mailto:Gronicus@sga.ninja> >
Cc: Python List mailto:python-list@python.org> >
Subject: Re: Updating a variable problem.

 Probably because the MSN variable in the second function is not global. 

 On Tue, Aug 4, 2020, 2:08 PM Steve mailto:Gronicus@sga.ninja> > wrote:

Why should line 6 fail until line 7 is commented out?
Python complains that MSN is "referenced before assignment".

def ReadTheEQfile():
  global MSN
  MSN = ("1 Monitor") #This line works every time.

def EditTheEQlist():
  print("MSN2 = " + MSN) # Works if the next line is commented out.
  MSN = ("3 Monitor")

# Main()
ReadTheEQfile()
print("MSN1 = " + MSN) # This line works every time
EditTheEQlist()

=
Footnote:
Genie: You have three wishes.
Me: I wish I had more wishes.
Genie: You cannot wish for more wishes.
Me: I wish I could.


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

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


[issue41478] Empty representation of AssertionError

2020-08-04 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi, can you not use its repr:


>>> try: raise ValueError
... except Exception as e: print(f"Following happened: {e!r}")
...
Following happened: ValueError()

?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue41478] Empty representation of AssertionError

2020-08-04 Thread Ilya Kamenshchikov


New submission from Ilya Kamenshchikov :

I have a high level wrapper where I am catching expection and present  it  in 
(more) user-friendly format with a message. 


try:
raise ValueError
except Exception as e:
print(f"Following happened: {e}")

>>> prints "Following happened: "

Can an exception print it's class when it has no message?

--
components: Interpreter Core
messages: 374831
nosy: Ilya Kamenshchikov
priority: normal
severity: normal
status: open
title: Empty representation of AssertionError
type: behavior
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



[issue41463] Avoid duplicating jump information from opcode.py in compile.c

2020-08-04 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 582aaf19e8b94a70c1f96792197770d604ba0fdf by Mark Shannon in 
branch 'master':
bpo-41463: Generate information about jumps from 'opcode.py' rather than 
duplicating it in 'compile.c' (GH-21714)
https://github.com/python/cpython/commit/582aaf19e8b94a70c1f96792197770d604ba0fdf


--

___
Python tracker 

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



[issue12423] signal handler doesn't handle SIGABRT from os.abort

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue29269] test_socket failing in solaris

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40891] Use PEP 573 in functools

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue41439] test_uuid.py and test_ssl.py failure on OSes without os.fork (VxWorks RTOS)

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue32623] Resize dict on del/pop

2020-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c7decc27d529c04a4e6b2922e3f3f9419b920f63 by Hai Shi in branch 
'master':
bpo-40275: Use new test.support helper submodules in tests (GH-21727)
https://github.com/python/cpython/commit/c7decc27d529c04a4e6b2922e3f3f9419b920f63


--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 604bba1f8fe32479c89b9824b2231cc4480dd110 by Hai Shi in branch 
'master':
bpo-40275: Use new test.support helper submodules in tests (GH-21452)
https://github.com/python/cpython/commit/604bba1f8fe32479c89b9824b2231cc4480dd110


--

___
Python tracker 

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



[issue41466] Windows installer: "Add to PATH" should be checked by default

2020-08-04 Thread Steve Dower


Steve Dower  added the comment:

As Eryk says, the defaults include the "py" launcher, which is now recommended 
at the end of installation. Python is also available from the Start 
menu/screen, and PEP 514 allows other tools to reliably detect and offer Python 
installs.

Modifying PATH at all is an advanced scenario, as it may cause other 
(unrelated) applications to stop working. Modifying PATH twice makes launching 
Python unreliable, and attempting to reverse the modification may leave the 
system in an unreliable state. We won't be changing the default.

People who install from the Microsoft Store will get all the shortcuts they 
expect (assuming they are already Linux experts, otherwise they have no 
expectations anyway), because we are able to update what appears on PATH more 
safely.

--
resolution:  -> rejected
stage:  -> resolved
status:  -> closed

___
Python tracker 

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



[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

I failed to reproduce the issue on an up-to-date Fedora Rawhide with 
gdb-9.2-2.fc33.x86_64 ("GNU gdb (GDB) Fedora 9.2-2.fc33").

--

___
Python tracker 

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



[issue41476] test_zoneinfo fails if the _lzma module is missing

2020-08-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Duplicate of https://bugs.python.org/issue41371

--
nosy: +xtreak

___
Python tracker 

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



[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

Other failures on a different architecture, aarch64 Fedora Rawhide Clang 3.9:

https://buildbot.python.org/all/#/builders/687/builds/152

"gdb_version: GNU gdb (GDB) Fedora 9.2-2.fc33"

"Stderr:
Unable to fetch general registers.: No such process.
Selected thread is running."

https://buildbot.python.org/all/#/builders/687/builds/160

"gdb_version: GNU gdb (GDB) Fedora 9.2-2.fc33"

"Stderr:
Unable to fetch general registers.: No such process.
Selected thread is running."

See also bpo-40746: "test_gdb failing on 32-bit armv7l when built with GCC -Og 
(fail on Raspbian on 3.9, regression from 3.8)".

--

___
Python tracker 

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



[issue41476] test_zoneinfo fails if the _lzma module is missing

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-41477: test_genericalias fails if ctypes is missing.

--

___
Python tracker 

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Paul Ganssle


Paul Ganssle  added the comment:

I think for now skipping the tests when lzma is missing is the easiest thing, 
though another option would be to drop the compression on the input test data 
so that the tests don't depend on lzma.

Taking a look at the data files, it looks like we get around 50% compression 
using either lzma or gzip, but the uncompressed file is only 32k to start with:

$ du -b tests/data/*
31054   tests/data/zoneinfo_data.json
15127   tests/data/zoneinfo_data.json.gz
12895   tests/data/zoneinfo_data.json.lz

We're also currently using the "fat" binaries that `zic` produces (which 
includes hard-coded transitions all the way until 2038). The new default for 
`zic` is to produce "slim" binaries, and the script to update test data does 
nothing to explicitly request fat binaries. If we were to switch over to "slim" 
binaries, the result would be more like this:

$ du -b tests/data/*
8297tests/data/zoneinfo_data_slim.json.gz
7750tests/data/zoneinfo_data_slim.json.lz
15551   tests/data/zoneinfo_data_unc_slim.json

So we're still looking at ~2:1 compression for both gzip and lzma, but the 
overall file size is 50% of what it was to start with. The biggest downside to 
this is that the way the "slim" binaries work is that once a rule repeats 
indefinitely, `zic` stops producing explicit transitions for it, and falls back 
to a simple repeating rule, meaning that the current set of tests would take a 
different code path.

I think we can go with the following course of action (3 or 4 different PRs):

1. Start by skipping the tests when `lzma` is missing.
2. Update the test suite so that it is testing more or less the same thing when 
the binaries are compiled with `-b slim`.
3. Change `Lib/test/test_zoneinfo/data/update_test_data.py` so that it pulls 
the raw data from the `tzdata` module on PyPI (which is compiled with `-b 
slim`) instead of the user's machine.
4. Change `update_test_data.py` to stop using `lzma` and change the tests so 
that they are able to process the new format of the JSON files.

If we ever decide that we really want the compression again, I assume that 
`gzip` is found more commonly than `lzma` among systems that don't build the 
whole standard library, so it might be mildly preferable to switch to `gzip`.

--

___
Python tracker 

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



[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> https://buildbot.python.org/all/#builders/1/builds/1194

pythoninfo:

sys.version: 3.10.0a0 (heads/master:da4e09fff6, Aug  4 2020, 03:30:43)  [GCC 
10.2.1 20200723 (Red Hat 10.2.1-1)]

gdb_version: GNU gdb (GDB) Fedora 9.2-2.fc33

--

___
Python tracker 

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



[issue41477] test_genericalias fails if ctypes is missing

2020-08-04 Thread STINNER Victor


New submission from STINNER Victor :

Error:

0:05:47 load avg: 5.95 [311/423/2] test_genericalias failed -- running: 
test_multiprocessing_spawn (1 min 59 sec)
test test_genericalias crashed -- Traceback (most recent call last):

 
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 
272, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)

 
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 
223, in _runtest_inner2 
the_module = importlib.import_module(abstest)   

 
  File "/home/vstinner/python/master/Lib/importlib/__init__.py", line 126, in 
import_module   
   
return _bootstrap._gcd_import(name[level:], package, level) 

 
  File "", line 1030, in _gcd_import   

 
  File "", line 1007, in _find_and_load

 
  File "", line 986, in _find_and_load_unlocked

 
  File "", line 680, in _load_unlocked 

 
  File "", line 790, in exec_module   

 
  File "", line 228, in _call_with_frames_removed  

 
  File "/home/vstinner/python/master/Lib/test/test_genericalias.py", line 16, 
in  
   
from ctypes import Array, LibraryLoader
  File "/home/vstinner/python/master/Lib/ctypes/__init__.py", line 8, in 

from _ctypes import Union, Structure, Array 
ModuleNotFoundError: No module named '_ctypes'


The minimum fix is to skip test_genericalias is ctypes is missing. For example, 
use "ctypes = support.import_helper.import_module('ctypes')" to import ctypes.

See also bpo-41476: test_zoneinfo fails if the _lzma module is missing.

--
components: Tests
messages: 374820
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_genericalias fails if ctypes is missing
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



[issue41476] test_zoneinfo fails if the _lzma module is missing

2020-08-04 Thread STINNER Victor


New submission from STINNER Victor :

Error when _lzma extension is missing:

test test_zoneinfo crashed -- Traceback (most recent call last):

 
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 
272, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
  
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 
223, in _runtest_inner2 
 
the_module = importlib.import_module(abstest)   

 
  File "/home/vstinner/python/master/Lib/importlib/__init__.py", line 126, in 
import_module   
   
return _bootstrap._gcd_import(name[level:], package, level) 

 
  File "", line 1030, in _gcd_import   

 
  File "", line 1007, in _find_and_load
  File "", line 986, in _find_and_load_unlocked

 
  File "", line 680, in _load_unlocked 

 
  File "", line 790, in exec_module   

 
  File "", line 228, in _call_with_frames_removed  

  File "/home/vstinner/python/master/Lib/test/test_zoneinfo/__init__.py", line 
1, in   
  
from .test_zoneinfo import *

 
  File "/home/vstinner/python/master/Lib/test/test_zoneinfo/test_zoneinfo.py", 
line 9, in 
import lzma 

 
  File "/home/vstinner/python/master/Lib/lzma.py", line 27, in  

 
from _lzma import * 

 
ModuleNotFoundError: No module named '_lzma'


The minimum fix is to skip test_zoneinfo is lzma is missing. For example, 
replace "import lzma" with "lzma = support.import_helper.import_module('lzma')".

--
components: Tests
messages: 374819
nosy: p-ganssle, vstinner
priority: normal
severity: normal
status: open
title: test_zoneinfo fails if the _lzma module is missing
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



[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-08-04 Thread Thor Whalen


Thor Whalen  added the comment:

Hi Terry, sorry for the later reply.

Is this a bugfix? Well, I'm not sure what you would call a bug. Can't one
always redefine a bug to be a feature, and visa versa?

I would definitely say that the behavior (seeing one default in the
signature, but a different one actually taking effect) is probably not a
good one -- as this could lead to very hard to find... bugs. It seems in
fact that third party "fix your decorators" packages such as `wrapt` and
`boltons.funcutils` agree, since their implementation of `wraps` doesn't
have this... "misaligned-by-default feature" that `functools.wraps` does.

Unless I'm missing something, my guess of why `functools.wraps` doesn't
include what I put in my pull request is that it breaks some tests. But I
had a look at the failing test and it seems that it is the test that is
"wrong" (i.e. tests for a behavior that really shouldn't be the default).

See comment:
https://github.com/python/cpython/pull/21379#issuecomment-655661983

The question is: Is there a lot of code out there that depends on this
misaligned behavior. My guess is not.

On Fri, Jul 10, 2020 at 9:58 PM Terry J. Reedy 
wrote:

>
> Terry J. Reedy  added the comment:
>
> Is this actually a bugfix?
>
> --
> nosy: +terry.reedy
> versions: +Python 3.10 -Python 3.8
>
> ___
> Python tracker 
> 
> ___
>

--
nosy: +Thor Whalen

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

> > I don't know how to get rid of all those commit messages.
>
> I suggest you to create a local branch per change, rather than using "master".
>
> I consider that "origin" is g...@github.com:python/cpython.git. Check your 
> remotes with "git remote -v".

Hmmm... Seems like a bunch of extra work for a one-line change to a
Makefile... There's no easier way to create PRs for these trivial
changes?

--

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> I don't know how to get rid of all those commit messages.

I suggest you to create a local branch per change, rather than using "master".

I consider that "origin" is g...@github.com:python/cpython.git. Check your 
remotes with "git remote -v".

Example where "master" is your PR 21732.

git switch -c frameobject master
git switch master
git reset --hard origin/master  # revert your changes

Then fix your frameobject:

git switch master
git fetch && git merge --ff  # ensure that you are up to date
git switch frameobject
git rebase master

Check what you get:

git log master.. --pretty=oneline

You should see only one commit.

Close your PR and create a new one on the "frameobject" branch.

--

___
Python tracker 

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



[issue41475] Fix mistake in "What's new in Python 3.7"

2020-08-04 Thread Ram Rachum


Change by Ram Rachum :


--
type:  -> crash
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



[issue41475] Fix mistake in "What's new in Python 3.7"

2020-08-04 Thread Ram Rachum


Change by Ram Rachum :


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

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

> they all look to be of the form "Merge remote-tracking branch 
> 'upstream/master'".

Aside from one where I erroneously committed a change to the wrong
branch, then backed it out immediately.

--

___
Python tracker 

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



[issue41475] Fix mistake in "What's new in Python 3.7"

2020-08-04 Thread Ram Rachum


New submission from Ram Rachum :

Writing the patch now.

--
assignee: docs@python
components: Documentation
messages: 374814
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Fix mistake in "What's new in Python 3.7"
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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

I see what @vstinner is talking about. If you look at those commit messages, 
they all look to be of the form "Merge remote-tracking branch 
'upstream/master'". That is, they are me syncing python/cpython/master to 
python/smontanaro/master. There is, in fact, just the one file changed, 
Makefile.pre.in, with the addition of a single dependency.

I don't know how to get rid of all those commit messages.

--

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

> Your PR has 124 commits, that looks strange.

Funny, it told me just one file had changed (Makefile.pre.in). I was attempting 
to make a PR against that one change from my fork of master to the main repo. 
Let me take another crack at it.

--

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Created a pull request. Hopefully I didn't muff the protocol too badly.

Your PR has 124 commits, that looks strange.

--
nosy: +vstinner

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

Created a pull request. Hopefully I didn't muff the protocol too badly.

--
stage: patch review -> 

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


Change by Skip Montanaro :


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

___
Python tracker 

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



[issue41474] Missing dependency on Include/cpython/frameobject.h

2020-08-04 Thread Skip Montanaro


New submission from Skip Montanaro :

When Include/cpython/frameobject.h was created, there was no dependency added 
to Makefile.pre.in.

--
components: Build
messages: 374809
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: Missing dependency on Include/cpython/frameobject.h
type: compile error
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



[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-04 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#builders/1/builds/1194

0:07:05 load avg: 16.74 [421/423/1] test_gdb failed (2 min 29 sec) -- running: 
test_capi (1 min 28 sec), test_lib2to3 (1 min 22 sec)
(...)
==
FAIL: test_dicts (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of dictionaries
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64/build/Lib/test/test_gdb.py",
 line 332, in test_dicts
self.assertGdbRepr({'foo': 'bar'}, "{'foo': 'bar'}")
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64/build/Lib/test/test_gdb.py",
 line 308, in assertGdbRepr
gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64/build/Lib/test/test_gdb.py",
 line 284, in get_gdb_repr
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))
AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x5fbc79: file 
Python/bltinmodule.c, line 1173.\n[Thread debugging using libthread_db 
enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n'
Breakpoint 1 at 0x5fbc79: file Python/bltinmodule.c, line 1173.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".


Stderr:
Couldn't get registers: No such process.
Selected thread is running.

==
FAIL: test_pycfunction (test.test_gdb.PyBtTests) [_testcapi.meth_noargs]
Verify that "py-bt" displays invocations of PyCFunction instances
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64/build/Lib/test/test_gdb.py",
 line 912, in test_pycfunction
self.assertIn(f'

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



[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-04 Thread Howard A. Landman


Howard A. Landman  added the comment:

As far as we can tell, this is a known Py_DECREF problem with spidev==3.4. 
Testing on spidev==3.5 has not triggered the bug so far, so it appears to be 
already fixed.

Under 3.4, changing the list to a tuple did not affect the behavior.

--

___
Python tracker 

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



[issue41472] webbrowser uses deprecated env variables to detect desktop type

2020-08-04 Thread Marco Trevisan


Change by Marco Trevisan :


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

___
Python tracker 

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



[issue41472] webbrowser uses deprecated env variables to detect desktop type

2020-08-04 Thread Marco Trevisan


New submission from Marco Trevisan :

Webbrowser uses env variables such as GNOME_DESKTOP_SESSION_ID that have been 
dropped by GNOME in recent releases

--
components: Library (Lib)
messages: 374806
nosy: Trevinho
priority: normal
severity: normal
status: open
title: webbrowser uses deprecated env variables to detect desktop type
type: enhancement
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



[issue41471] After installing python 3.x on Mac pip doesn't work at all

2020-08-04 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't quite understand what the issue is.

* What proxy settings do you have?

* Is the problem reproducible without using pip?

  - By using the requests API to fetch a web page
  - By using the stdlib http.client API to do the same

--

___
Python tracker 

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



[issue41468] Unrecoverable server exiting

2020-08-04 Thread Albert Francis


Albert Francis  added the comment:

Dear Sir,

I got the solution. Thanks

On Tue, 4 Aug 2020, 16:55 Terry J. Reedy,  wrote:

>
> Terry J. Reedy  added the comment:
>
> One should never see this message.  As far as I remember, I have seen it
> only once in the last several years.  It is intended to indicate a 'random'
> non-reproducible glitch in the communication machinery connecting the IDLE
> GUI process and the user code execution process.  The most likely solution
> is to retry what you were doing.  A report should only be made is the error
> is reproducible. "Unrecoverable, server exiting" is meant to convey this,
> but the meaning should be explained in the message.  So I consider this a
> doc improvement issue.
>
> If you report a repeatable failure, then we can look into that.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-08-04 Thread Sanket Rathi


Change by Sanket Rathi :


--
nosy: +sanket

___
Python tracker 

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



[issue41468] Unrecoverable server exiting

2020-08-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

One should never see this message.  As far as I remember, I have seen it only 
once in the last several years.  It is intended to indicate a 'random' 
non-reproducible glitch in the communication machinery connecting the IDLE GUI 
process and the user code execution process.  The most likely solution is to 
retry what you were doing.  A report should only be made is the error is 
reproducible. "Unrecoverable, server exiting" is meant to convey this, but the 
meaning should be explained in the message.  So I consider this a doc 
improvement issue.

If you report a repeatable failure, then we can look into that.

--

___
Python tracker 

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes


Change by Nathan Maynes :


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

___
Python tracker 

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



[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-04 Thread Nathan Maynes


Nathan Maynes  added the comment:

I'm creating a pull request that implements the suggestion by xtreak.

--
nosy: +nmaynes

___
Python tracker 

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



[issue18876] Problems with files opened in append mode with io module

2020-08-04 Thread Erik Bray


Erik Bray  added the comment:

Indeed, this can be closed.

--
resolution:  -> fixed
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



[issue20082] Misbehavior of BufferedRandom.write with raw file in append mode

2020-08-04 Thread Erik Bray


Change by Erik Bray :


--
pull_requests: +20873
pull_request: https://github.com/python/cpython/pull/21729

___
Python tracker 

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



[issue41471] After installing python 3.x on Mac pip doesn't work at all

2020-08-04 Thread Jens Petersen


New submission from Jens Petersen :

Using pip fails with the same error messages independent of version an user. 
Also su or sudo -H doesn't change anything:
How to Reproduce
install python 3.x on your Mac and try pip

After a quite long search I found that it is a problem with the proxy config. 
You need to remove all settings in network settings/proxy even those defining 
which domains shouldn't use a proxy. Proxy settings work fine with everything 
except python.

xcode-select install
ruby -e "$(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pyenv
pyenv install 3.7.3
pip list --outdated or pip install something
Exception
xxx-MBP:~ xxx$ pip list --outdated
Exception:
Traceback (most recent call last):
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py",
 line 179, in main
status = self.run(options, args)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py",
 line 144, in run
packages = self.get_outdated(packages, options)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py",
 line 152, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py",
 line 152, in 
dist for dist in self.iter_packages_latest_infos(packages, options)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/commands/list.py",
 line 179, in iter_packages_latest_infos
all_candidates = finder.find_all_candidates(dist.key)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py",
 line 610, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py",
 line 743, in _get_pages
page = _get_html_page(location, session=self.session)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py",
 line 229, in _get_html_page
resp = _get_html_response(url, session=session)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/index.py",
 line 177, in _get_html_response
"Cache-Control": "max-age=0",
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py",
 line 546, in get
return self.request('GET', url, **kwargs)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_internal/download.py",
 line 403, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py",
 line 524, in request
prep.url, proxies, stream, verify, cert
  File 
"/Users/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py",
 line 700, in merge_environment_settings
env_proxies = get_environ_proxies(url, no_proxy=no_proxy)
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/utils.py",
 line 761, in get_environ_proxies
if should_bypass_proxies(url, no_proxy=no_proxy):
  File 
"/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip/_vendor/requests/utils.py",
 line 745, in should_bypass_proxies
bypass = proxy_bypass(parsed.hostname)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 
2610, in proxy_bypass
return proxy_bypass_macosx_sysconf(host)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 
2587, in proxy_bypass_macosx_sysconf
return _proxy_bypass_macosx_sysconf(host, proxy_settings)
  File "/Users/xxx/.pyenv/versions/3.7.3/lib/python3.7/urllib/request.py", line 
2573, in _proxy_bypass_macosx_sysconf
if (hostIP >> mask) == (base >> mask):
ValueError: negative shift count

--
components: macOS
messages: 374800
nosy: ned.deily, peteje66, ronaldoussoren
priority: normal
pull_requests: 20872
severity: normal
status: open
title: After installing python 3.x on Mac pip doesn't work at all
type: crash
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



[issue41468] Unrecoverable server exiting

2020-08-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Start IDLE in a Terminal/Command Prompt window with `python -m idlelib`, where 
'python` is whatever runs your most recent 3.x python.  Then see if an error 
message shows up after IDLE exits.

--
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue41470] smtplib.SMTP should reset internal 'helo' and 'ehlo' state within 'connect()'

2020-08-04 Thread Peter Stokes

New submission from Peter Stokes :

Attempting to reuse an instance of 'smtplib.SMTP', via invocation of the 
'smtplib.SMTP.connect(…)' function, results in an invalid SMTP command sequence 
being issued to the connected server:

```
import smtplib

smtp = smtplib.SMTP()
smtp.connect('smtp.gmail.com')
smtp.ehlo_or_helo_if_needed()
smtp.close()
try:
smtp.quit()
except smtplib.SMTPServerDisconnected:
pass
smtp.connect('smtp.gmail.com')
print(smtp.mail('u...@example.com'))
```

results in "(503, b'5.5.1 EHLO/HELO first. … - gsmtp')"

The values stored in 'self.helo_resp' and 'self.ehlo_resp', as considered 
within 'smtplib.SMTP.ehlo_or_helo_if_needed()' [1], should be reset to a value 
of 'None' upon successfully establishing a new connection to a server. The 
correct sentiment is expressed within 'smtplib.SMTP.quit()' [2] but this 
resetting of state should be performed upon establishing a new connection 
rather than termination of an old connection. Whilst the simplified example 
provided is arguably an invalid use of the 'smtplib.SMTP' library the scenario 
can occur, specifically when the initial connection is unilaterally terminated 
by the server, which makes the reset logic provided in 'smtplib.SMTP.quit()' 
inaccessible due to the 'smtplib.SMTPServerDisconnected' exception raised as a 
consequence of attempting to execute an SMTP 'QUIT' command over a disconnected 
socket.

[1] 
https://github.com/python/cpython/blob/da51ba442c7bf717872633676207c1ae10e99c99/Lib/smtplib.py#L603
[2] 
https://github.com/python/cpython/blob/da51ba442c7bf717872633676207c1ae10e99c99/Lib/smtplib.py#L989L990

--
components: email
messages: 374798
nosy: Dadeos, barry, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib.SMTP should reset internal 'helo' and 'ehlo' state within 
'connect()'
type: behavior
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



[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-04 Thread Christian Heimes


Christian Heimes  added the comment:

Yeah, my bet is on SpiDev_xfer(), 
https://github.com/doceme/py-spidev/blob/master/spidev_module.c#L458

--
nosy: +christian.heimes

___
Python tracker 

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



Re: Updating a variable problem.

2020-08-04 Thread Souvik Dutta
Probably because the MSN variable in the second function is not global.

On Tue, Aug 4, 2020, 2:08 PM Steve  wrote:

> Why should line 6 fail until line 7 is commented out?
> Python complains that MSN is "referenced before assignment".
>
> def ReadTheEQfile():
>   global MSN
>   MSN = ("1 Monitor") #This line works every time.
>
> def EditTheEQlist():
>   print("MSN2 = " + MSN) # Works if the next line is commented out.
>   MSN = ("3 Monitor")
>
> # Main()
> ReadTheEQfile()
> print("MSN1 = " + MSN) # This line works every time
> EditTheEQlist()
>
>
>
> =
> Footnote:
> Genie: You have three wishes.
> Me: I wish I had more wishes.
> Genie: You cannot wish for more wishes.
> Me: I wish I could.
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41468] Unrecoverable server exiting

2020-08-04 Thread E. Paine


E. Paine  added the comment:

To help us to reproduce and understand the issue, please could you give us 1) a 
more detailed explanation of the problem you are facing and 2) steps to 
reproduce the issue (maybe providing a minimal code example if that is the 
cause). Is this a bug with IDLE, though, as you say "solve" (which I interpret 
to mean you want help with your code) in which case it may be better suited to 
Stack Overflow?

--
nosy: +epaine

___
Python tracker 

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



Updating a variable problem.

2020-08-04 Thread Steve
Why should line 6 fail until line 7 is commented out?
Python complains that MSN is "referenced before assignment".

def ReadTheEQfile():
  global MSN
  MSN = ("1 Monitor") #This line works every time.

def EditTheEQlist():
  print("MSN2 = " + MSN) # Works if the next line is commented out.
  MSN = ("3 Monitor")

# Main()
ReadTheEQfile()
print("MSN1 = " + MSN) # This line works every time
EditTheEQlist()



=
Footnote:
Genie: You have three wishes.
Me: I wish I had more wishes.
Genie: You cannot wish for more wishes.
Me: I wish I could.


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


[issue41259] Find adverbs is not correct on the documentation

2020-08-04 Thread Sagnik Mazumder


Sagnik Mazumder  added the comment:

fixed finding adverbs example in re docs

--
message_count: 5.0 -> 6.0
nosy: +Sagnik Mazumder
nosy_count: 6.0 -> 7.0
pull_requests: +20871
pull_request: https://github.com/python/cpython/pull/21728

___
Python tracker 

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



Re: IDLE 3.8.4 [was 3.8.3] -- bug report

2020-08-04 Thread Ned Deily
On 2020-08-03 15:37, Halvard Tislavoll wrote:
> I'am dealing with a bug
[...]
> Python 3.8.4 (default, Jul 20 2020, 20:20:14)
> IDLE 3.8.4
> 
> I have been using IDLE for many years. But now I can not do it.
> 
> Example:
> I write a heading for a python script in my text editor, xed and save as 
> 'test.py'.
> ..
>     #! /usr/bin/env python
>     #  -*- coding: utf-8 -*-
> 
>     # ... pandas-techniques-python-data-manipulation/
> 
>     import pandas as pd
>     import numpy as np
> 
>     #---
> ...
> Then I open 'test.py' in IDLE. Everything looks normal.
> 
> I am testing whether it is possible to save with the shortcut ctrl-s. OK.
> 
> But then I write the following line:
> 
>     print ("\ n # 1 - Boolean Indexing in Pandas \ n")
> 
> Result:
> storage no longer works. And IDLE becomes useless!
> 
> The problem is that print statement no longer support my sign "-" U + 2013 EN 
> DASH
> 
> but this sign goes well;  "-" U + 002D HYPHEN-MINUS

See https://bugs.python.org/issue41300

The problem was introduced in Python 3.8.4 (released 2020-07-13) and has
been fixed in 3.8.5 which was released 2020-07-20.


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