[issue40334] PEP 617: new PEG-based parser

2020-04-22 Thread STINNER Victor


STINNER Victor  added the comment:

Once PR 19503 will be merged, I would be interested to see if 
setjmp()/longjmp() can be avoided. I'm scared by these functions: they require 
that all functions in between setjmp() and longjmp() call stack have no state 
and don't need any cleanup at exit.

--
nosy: +vstinner

___
Python tracker 

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



[issue40338] [Security] urllib and anti-slash (\) in the hostname

2020-04-22 Thread hai shi


hai shi  added the comment:

>It seems to behave as expected
+1. This is an interesting test;)

--

___
Python tracker 

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



[issue40138] Windows implementation of os.waitpid() truncates the exit status (status << 8)

2020-04-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18980
pull_request: https://github.com/python/cpython/pull/19654

___
Python tracker 

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



[issue40138] Windows implementation of os.waitpid() truncates the exit status (status << 8)

2020-04-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9bee32b34e4fb3e67a88bf14d38153851d4c4598 by Victor Stinner in 
branch 'master':
bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19637)
https://github.com/python/cpython/commit/9bee32b34e4fb3e67a88bf14d38153851d4c4598


--

___
Python tracker 

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



[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-22 Thread STINNER Victor


STINNER Victor  added the comment:

In Python 3.8, random.Random docstring starts with "Random number generator 
base class".

I do understand that the random module design predates the abc module (added to 
Python 2.7). I'm now proposing to add a real base class to move it towards 
modern Python stdlib coding style.


That's the behavior that I would expect from a "base class":

>>> class MySequence(collections.abc.Sequence): pass
... 
>>> seq=MySequence()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Can't instantiate abstract class MySequence with abstract methods 
__getitem__, __len__

Some examples of stdlib modules which implement base classes like this:

* collections.abc.Sequence
* numbers.Complex
* selectors.BaseSelector
* typing.SupportsInt

asyncio.AbstractEventLoop doesn't fail when an instance is created, but when an 
abstract method is created. Users can choose to inherit from 
asyncio.BaseEventLoop or asyncio.AbstractEventLoop depending if they wany to 
inherit partially of BaseEventLoop features, or really create an event loop 
from scratch (AbstractEventLoop). Other classes which are designed like that:

* email._policybase.Policy
* http.cookiejar.CookiePolicy
* importlib.abc.Loader
* wsgiref.handlers.BaseHandler

I don't think that it's worth it to bother with abc.ABC abstraction here, and 
so I only propose to provide methods which are implemented as "raise 
NotImplementedError".

--

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

I am in favor of this. We could promote LibCST, which is based on Parso, which 
uses a forked version of pgen2 (the parser in lib2to3). I believe one of these 
could switch to a fork of pegen as its parser, so it will be able to handle new 
PEG based syntax in 3.10+.

Removal by 3.12 might be feasible.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-22 Thread STINNER Victor


STINNER Victor  added the comment:

> Making it easy to create subclasses was never a goal regardless.

It's clearly advertised at the beginning of the documentation:

"Class Random can also be subclassed if you want to use a different basic 
generator of your own devising: (...)"

Do you mean that the documentation is wrong and users must not subclass 
random.Random?


> If that makes any method currently in use slower, it's not worth it.

I don't think that my PR 19631 has any impact on random.Random and 
random.SystemRandom performances. Only new 3rd party classes which will be 
written to inherit from the *new* random.BaseRandom loose the gauss() 
optimization.

It would be possible to keep the optimization, but it would make class 
inheritance more complex: subclasses would have to call seed(), getstate() and 
setstate() methods of BaseRandom. Moreover, I dislike that the base class is 
not thread state. I prefer to keep it simple and correct.


> that reworking this doesn't solve any actual problem.

I changed the issue title to clarify my intent.

My intent is to ease the creation of subclasses. In Python 3.8, a subclass has 
to *override* 5 methods: getrandbits(), random(), seed(), getstate() and 
setstate().

With the proposed BaseRandom, a sublcass only has to *implement* *1* single 
method, getrandbits():

* random() and randbytes() are implemented with getrandbits() automatically
* seed(), getstate() and setstate() raise NotImplementedError, as done by 
SystemRandom currently. Obviously, you can override them if you want. But at 
least, you don't inherit the whole Mersenne Twister state by default.

The current problem is that Python 3.9 adds randbytes() which means that a 
class which inherit from random.Random now has to override not 5 but 6 methods: 
it now also has to override randbytes().

Raymond proposes to remove _random.Random.randbytes() C implementation and use 
instead a Python implementation which is 5x slower.

For me, it's surprising that if a subclass doesn't override all methods, it 
gets a Mersenne Twister implementation. See my msg366918 example. I would 
prefer a real base class with has no default implementation.

It doesn't prevent people to continue to inherit from random.Random: classes 
which inherit from random.Random continue to work.

Note: currently in my PR 19631, seed() has to be implemented since it's called 
by the constructor. I'm not sure if it's a good design or not.

--
title: Redesign random.Random class inheritance -> Add random.BaseRandom to 
ease implementation of subclasses

___
Python tracker 

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



[issue40362] AbstractBasicAuthHandler does not support the following scheme: 'Bearer'

2020-04-22 Thread Paul Stoner


Paul Stoner  added the comment:

--4/22/2020 09:36
I disconnected from my corporate vpn and ran the script over my private network 
with the same result

--

___
Python tracker 

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



[issue40362] AbstractBasicAuthHandler does not support the following scheme: 'Bearer'

2020-04-22 Thread Paul Stoner


New submission from Paul Stoner :

I found this issue when running an ansible playbook. In the playbook we go out 
to Azure Artifacts to download a customer jar to be deploy with a web 
application.

After some digging, I found the error comes from the request class in the 
urllib library. Knowing this I wrote a small program to test and try to 
decipher what is happening.

I've attached a scrubbed version of my test code. I've stripped all sensitive 
information. You may need to have an azure DevOps account with an artifact 
repository set up. I have not tested this against any other type of repository, 
such as GitHub.

Additional information:
1) I also use CNTLM in order to avoid authentication through our corporate 
firewall. I have tested this with and without CNTLM active

2) My organization utilizes ADFS Federated authentication. I am assuming this 
is where the Bearer token is coming from. I will try and test this on a private 
network to see if ADFS is the issue. I'll augment this bug with my findings

The debug output is shown below

3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
send: b'GET /.../_packaging/artifacts/maven/v1/custom.jar 
HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
pkgs.dev.azure.com\r\nUser-Agent: Python-urllib/3.8\r\nConnection: 
close\r\n\r\n'
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Cache-Control: no-cache
header: Pragma: no-cache
header: Content-Length: 307
header: Content-Type: application/json; charset=utf-8
header: Expires: -1
header: P3P: CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi 
BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"
header: WWW-Authenticate: Bearer authorization_uri=https://login.windows.net/...
header: WWW-Authenticate: Basic 
realm="https://pkgsprodcus1.pkgs.visualstudio.com/;
header: WWW-Authenticate: TFS-Federated
header: X-TFS-ProcessId: ...
header: Strict-Transport-Security: max-age=31536000; includeSubDomains
header: ActivityId: ...
header: X-TFS-Session: ...
header: X-VSS-E2EID: ...
header: X-FRAME-OPTIONS: SAMEORIGIN
header: X-TFS-FedAuthRealm: https://pkgsprodcus1.pkgs.visualstudio.com/
header: X-TFS-FedAuthIssuer: https://www.visualstudio.com/
header: X-VSS-AuthorizationEndpoint: https://vssps.dev.azure.com/.../
header: X-VSS-ResourceTenant: ...
header: X-VSS-S2STargetService: 
0030---8000-/visualstudio.com
header: X-TFS-FedAuthRedirect: https://spsprodcus2.vssps.visualstudio.com/...
header: Request-Context: appId=cid-v1:540f64bd-7388-47ab-bdf2-a94451f9dd55
header: Access-Control-Expose-Headers: Request-Context
header: X-Content-Type-Options: nosniff
header: X-MSEdge-Ref: Ref A: ... Ref B: CHGEDGE1216 Ref C: 2020-04-22T13:01:32Z
header: Date: Wed, 22 Apr 2020 13:01:32 GMT
header: Connection: close
AbstractBasicAuthHandler does not support the following scheme: 'Bearer'

--
components: Library (Lib)
files: linktest_clean.py
messages: 367002
nosy: Paul Stoner
priority: normal
severity: normal
status: open
title: AbstractBasicAuthHandler does not support the following scheme: 'Bearer'
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49085/linktest_clean.py

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-22 Thread Barry Alan Scott


Barry Alan Scott  added the comment:

Anthony,

Now that everything is opened using open_code that returns bytes its
not clear to me why this breaks for you.

Further the data must be bytes for the codings to be figured out.

Removing the b'\n' may be reasonable, but not for the reason given.
I kept it as the original code did this and assumed it was needed.
Maybe for Windows users that forget to put a trailing NL?

How can I reproduce your user case?

--

___
Python tracker 

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



[issue36299] array: Deprecate 'u' type in array module

2020-04-22 Thread Inada Naoki


Inada Naoki  added the comment:

I closed GH-12497 (Py_UNICODE -> Py_UCS4).
I created GH-19653 (Py_UNICODE -> wchar_t) instead.

--

___
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-04-22 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +18979
pull_request: https://github.com/python/cpython/pull/19653

___
Python tracker 

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



[issue40356] OverflowError: mktime argument out of range

2020-04-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The patch assumed using the magic method attribute as the way to evaluate an 
object in a context which I got to know is wrong since evaluations in context 
like boolean are not only dependent on one magic method but has a precedence 
over several others. In the event of 3.9 alpha 6 being the next candidate I 
guess the change can be reverted to be revisited later about the desired 
behaviour with backwards compatibility. The docs could perhaps be clarified 
that calling magic method on a wrap gives default set of values. 

Thoughts on reversion or other possible approaches?

--

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-04-22 Thread Michael Felt


Michael Felt  added the comment:

When I have more time I hope to investigate specifically what is
different in the assembly code - with/without the __noreturn__ change.

On 19/04/2020 08:20, Batuhan Taskaya wrote:
> Batuhan Taskaya  added the comment:
>
> Moving assertion from _PyObject_GC_TRACK to gen_dealloc (just before the 
> _PyObject_GC_TRACK call) results with success ()
>
>  if (gen->gi_weakreflist != NULL)
>  PyObject_ClearWeakRefs(self);
> -
> +_PyObject_ASSERT_FROM(self, !_PyObject_GC_IS_TRACKED(self),
> +  "object already tracked by they garbage collector",
> +  __FILE__, __LINE__, "_PyObject_GC_TRACK");
>  _PyObject_GC_TRACK(self);
>  
>  if (PyObject_CallFinalizerFromDealloc(self))
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue38360] single-argument form of -isysroot should be supported

2020-04-22 Thread Joshua Root


Joshua Root  added the comment:

That ValueError I mentioned causes build failures for extension modules 
whenever the CFLAGS in sysconfig contains an -isysroot flag in the single arg 
form. We ran into it a lot in MacPorts on Mojave and Catalina. So I would 
consider it a bug, and would prefer to backport to all branches that are open 
for bug fixes.

--

___
Python tracker 

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



[issue39817] CRITICAL: TypeError: cannot pickle 'generator'

2020-04-22 Thread Oscar


Oscar  added the comment:

Hello there. Im sorry very much by not replying to the answers. The source code 
is not mine, not written by me.

I can pass a link from the project issue tracker
https://github.com/getpelican/pelican/issues/2674#issuecomment-569431530
telling that the code works with Python 3.6.8 and 3.7.3, but not with Python 
3.8.

Thank you for your time.

--

___
Python tracker 

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



[issue39423] Process finished with exit code -1073741819 (0xC0000005) when trying to access data from a pickled file

2020-04-22 Thread mapf


mapf  added the comment:

Ok, I created a little something. It's not very pretty, but it works for me, 
meaning it causes the process to finish with exit code -1073741819 (0xC005).

--
Added file: https://bugs.python.org/file49084/temp.py

___
Python tracker 

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



[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-22 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +18978
pull_request: https://github.com/python/cpython/pull/19652

___
Python tracker 

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



[issue34990] year 2038 problem in compileall.py

2020-04-22 Thread Ammar Askar


Change by Ammar Askar :


--
nosy: +ammar2
nosy_count: 4.0 -> 5.0
pull_requests: +18977
pull_request: https://github.com/python/cpython/pull/19651

___
Python tracker 

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



[issue38329] macOS python.org installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x

2020-04-22 Thread Ned Deily


Ned Deily  added the comment:

With Python 2 now officially retired, it's time to change the installer 
behavior.  With the merged change, as of Python 3.9.0 (alpha 6) the python.org 
macOS installers will now update the Current version symmlink in the 
/Library/Frameworks Python being installed.  Since this would be a change in 
behavior that could affect current users of Python 3.8.x or 3.7.x, I think we 
should not backport this to those versions.  Thanks again for the report!

--
components: +Installation
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -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



[issue38329] macOS python.org installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x

2020-04-22 Thread Ned Deily


Ned Deily  added the comment:


New changeset bcc136ba892e62078a67ad0ca0b34072ec9c88aa by Ned Deily in branch 
'master':
bpo-38329: python.org macOS installers now update Current symlink (GH-19650)
https://github.com/python/cpython/commit/bcc136ba892e62078a67ad0ca0b34072ec9c88aa


--

___
Python tracker 

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



[issue37339] os.path.ismount returns true on nested btrfs subvolumes

2020-04-22 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue38329] macOS python.org installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x

2020-04-22 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue39423] Process finished with exit code -1073741819 (0xC0000005) when trying to access data from a pickled file

2020-04-22 Thread mapf


mapf  added the comment:

Hi, thanks for your interest! Since this was quite some time ago now, I 
eventually found a workaround (I think I made dicts out of the 1d slices and 
saved them instead) and the project moved on. I don't have the code from back 
then anymore, I'm sorry. But I can try to recreate it. I'm not sure if I will 
succeed though.

--

___
Python tracker 

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



[issue40361] Darwin systems using win settings for webbrowser.py

2020-04-22 Thread Viraat Das


Change by Viraat Das :


--
components: Distutils
nosy: Viraat Das, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Darwin systems using win settings for webbrowser.py
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



[issue38360] single-argument form of -isysroot should be supported

2020-04-22 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR! This seems like a borderline feature rather than a bug so, 
unless there is a compelling reason to backport it to 3.8.x, I'm just going to 
push it to master for release in 3.9.0 (as of alpha 6).

--
assignee:  -> ned.deily
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 2.7, 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



[issue38360] single-argument form of -isysroot should be supported

2020-04-22 Thread Ned Deily


Ned Deily  added the comment:


New changeset b310700976524b4b99ee319c947ca40468716fc9 by Joshua Root in branch 
'master':
bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480)
https://github.com/python/cpython/commit/b310700976524b4b99ee319c947ca40468716fc9


--

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread miss-islington


miss-islington  added the comment:


New changeset 3a5545025685040842420c85a4a9aab5f044aeb8 by Miss Islington (bot) 
in branch '3.8':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/3a5545025685040842420c85a4a9aab5f044aeb8


--

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread miss-islington


miss-islington  added the comment:


New changeset 3a5545025685040842420c85a4a9aab5f044aeb8 by Miss Islington (bot) 
in branch '3.8':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/3a5545025685040842420c85a4a9aab5f044aeb8


--

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread miss-islington


miss-islington  added the comment:


New changeset abdfb3b47156a6ca5696b6f4380d412a460b718a by Miss Islington (bot) 
in branch '3.7':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/abdfb3b47156a6ca5696b6f4380d412a460b718a


--

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread Miro Hrončok

Change by Miro Hrončok :


--
pull_requests: +18975
pull_request: https://github.com/python/cpython/pull/19648

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread miss-islington


miss-islington  added the comment:


New changeset abdfb3b47156a6ca5696b6f4380d412a460b718a by Miss Islington (bot) 
in branch '3.7':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/abdfb3b47156a6ca5696b6f4380d412a460b718a


--

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18974
pull_request: https://github.com/python/cpython/pull/19647

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18973
pull_request: https://github.com/python/cpython/pull/19647

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +18971
pull_request: https://github.com/python/cpython/pull/19646

___
Python tracker 

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



[issue38439] Python needs higher resolution app/menu icons

2020-04-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 3a69f3caeeaea57048ed3bc3051e16854b9a4cd6 by Miro Hrončok in 
branch 'master':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/3a69f3caeeaea57048ed3bc3051e16854b9a4cd6


--

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok
nosy_count: 2.0 -> 3.0
pull_requests: +18970
pull_request: https://github.com/python/cpython/pull/17473

___
Python tracker 

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



[issue1490384] PC new-logo-based icon set

2020-04-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 3a69f3caeeaea57048ed3bc3051e16854b9a4cd6 by Miro Hrončok in 
branch 'master':
bpo-38439: Add 256px IDLE icon (GH-17473)
https://github.com/python/cpython/commit/3a69f3caeeaea57048ed3bc3051e16854b9a4cd6


--
nosy: +terry.reedy

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-04-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

By design, IDLE should only allow one editor instance per file for a given 
python-IDLE process.  "$ python3 fails.py" opens a new python-IDLE process, 
independent of existing processes. It is possible that double-clicking good.py 
multiple times opens a new IDLE process each time, without a new Shell.  You 
could check the process list in Terminal. (I have forgotten the unix command 
and barely know bash.)

--

___
Python tracker 

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



[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

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

Vedran Čačić  added the comment:

Mapping lambdas is always inferior to comprehensions, in fact the main reason 
comprehensions were introduced was that mapping lambdas was cumbersome. (It 
didn't work so well for filtering by lambdas, but that's another story.)

As I said, Py3K was beneficial since raw maps weren't eager anymore, but it 
also gave us a print_function, enabling the new antipattern

[print(obj) for obj in mylist]

which wasn't possible before.

It's too late for Python, but a lesson for some future programming language: 
procedures and functions are not the same. Function call is an expression 
having a value, procedure call is a statement having an effect. Both are 
useful, but conflating them is not.

--

___
Python tracker 

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



[issue33065] IDLE debugger: failure stepping through module loading

2020-04-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I believe I found the bug.  For IDLE's original single process mode, still 
available with the -n startup option, debugger.py contains the entire debugger. 
 The values displayed for global and local names are obtained with 
reprlib.Repr.repr.  That in turn calls .repr1, and that calls .repr_xxx, where 
xxx is one of the 'common' builtin classes or 'instance'.

The latter is used for all user classes.  It calls __builtins__.repr, but 
guarded by 'try...except Exception' since user classes may cause exceptions.  
The except clause returns an alternative type and id string, like 
object.__repr__.  (That alternative could also raise, but much less often.  Any 
of the examples above should run if IDLE were started from a command line with 
'python -m idlelib -n'.

When user code is run in a separate process, the code that interacts with user 
object must also run in the separate process.  debugger.Idb is moved and the 
code in debugger_r is added, some in each process.  Of concern here is that the 
GUI code that displays global or local values is passed a dict proxy instead of 
an actual namespace dict.  The proxy __getitem__ for d[key] makes an rpc call 
to through the socket connection to code in the user process.  That returns not 
the object itself but a string representation.  It does so with an unguarded 
repr call.

IDLE intentionally removes traceback lines added by IDLE (and pdb, if used), so 
that tracebacks look mostly the same as in standard CPython.  But that is a 
handicap when there is a bug in IDLE.  A traceback ending with 
  File .../idlelib/debugger_r, line 173, in dict_item
value = repr(value)
AttributeError: ...

would have been a big help here.  I am thinking about how to selectively 
disable traceback cleanup.

In any case, I believe the solution is to import reprlib in debugger_r also and 
add 'reprlib.Repr' before 'repr' in the line above.

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



[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

2020-04-22 Thread Mark Dickinson


Mark Dickinson  added the comment:

However, the list comprehension pattern is not as bad as lines like this one 
[#1]:

map(lambda plugin: self.start_plugin(plugin), self._plugins)

... which of course stopped working as soon as we transitioned to Python 3. :-(


[#1] 
https://github.com/enthought/envisage/blob/b7adb8793336dd3859623cb89bcc7bdfefe91b29/enthought/envisage/plugin_manager.py#L105

--

___
Python tracker 

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



[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

2020-04-22 Thread Mark Dickinson


Mark Dickinson  added the comment:

This is an antipattern I've seen on multiple occasions in real code. A common 
offender is:

[worker.join() for worker in workers]

Similarly, things like:

[plugin.start() for plugin in plugins]

I do think it would be worth updating the FAQ text.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-04-22 Thread AndrewGYork


AndrewGYork  added the comment:

We have a 10.15.3 Mac with python 3.8.2, IDLE version 3.8.2, and we see similar 
behavior.

Summary:
The *second* 'bad' .py file you double-click won't open in IDLE. This seems 
unrelated to permissions, but a 'bad' file (saved by IDLE) can be converted to 
a 'good' file by emailing the file to myself.

Details:
Open IDLE, save a 5-byte file 'fails.py' (contents: pass) to an empty folder. 
Permissions are rw-r--r--.

Close IDLE. Double-click 'fails.py', which opens in the IDLE editor; a shell 
also opens. Double-click 'fails.py' again, or drag it onto the IDLE icon in the 
Dock, and it does not open in a second instance of the IDLE editor. Typing 
`idle3 fails.py` in the terminal does open in a second instance of the IDLE 
editor (same version as first instance).

Email 'fails.py' to myself, via Gmail. Download 'fails.py' from Gmail, and 
rename it to 'works.py'. Permissions are still rw-r--r--.

Close IDLE. Double-click 'works.py', which opens in the IDLE editor; a shell 
also opens. Double-click 'works.py' again, or drag it onto the IDLE icon in the 
Dock, and it *does* open in a second instance of the IDLE editor. Any number of 
instances can be simultaneously opened this way.

Close IDLE. Double-click 'works.py' several times to open it in several 
different instances of the IDLE editor. Double-click 'fails.py' once, which 
successfully opens in one more instance of the IDLE editor. Finally, 
double-click 'fails.py' a second time; it does *not* open a second instance of 
'fails.py' in the IDLE editor.

IDLE's File->Open menu option does not open two instances of `fails.py` OR 
`works.py`; attempts to open the second instance simply raise focus of the 
first instance. However, if you open 'fails.py' via the menu, you can then open 
a second instance of 'fails.py' via double-clicking, but not a third.

--
nosy: +AndrewGYork

___
Python tracker 

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



<    1   2