[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-10 Thread Brandt Bucher


Brandt Bucher  added the comment:

Tasks for tomorrow:
- Reimplement the string formatting fast-path as a proper specialization.
- Try indexing into an array of function pointers instead of switching.
- Experiment more generic specializations for all operators (for instance, when 
lhs.__class__ is rhs.__class__, or when only one valid implementation exists).

--

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-10 Thread Brandt Bucher


Change by Brandt Bucher :


--
title: Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP -> Merge 
BINARY_*/INPLACE_* into BINARY_OP

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

2021-11-10 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset 9178f533ff5ea7462a2ca22cfa67afd78dad433b by Brandt Bucher in 
branch 'main':
bpo-45636: Merge all numeric operators (GH-29482)
https://github.com/python/cpython/commit/9178f533ff5ea7462a2ca22cfa67afd78dad433b


--

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-10 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Sure, I’m happy to wait.

My thoughts:

* The first link you provided does give the same slope across packages.  Where 
they differ is in how they choose to report statistics for assessing goodness 
of fit or for informing hypothesis testing. Neither of those apply to us.

* The compared stats packages offer this functionality because some models 
don’t benefit from a non-zero constant. 

* The second link is of low quality and reads like hastily typed, stream of 
consciousness rant that roughly translates to “As a blanket statement 
applicable to all RTO, I don’t believe the underlying process is linear and I 
don’t believe that a person could have a priori knowledge of a directly 
proportional relationship.”  This is bunk — a cold caller makes sales in direct 
proportion to the number of calls they make, and zero calls means zero sales.

* The last point is a distractor.  Dealing with error analysis or input error 
models is beyond the scope of the package. Doing something I could easily do 
with my HP-12C is within scope. 

* We’re offering users something simple. If you have a need to fit a data to 
directly proportional model, set a flag.

* If we don’t offer the option, users have to do too much work to bridge from 
what we have to what they need:

   (covariance(x, y) + mean(x)*mean(y)) / (variance(x) + mean(x)**2)

--

___
Python tracker 

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



[issue45735] Promise the long-time truth that `args=list` works

2021-11-10 Thread Tim Peters


Tim Peters  added the comment:

Changed stage back to "needs patch", since Raymond appears to have closed his 
PR. Raymond, what's up with that?

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2021-11-10 Thread Ned Batchelder


Ned Batchelder  added the comment:

I went ahead and changed the coverage.py code to this:

#if PY_VERSION_HEX >= 0x030B00A0
// 3.11 moved f_lasti into an internal structure. This is totally the wrong way
// to make this work, but it's all I've got until 
https://bugs.python.org/issue40421
// is resolved.
#include 
#define MyFrame_lasti(f)((f)->f_frame->f_lasti * 2)
#elif PY_VERSION_HEX >= 0x030A00A7
// The f_lasti field changed meaning in 3.10.0a7. It had been bytes, but
// now is instructions, so we need to adjust it to use it as a byte index.
#define MyFrame_lasti(f)((f)->f_lasti * 2)
#else
#define MyFrame_lasti(f)((f)->f_lasti)
#endif


If we had an API that let me distinguish between call and resume and between 
return and yield, I could get rid of this.

--
nosy: +nedbat

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 1cbaa505d007e11c4a1f0d2073d72b6c02c7147c by Guido van Rossum in 
branch 'main':
bpo-45696: Deep-freeze selected modules (GH-29118)
https://github.com/python/cpython/commit/1cbaa505d007e11c4a1f0d2073d72b6c02c7147c


--

___
Python tracker 

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



[issue45696] "Deep-freeze": skip the marshal step by generating C code

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 1cbaa505d007e11c4a1f0d2073d72b6c02c7147c by Guido van Rossum in 
branch 'main':
bpo-45696: Deep-freeze selected modules (GH-29118)
https://github.com/python/cpython/commit/1cbaa505d007e11c4a1f0d2073d72b6c02c7147c


--

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-10 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi Raymond,

I'm conflicted by this. Regression through the origin is clearly a thing which 
is often desired. In that sense, I'm happy to see it added, and thank you.

But on the other hand, this may open a can of worms that I personally don't 
feel entirely competent to deal with. Are you happy to hold off a few days 
while I consult with some statistics experts?

- There is some uncertainty as to the correct method of calculation, with many 
stats packages giving different results for the same data, e.g.

https://web.ist.utl.pt/~ist11038/compute/errtheory/,regression/regrthroughorigin.pdf

- Forcing the intercept through the origin is a dubious thing to do, even if 
you think it is theoretically justified, see for example the above paper, also:

https://dynamicecology.wordpress.com/2017/04/13/dont-force-your-regression-through-zero-just-because-you-know-the-true-intercept-has-to-be-zero/

https://www.theanalysisfactor.com/regression-through-the-origin/

- Regression through the origin needs a revised calculation for the coefficient 
of determination (Pearson's R squared):

https://pubs.cif-ifc.org/doi/pdf/10.5558/tfc71326-3

https://www.researchgate.net/publication/28191_Re-interpreting_R-squared_regression_through_the_origin_and_weighted_least_squares

but it's not clear how to revise the calculation, with some methods giving R 
squared negative or greater than 1.

- Regression through the origin is only one of a number of variants of 
least-squares linear regression that we might also wish to offer, e.g. 
intercept-only, Deming or orthogonal regression.

https://en.wikipedia.org/wiki/Deming_regression

--

___
Python tracker 

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



[issue45550] Increase the information content and robustness of tp_version_tag.

2021-11-10 Thread Mark Shannon


Change by Mark Shannon :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue45357] Idle does not check user config for extention configuration

2021-11-10 Thread CoolCat467


CoolCat467  added the comment:

In a classroom circumstance, yes, that kind of makes sense, but at the moment, 
if you want to add an extension you have to either manually edit the file, or 
let a automated script touch your entire system with root permissions that 
could be doing who knows what else. And trying to install extensions on windows 
has proved nearly impossible for me. No matter what I've tried, I haven't been 
able to change the system config file. Now, on Linux everything is fine, but 
still. I would think that people who use IDLE in general would benefit from 
this change, and could potentially make extension use more popular instead of 
going to third party and potentially closed source editors. I don't like that 
other, more popular editors have more capabilities just because writing 
extensions might be easier.

--

___
Python tracker 

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

gdbmmodule and dbmmodule need special treatment anyway. macOS has dbm-API build 
into libc. Linux has either libgdbm_compat, libndbm, or libdb. The 
--with-dbmliborder makes it even more interesting. Users can override in which 
order they want to probe for gdbm, ndbm, and libdb. We have to keep the 
"manual" library and header checks.

Cross-compilation with pkg-config uses a trivial wrapper script, 
https://autotools.io/pkgconfig/cross-compiling.html . The build system has to 
create and provide a script with correct sysroot setting.

Is traditional cross-compiling work still useful these days anyway? Emulation 
has made big leaps in the last decade. Emulated cross compiling with qemu has 
become widespread. It also has the big advantage that you can run the test 
suite on the emulated hardware and verify that your binaries work. AFAIK 
Fedora's build system uses qemu for a bunch of hardware targets.

--

___
Python tracker 

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



[issue43923] Can't create generic NamedTuple as of py3.9

2021-11-10 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +AlexWaygood

___
Python tracker 

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-10 Thread Ned Deily


Ned Deily  added the comment:

SGTM,2

This all sounds great. I think a goal here should be to remove all header and 
lib file searching from setup.py as that has always been a bug magnet. Perhaps 
one workaround for those libs that don't (yet) provide .pc files would be for 
us to supply reasonable default .pc for them, if possible, so that most 
builders wouldn't have to set the MODULE_xxx_*FLAGS variables while still 
removing the header/lib file searching from setup.py? Also it would be great to 
document how using pkg-config works in generic cross-compiling cases; we should 
strive to make at least the most common cases just work with minimal tweaking 
of configure arguments.

--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset fc9b62281931da8d20f85d5ed44cfc24f068d3f4 by Christian Heimes in 
branch 'main':
bpo-45723: Add --with-pkg-config to configure (GH-29517)
https://github.com/python/cpython/commit/fc9b62281931da8d20f85d5ed44cfc24f068d3f4


--

___
Python tracker 

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



[issue45780] dict. keys view behaviour diverges from set()

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This is a bug dictviews_sub(). It that incorrectly calls difference_update() 
instead of set_isub() which would perform the requisite type check.  

Note the KeysView ABC is correct and implements the type check.

This situation is unfortunate.  Adding the type check will help prevent future 
bugs;  however, it will likely also break some existing code that is currently 
working correctly.

My recommendation is to leave it as-is and live with it.  That is what we did 
with list.iadd() which has the same problem.

--
nosy: +rhettinger

___
Python tracker 

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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-10 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-10 Thread Brett Cannon


Brett Cannon  added the comment:

SGTM!

--

___
Python tracker 

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



[issue45780] dict. keys view behaviour diverges from set()

2021-11-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Joshua pointed out that https://bugs.python.org/issue26973 appears to cover 
this.  we rejected the idea of changing it at the time.  it'd still be nice.

--

___
Python tracker 

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



[issue45780] dict. keys view behaviour diverges from set()

2021-11-10 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: dict. keys view behavious diverges from set() -> dict. keys view 
behaviour diverges from set()

___
Python tracker 

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



[issue45780] dict. keys view behavious diverges from set()

2021-11-10 Thread Gregory P. Smith


New submission from Gregory P. Smith :

Python 3.9.7 (default, Sep 24 2021, 09:43:00) 
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dict(a=3,b=5).keys()
dict_keys(['a', 'b'])
>>> dict(a=3,b=5).keys() - 'a'
{'b'}
>>> dict(a=3,b=5).keys() - 'ab'
set()
>>> set(('a', 'b'))
{'b', 'a'}
>>> set(('a', 'b')) - 'ab'
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for -: 'set' and 'str'
>>> set(('a', 'b')).difference('ab')
set()

basically it looks like the keys view treats - as .difference() whereas set() 
avoids bugs in its operators by requiring both to be sets.

--

___
Python tracker 

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



[issue45780] dict. keys view behavious diverges from set()

2021-11-10 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
components: Interpreter Core
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: dict. keys view behavious diverges from set()
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45091] inspect.Parameter.__str__ does not include subscripted types in annotations

2021-11-10 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I have confirmed and tested -- this was fixed in 
https://github.com/python/cpython/pull/29212 and so I'm closing it as fixed.

--
nosy: +andrei.avk, kj
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



[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-10 Thread Christian Heimes


Change by Christian Heimes :


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



[issue45696] "Deep-freeze": skip the marshal step by generating C code

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

After PR 29118 is merged we get the benefits on UNIXy systems. We have several 
TODOs left then:

- (Definitely:) Generate Windows build files

- (Probably:) Find a way to avoid having to regenerate everything whenever any 
source file changes (any source file -> _bootstrap_python -> all generated 
files)

- (Maybe:) Consider putting all generated code together in one file, for more 
savings (and build simplification)

--

___
Python tracker 

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



[issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10

2021-11-10 Thread Brandt Bucher


Brandt Bucher  added the comment:

Here's a (more) minimal reproducer I've been able to create:

```
# First, "use up" 256 unique constants:
spam=0x00;spam=0x01;spam=0x02;spam=0x03;spam=0x04;spam=0x05;spam=0x06;spam=0x07;
spam=0x08;spam=0x09;spam=0x0a;spam=0x0b;spam=0x0c;spam=0x0d;spam=0x0e;spam=0x0f;
spam=0x10;spam=0x11;spam=0x12;spam=0x13;spam=0x14;spam=0x15;spam=0x16;spam=0x17;
spam=0x18;spam=0x19;spam=0x1a;spam=0x1b;spam=0x1c;spam=0x1d;spam=0x1e;spam=0x1f;
spam=0x20;spam=0x21;spam=0x22;spam=0x23;spam=0x24;spam=0x25;spam=0x26;spam=0x27;
spam=0x28;spam=0x29;spam=0x2a;spam=0x2b;spam=0x2c;spam=0x2d;spam=0x2e;spam=0x2f;
spam=0x30;spam=0x31;spam=0x32;spam=0x33;spam=0x34;spam=0x35;spam=0x36;spam=0x37;
spam=0x38;spam=0x39;spam=0x3a;spam=0x3b;spam=0x3c;spam=0x3d;spam=0x3e;spam=0x3f;
spam=0x40;spam=0x41;spam=0x42;spam=0x43;spam=0x44;spam=0x45;spam=0x46;spam=0x47;
spam=0x48;spam=0x49;spam=0x4a;spam=0x4b;spam=0x4c;spam=0x4d;spam=0x4e;spam=0x4f;
spam=0x50;spam=0x51;spam=0x52;spam=0x53;spam=0x54;spam=0x55;spam=0x56;spam=0x57;
spam=0x58;spam=0x59;spam=0x5a;spam=0x5b;spam=0x5c;spam=0x5d;spam=0x5e;spam=0x5f;
spam=0x60;spam=0x61;spam=0x62;spam=0x63;spam=0x64;spam=0x65;spam=0x66;spam=0x67;
spam=0x68;spam=0x69;spam=0x6a;spam=0x6b;spam=0x6c;spam=0x6d;spam=0x6e;spam=0x6f;
spam=0x70;spam=0x71;spam=0x72;spam=0x73;spam=0x74;spam=0x75;spam=0x76;spam=0x77;
spam=0x78;spam=0x79;spam=0x7a;spam=0x7b;spam=0x7c;spam=0x7d;spam=0x7e;spam=0x7f;
spam=0x80;spam=0x81;spam=0x82;spam=0x83;spam=0x84;spam=0x85;spam=0x86;spam=0x87;
spam=0x88;spam=0x89;spam=0x8a;spam=0x8b;spam=0x8c;spam=0x8d;spam=0x8e;spam=0x8f;
spam=0x90;spam=0x91;spam=0x92;spam=0x93;spam=0x94;spam=0x95;spam=0x96;spam=0x97;
spam=0x98;spam=0x99;spam=0x9a;spam=0x9b;spam=0x9c;spam=0x9d;spam=0x9e;spam=0x9f;
spam=0xa0;spam=0xa1;spam=0xa2;spam=0xa3;spam=0xa4;spam=0xa5;spam=0xa6;spam=0xa7;
spam=0xa8;spam=0xa9;spam=0xaa;spam=0xab;spam=0xac;spam=0xad;spam=0xae;spam=0xaf;
spam=0xb0;spam=0xb1;spam=0xb2;spam=0xb3;spam=0xb4;spam=0xb5;spam=0xb6;spam=0xb7;
spam=0xb8;spam=0xb9;spam=0xba;spam=0xbb;spam=0xbc;spam=0xbd;spam=0xbe;spam=0xbf;
spam=0xc0;spam=0xc1;spam=0xc2;spam=0xc3;spam=0xc4;spam=0xc5;spam=0xc6;spam=0xc7;
spam=0xc8;spam=0xc9;spam=0xca;spam=0xcb;spam=0xcc;spam=0xcd;spam=0xce;spam=0xcf;
spam=0xd0;spam=0xd1;spam=0xd2;spam=0xd3;spam=0xd4;spam=0xd5;spam=0xd6;spam=0xd7;
spam=0xd8;spam=0xd9;spam=0xda;spam=0xdb;spam=0xdc;spam=0xdd;spam=0xde;spam=0xdf;
spam=0xe0;spam=0xe1;spam=0xe2;spam=0xe3;spam=0xe4;spam=0xe5;spam=0xe6;spam=0xe7;
spam=0xe8;spam=0xe9;spam=0xea;spam=0xeb;spam=0xec;spam=0xed;spam=0xee;spam=0xef;
spam=0xf0;spam=0xf1;spam=0xf2;spam=0xf3;spam=0xf4;spam=0xf5;spam=0xf6;spam=0xf7;
spam=0xf8;spam=0xf9;spam=0xfa;spam=0xfb;spam=0xfc;spam=0xfd;spam=0xfe;spam=0xff;
# Then, define a function with at least two default positional arguments that:
# - are all constants
# - span multiple lines
# - include a previously unused constant value
def foo(
bar=0x100,  # <-- This becomes EXTENDED_ARG(1) + NOP(0).
baz=0x00,
): pass
# The peephole pass will fold the constant default value tuple construction for
# the function definition, but leave behind NOPs that cannot be removed (because
# it would break tracing guarantees). One of these NOPs will still have a
# "large" oparg.
```

It's not really that hard to create unused arguments... it's just hard to make 
them large enough to need an EXTENDED_ARG! For example, `a, b = b, a` creates a 
ROT_TWO with an unused argument.

Given the pretty tight coupling (and speed/simplicity) of instrsize and 
write_op_arg, I now think the best fix would instead just be adding another 
pass immediately before assemble_jump_offsets that does something like this:

```
static void
fix_opargs(struct assembler *a)
{ 
for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) {
for (int i = 0; i < b->b_iused; i++) {
if (b->b_instr[i].i_opcode < HAVE_ARGUMENT) {
// Opcodes with unused arguments may have been introduced during
// the optimization process:
b->b_instr[i].i_oparg = 0;
}
}
}
}
```

Even though it's quite straightforward to fix, I only really think it's worth 
doing if it annoys us enough that many non-argument-using instructions are 
indeed emitted with nonzero arguments. I'm starting to feel like it will only 
complicate things and possibly slow down compilation times (granted, probably 
by a very small amount, but it's not nothing). Besides the above example, 
(which was informed by the linked PyInstaller discussion, thanks Rok), I 
haven't actually been able to coax the compiler into emitting these extra 
EXTENDED_ARGs in *any* other situation.

TL;DR: This is super rare, doesn't actually cause any problems, and incurs a 
small compile-time cost to "fix".

Close as "won't fix"?

--

___
Python tracker 

___

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-11-10 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

This was fixed in https://github.com/python/cpython/commit/dd7b816ac87, perhaps 
this should be closed as fixed?

It sounds like the general solution is beyond the scope of this issue and 
doesn't need to be tracked here.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Go for it, Raymond.

--
nosy: +lukasz.langa
resolution: fixed -> 
stage: test needed -> needs patch

___
Python tracker 

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



[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 0a9f69539be27acf1cddf1b58d02a88d02e5008d by Christian Heimes in 
branch 'main':
bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)
https://github.com/python/cpython/commit/0a9f69539be27acf1cddf1b58d02a88d02e5008d


--

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

Marking this as fixed, because the fix is already checked in. Release 
scheduling is a separate conversation, so keep an eye out for the next release.

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

Oh I think I know what happened. Because RT_MANIFEST wasn't defined, it was 
added as a resource tagged with that as a string. So the manifest is still 
embedded, just not under the right type constant, so it has no effect.

Yeah, I think we should do a fresh release. Perhaps combined with the recent Tk 
updates for macOS we'll have more releases soon anyway?

--
keywords: +3.9regression
nosy: +lukasz.langa
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-10 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +27770
pull_request: https://github.com/python/cpython/pull/29518

___
Python tracker 

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



[issue43923] Can't create generic NamedTuple as of py3.9

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 for reverting this change and restoring the previous behavior.

--

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Unless anyone objects, I'll revert this across all affected branches.

--

___
Python tracker 

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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c1323d4b8cb010a06c11bace6e681bea7f895851 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)
https://github.com/python/cpython/commit/c1323d4b8cb010a06c11bace6e681bea7f895851


--
nosy: +pablogsal

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

This has caused a regression, also reported here:
https://github.com/Azure/azure-cli/issues/20269 Global Arguments stop working 
in Python 3.9.8

Can we please get some attention from @rhettinger and @ambv?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-10 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 4cdeee5978ee3f8ea7fe95172ae04d866cd88177 by Irit Katriel in 
branch 'main':
bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495)
https://github.com/python/cpython/commit/4cdeee5978ee3f8ea7fe95172ae04d866cd88177


--

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Steve Canny


Steve Canny  added the comment:

The resolution for me (the python-pptx and python-docx libraries) is clear, to 
add a
separate `import collections.abc` statement rather than assuming (hoping) that 
the
`collections.abc` module is available on an `abc` attribute of the 
`collections` module.
I chalk that up to a gap in my knowledge of the guarantees provided by module 
imports
and falling into trusting my method just because it worked :)

But I will argue for maintenance of backward compatibility here, just for the 
sake of
those unable or unwilling to modify existing code.

1. Removing the availability of e.g. `Container` directly from `collections` is 
not the
   same as removing the availability of `abc` from collections. The deprecation 
warning
   we have all seen many times admits both interpretations. So I would argue we 
have at
   least not _explicitly_ stated that `import collections; collections.abc` 
would stop
   working.

2. `import collections; collections.abc` worked in Windows Python 3.9.6. As 
such, it was
   part of the de-facto spec. When we publish a behavior, a certain number of 
folks will
   come to depend on it, whether it is stated or not. So there will be breakage 
here.

   It's not my place to judge whether the breakage or restoration of the 
behavior is the
   greater value; my claim is only that there will be breakage cost. That would 
include
   the time to deal with additional issue reports from folks who don't find 
this issue
   before reporting.

So I've said my piece on this. I'm grateful for your attention to this 
conversation and
will cheerfully accept whatever resolution you decide on. Thanks to all of you 
for
participating in this great project that empowers so many; I'm very proud to be 
a small
part of it :)

--

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun


Eryk Sun  added the comment:

> How are you checking whether it's there or not?

The desktop distribution of 3.9.8 is the most obvious case, since it causes 
sys.getwindowsversion() to report Windows 8.0 (6.2.9200):

C:\Temp>"C:\Program Files\Python39\python.exe" -q
>>> import sys
>>> sys.getwindowsversion()
sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, 
service_pack='')

But I checked for the manifest directly using the SDK manifest tool, mt.exe. 
It's missing in 3.9.8:

C:\Temp>set file=C:\Program Files\Python39\python.exe
C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest
mt : general error c101008c: Failed to read the manifest from the resource 
of file 
"C:\Program Files\Python39\python.exe".
The specified resource type cannot be found in the image file.

C:\Temp>set file=C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\python.exe
C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest
mt : general error c101008c: Failed to read the manifest from the resource 
of file
"C:\Program Files\WindowsApps
   \PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0
   \python.exe". 
The specified resource type cannot be found in the image file.

For comparison, the manifest is present in 3.10, which was built over a month 
ago:

C:\Temp>set file=C:\Program Files\Python310\python.exe
C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest
C:\Temp>findstr longPathAware python.manifest
  http://schemas.microsoft.com/SMI/2016/WindowsSettings;>true

C:\Temp>set file=C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.240.0_x64__qbz5n2kfra8p0\python.exe
C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest
C:\Temp>findstr longPathAware python.manifest
  http://schemas.microsoft.com/SMI/2016/WindowsSettings;>true

--

___
Python tracker 

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



[issue10483] http.server - what is executable on Windows

2021-11-10 Thread mike mcleod


mike mcleod  added the comment:

I have put the question on Discuss and wait for (any) responses,

--

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

> I just installed it and can confirm that there's no embedded manifest in 
> "C:\Program 
> Files\WindowApps\PythonSoftwareFoundation.Python.3.9<...>\python.exe".

Strange, because when I inspect the files that I published, it's there. 
It's also in the version that I installed on another machine from the Store.

How are you checking whether it's there or not?

--

___
Python tracker 

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



[issue21501] docs: mmap example for use in documentation

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for the research! I will close the issue now.

--
resolution:  -> out of date
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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-10 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 05fbd60147456d77a7aecf2986c5bde5872f by Irit Katriel in 
branch 'main':
bpo-45711: Use _PyErr_ClearExcState instead of setting only exc_value to NULL 
(GH-29404)
https://github.com/python/cpython/commit/05fbd60147456d77a7aecf2986c5bde5872f


--

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also, the collections module could simply delete abc if it already exists due 
to collections.abc being imported first.

--

___
Python tracker 

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



[issue44319] setup openssl failed on linux

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

Update:

I came up with a hack that lets you use the openssl11 module from EPEL with 
Python:

https://discuss.python.org/t/modulenotfounderror-no-module-named-mysql-in-python-3-10-0-default-nov-6-2021-1425-gcc-4-8-5-20150623-red-hat-4-8-5-44-on-linux/11823/5?u=tiran

sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure

--

___
Python tracker 

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



[issue21501] docs: mmap example for use in documentation

2021-11-10 Thread mike mcleod


mike mcleod  added the comment:

One of the things I did when the example code didn't work was to see what other 
examples could be found and there are I would argue plenty or just enough, eg:
https://medium.com/analytics-vidhya/memory-mapping-files-and-mmap-module-in-python-with-lot-of-examples-d1a9a45fe9a3
And google will fetch more if needed.
May I suggest back in 2014 when the issue was raised that this may have been a 
good example, but mmap is not so new and in the intervening time anybody who 
needed further examples simply googled them. Hence, I suggest its not needed.

--

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> On Mac, collections.abc is imported at startup time 
> via site.py (which imports rlcompleter, which imports
> inspect, which imports collections.abc).

In inspect.py, the import of collections.abc is only used inside isawaitable(). 
 We could make that a deferred import.

--

___
Python tracker 

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



[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon

2021-11-10 Thread Zhang Zheng


Zhang Zheng  added the comment:

Hi, I have encountered an error when working with 
concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple 
Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so 
I think this might be related to the arch.

I have created a github repo with the code in poc.py file, and the error 
message in README, please let me know if there's anything more I can provide to 
help the investigation to the problem. 

https://github.com/simsicon/multiprocessing-initializer

--

___
Python tracker 

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



[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon

2021-11-10 Thread Zhang Zheng


New submission from Zhang Zheng :

Hi, I have encountered an error when working with 
concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple 
Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so 
I think this might be related to the arch.

I have created a github repo with the code in poc.py file, and the error 
message in README, please let me know if there's anything more I can provide to 
help the investigation to the problem.

--
components: Library (Lib)
messages: 406108
nosy: zhangzheng
priority: normal
severity: normal
status: open
title: multiprocessing initializer error with CPython 3.9.6 on Apple Silicon
type: behavior
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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-10 Thread Martin


Martin  added the comment:

Thanks Joe!

> 1. The changes are sufficient to let the user make things work the way it is 
> requested that they work and anyone who does not start using the new 
> format_locals parameter will get the old behavior.

That was my goal :)

> 2. A side comment: I just noticed that the docstring for 
> FrameSummary.__init__ does not document the filename, lineno, and name 
> parameters.  Perhaps this could be fixed at the same time?

I agree and already updated the pull request.

> 3. The new parameter format_locals is slightly confusingly named, because it 
> does not format a single string from all the locals but instead gives a 
> dictionary of strings with one string for each local.

I think format_locals is OK here (local*s*: plural), but I'm open to better 
suggestions.

> 4. I personally think it would be better to include something like the 
> example value for format_locals as an extra attribute of the traceback module 
> so everybody doesn't have to write the same function.  That said, the 
> documented example is sufficient.

I sort of agree, but I also don't know what such a general-purpose function 
would entail. Suggestions?

> 5. It is not clear to me why this stringify-ing of the locals can't be done 
> in StackSummary._extract_from_extended_frame_gen.  It passes the dictionary 
> of locals and also the function to transform it to FrameSummary.  It would 
> make more sense to transform it first.  I suppose there might be some user 
> somewhere who is directly calling FrameSummary so the interface needs to stay.

I agree! In principle, FrameSummary has been little more than a container 
without (much) logic of its own.
Memory efficiency requires that that FrameSummary does not hold references to 
the original locals, thats why repr() was used.
I think as well that it would have been better to keep FrameSummary as a mere 
container and do the conversion of the locals elsewhere.
But at this point, this shouldn't be changed anymore.

> 6. I fantasize that the new format_locals parameter would have access to the 
> frame object.  In order for this to happen, the frame object would have to be 
> passed to FrameSummary instead of the 3 values (locals, name, filename) that 
> are extracted from it.  I think the current interface of FrameSummary was 
> designed to interoperate with very old versions of Python.  Oh well.

Do you have a use case for that? I have no clue what you would do with the 
frame object at this point.

> 7. If anyone wanted to ever refactor FrameSummary (e.g., to enable my fantasy 
> in point #6 just above), it becomes harder after this.  This change has the 
> effect of exposing details of the interface of FrameSummary to users of 
> StackSummary.extract and TracebackException.  The four parameters that the 
> new parameter format_locals takes are most of the parameters of FrameSummary.

Previously, I totally misread your request to "not just the local variable 
values, but also the name of the local variable and maybe also the stack frame 
it is in". This is why I included filename, lineno and name as parameters to 
format_locals which now seems totally useless to me and I'll remove them (if 
nobody objects).

--

___
Python tracker 

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



[issue21501] docs: mmap example for use in documentation

2021-11-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

We would need the OP to sign a CLA in order to be able to use (a modified 
version of) his code.

I presume this page is where the example was supposed to go?
https://docs.python.org/3/library/mmap.html

Let me ask first -- does that page really need another example? If so, is the 
OP's example (made working) really the best one?

Perhaps there are blog posts that cover how to use mmap already, and the 
reference docs don't need such an extensive example?  In that case we could 
just close this (ancient) issue.

--

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Mark Dickinson


Mark Dickinson  added the comment:

On Mac, collections.abc is imported at startup time via site.py (which imports 
rlcompleter, which imports inspect, which imports collections.abc). I'd guess 
it's the same on Linux.

mdickinson@mirzakhani cpython % ./python.exe
Python 3.11.0a2+ (heads/main:76d14fac72, Nov 10 2021, 15:43:54) [Clang 13.0.0 
(clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; "collections.abc" in sys.modules
True
>>> ^D
mdickinson@mirzakhani cpython % ./python.exe -S
Python 3.11.0a2+ (heads/main:76d14fac72, Nov 10 2021, 15:43:54) [Clang 13.0.0 
(clang-1300.0.29.3)] on darwin
>>> import sys; "collections.abc" in sys.modules
False
>>> ^D

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 76d14fac72479e0f5f5b144d6968ecd9e594db34 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45723: Improve and simplify more configure.ac checks (GH-29485)
https://github.com/python/cpython/commit/76d14fac72479e0f5f5b144d6968ecd9e594db34


--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-10 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27769
pull_request: https://github.com/python/cpython/pull/29517

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> this coincides with collection ABCs being made unavailable directly from 
> `collections` with this 3.9 -> 3.10 version change

Direct access from collections was removed after being deprecated for almost 
almost a decade ago:
 
"Using or importing the ABCs from 'collections' instead "
"of from 'collections.abc' is deprecated since Python 3.3, "
"and in 3.10 it will stop working"

So Windows is correctly reporting an AttributeError.

The mystery is why it is still accessible on a Mac.  That seems like a bug.

--
nosy: +rhettinger

___
Python tracker 

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



[issue10483] http.server - what is executable on Windows

2021-11-10 Thread Éric Araujo

Éric Araujo  added the comment:

It’s not clear to me if CGI support in http.server is a relic or still 
something useful and in wide use.  You can for sure make a pull request and see 
if a core dev will review and merge it, or you could raise the question on 
Discuss to see what people think.

--

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Łukasz Langa

Change by Łukasz Langa :


--
resolution:  -> wont fix
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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread STINNER Victor


STINNER Victor  added the comment:

- _PyUnicode_DecodeUnicodeEscape@Base

Removed by:

commit 7c722e32bf582108680f49983cf01eaed710ddb9
Author: Serhiy Storchaka 
Date:   Thu Oct 14 20:03:29 2021 +0300

[3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the 
"unicode-escape" codec (GH-28939) (GH-28945)

They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d)

Co-authored-by: Serhiy Storchaka 

--

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to close this issue. We are free to remove private functions in minor 
releases (3.9.x) without any warning. Private functions are excluded from the 
backward compatibility warranty.

For example: "Names prefixed by an underscore, such as _Py_InternalState, are 
private API that can change without notice even in patch releases."
https://docs.python.org/dev/c-api/stable.html#stable

In C, it's easy to call the decode() method of a string object and pass the 
expected encoding and error handler.

--
nosy: +vstinner

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun


Eryk Sun  added the comment:

> Did my accidental breakage of the resource files make it 
> into the last 3.9 release?

Yep, version 3.9.8 of the store app was built last Friday, the day after 
removing "winuser.h" from the resource definition files. I just installed it 
and can confirm that there's no embedded manifest in "C:\Program 
Files\WindowApps\PythonSoftwareFoundation.Python.3.9<...>\python.exe".

--

___
Python tracker 

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



[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

2021-11-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

> Did my accidental breakage of the resource files make it into the last 3.9 
> release?

Turns out, no, it didn't. So this is something else.

When I get to work later today I'll take a look.

--

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Abdullah Alnajim


Abdullah Alnajim  added the comment:

LongPathsEnabled value was already one. This issue comes with the new update 
(3.9.8) [Windows Store version]. I reinstalled the same version (3.9.8) from 
Windows Store, and the issue was still there.
When I tried versions (3.10) and (3.9.7) from 
(https://www.python.org/downloads/), the problem is gone.

--
nosy:  -lukasz.langa

___
Python tracker 

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



[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

2021-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 20205ad2b5be7eb3361224fd2502d1ba09c8ae4a by Pablo Galindo Salgado 
in branch 'main':
bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515)
https://github.com/python/cpython/commit/20205ad2b5be7eb3361224fd2502d1ba09c8ae4a


--

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

Oh, no, wait. Did my accidental breakage of the resource files make it into the 
last 3.9 release? If so, we probably lost the manifest option to opt-in to 
supporting long paths, and perhaps Windows 11 has decided to start honouring 
that (Windows 10 ignored it).

(+RM just in case it matters enough to accelerate the next patch release.)

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

I wonder if the Windows 11 upgrade process disables this registry key when it's 
set directly?

That's not something we can fix (I don't think?), so we may just have to list 
it as an option.

If you can, check whether running a Repair of your Python install offers the 
button at the end to enable it again. If so, that may be the best thing for us 
to suggest (if this turns out to be widespread).

--

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-10 Thread Steve Dower


Steve Dower  added the comment:

Since collections.abc is a module, it should work if you import it:

>>> import collections.abc
>>> collections.abc.Container


Submodules being implicitly imported is not part of any API guarantee, which 
will be why somebody changed it without considering this impact.

--

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Miro Hrončok

Change by Miro Hrončok :


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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun


Eryk Sun  added the comment:

Ensure that the system has LongPathsEnabled set to 1. For example, in 
PowerShell with administrator (elevated) access:

PS C:\> $p = "HKLM:\System\CurrentControlSet\Control\Filesystem"
PS C:\> get-itempropertyvalue $p LongPathsEnabled
0

It was set to 0, so change it to 1:

PS C:\> set-itemproperty $p LongPathsEnabled 1
PS C:\> get-itempropertyvalue $p LongPathsEnabled
1

Every new process initially checks this registry setting, so you don't have to 
logoff or reboot for it take effect.

--
nosy: +eryksun

___
Python tracker 

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



[issue45753] Further speed up Python-to-Python calls.

2021-11-10 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Matthias Klose


Matthias Klose  added the comment:

the two users of typed-ast (at least in Debian) are black and mypy.  Apparently 
black stopped using typed-ast recently.

--

___
Python tracker 

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



[issue21501] docs: mmap example for use in documentation

2021-11-10 Thread mike mcleod


mike mcleod  added the comment:

I would like to help with this issue.
I note that a few changes need to be made to the code example for compatibility 
for the latest version of Python. I can get this working but I am not sure this 
is a good example. Also, the example is more about threads and messaging 
between threads rather than mmap.
So my question is is this a good example?
And the suggestion of adding detailed explanation of the code, again, as to 
what it does not seem to be that relevant to mmap.

--
nosy: +mikecmcleod

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

Matthias mentions the upstream tickets

  https://github.com/python/typed_ast/issues/169
  https://github.com/python/typed_ast/issues/170

on the BDO. The issue affects typed-ast and indirectly older versions of black. 
Upstream is considering to EOL typed-ast package.

--

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yeah, the ABI guarantees are for the public C-API (both the restricted/limited 
and the general one) but not for private symbols.

--

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, they are private symbols. 3rd parties should not use them.

The symbol _PyUnicode_DecodeUnicodeEscape was replace in GH-28953: "bpo-45467: 
Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec".

--
nosy: +christian.heimes

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Aren't these private symbols?

--
nosy: +pablogsal

___
Python tracker 

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



[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

2021-11-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27767
pull_request: https://github.com/python/cpython/pull/29515

___
Python tracker 

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



[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)

2021-11-10 Thread Matthias Klose


New submission from Matthias Klose :

[reported in Debian as https://bugs.debian.org/998854]

3.9.8, compared to 3.9.7 introduces a regression, making at least one third 
party extension fail at runtime. The symbol changes in 3.9.8 are:

- _PyUnicode_DecodeUnicodeEscape@Base
+ _PyUnicode_DecodeRawUnicodeEscapeStateful@Base
+ _PyUnicode_DecodeUnicodeEscapeInternal@Base
+ _PyUnicode_DecodeUnicodeEscapeStateful@Base

Affected at least is the typed-ast extension.  Yes, you can rebuild the 
extension with 3.9.8, but then it doesn't work with earlier 3.9 versions.  Just 
dropping the symbol on a stable branch is suboptimal.

--
components: Interpreter Core
keywords: 3.9regression
messages: 406085
nosy: doko, lukasz.langa
priority: release blocker
severity: normal
status: open
title: libpython.so 3.9.8 drops symbol used by third party extension module(s)
type: crash
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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-10 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

We can detect majority of our dependencies with pkg-config. The use of 
pkg-config has some benefits:

* Distro's provide the .pc files in their -dev / -devel packages. The presence 
of a .pc file indicates that all development dependencies are available.

* pkg-config does the right thing for non-standard include and libraries 
directories as well as multiarch builds. In case a library or header is not on 
the default search path, pkg-config returns necessary -I and -L flags.

* At least the pkgconf implementation of pkg-config standard search /usr/local 
and ~/.local/ directories for .pc files. Cases like 
https://github.com/python/cpython/pull/29507 are handled correctly. On FreeBSD 
"pkgconf sqlite3 --cflags --libs" returns "-I/usr/local/include 
-L/usr/local/lib -lsqlite3".

* pkg-config understands dependencies. For example "pkg-config --libs tk" 
returns linker flags for TK *and* TCL.

* pkg-config can check for module version, e.g. "pkg-config sqlite3 
--atleast-version=3.7.15"


pkg-config modules:

  readline, libedit
  ncursesw, ncurses, panel, tinfo
  sqlite3
  zlib
  bzip2
  liblzma
  expat
  uuid (Linux's util-linux uuid)
  libffi
  libnsl, libtirpc
  libcrypt
  tcl, tk
  openssl, libssl, libcrypto
  
modules / libraries without pkg-config modules:

  decimal: libmpdec
  gdbm: gdbm
  dbm: gdbm_compat, ndbm, libdb (bdb)


To simplify use of flags in Modules/Setup, I propose to add two make variables 
for each module that needs cflags and ldflags:

  f"MODULE_{ext.name.upper()}_CFLAGS"
  f"MODULE_{ext.name.upper()}_LDFLAGS"

e.g. for the _ssl module:

  MODULE__SSL_CFLAGS=
  MODULE__SSL_LDFLAGS=-lssl -lcrypto

Then use the flags from Makefile in setup.py:

def update_extension_flags(self, ext):
name = ext.name.upper()
cflags = sysconfig.get_config_var(f"MODULE_{name}_CFLAGS")
if cflags:
ext.extra_compile_args.extend(shlex.split(cflags))
ldflags = sysconfig.get_config_var(f"MODULE_{name}_LDFLAGS")
if ldflags:
ext.extra_link_args.extend(shlex.split(ldflags))
return ext

Finally update Modules/makesetup to use the new variables, too.

--

___
Python tracker 

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



[issue43923] Can't create generic NamedTuple as of py3.9

2021-11-10 Thread David Lukeš

David Lukeš  added the comment:

This is unfortunate, especially since it used to work... Going forward, is the 
intention not to support this use case? Or is it possible that support for 
generic NamedTuples will be re-added in the future?

--
nosy: +dlukes

___
Python tracker 

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



[issue45745] ./python -m test --help output for refleaks seems wrong

2021-11-10 Thread STINNER Victor


STINNER Victor  added the comment:

To check for reference leaks, memory leaks and file descriptor leaks: 
--huntrleaks/-R should be used.

--

___
Python tracker 

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



[issue45745] ./python -m test --help output for refleaks seems wrong

2021-11-10 Thread STINNER Victor


STINNER Victor  added the comment:

In Python 3.6, regrtest failed if --findleaks was used and gc.garbage was not 
empty after a test completed.

I modified regrtest to always run this check: --findleaks is now ignored.

But I also modified --findleaks to make it an alias to the --fail-env-changed 
option: non-zero exit code if a test fails with "ENV CHANGED" status.

I wrote PR 29514 to clarify the situation: remove --findleaks :-)

--

___
Python tracker 

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



[issue45745] ./python -m test --help output for refleaks seems wrong

2021-11-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue45759] Improve error messages for non-matching `elif`/`else` statements

2021-11-10 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
pull_requests: +27765
pull_request: https://github.com/python/cpython/pull/29513

___
Python tracker 

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



[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-11-10 Thread STINNER Victor


STINNER Victor  added the comment:

So far, no PEP has been written.

--

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-10 Thread Łukasz Wałejko

Łukasz Wałejko  added the comment:

I can also confirm that there is an regression in Python 3.9.8 regarding 
argparse

For example, using watchdog 2.1.6 package

Python 3.9.7 (correct behaviour)
In [1]: from watchdog import watchmedo
In [2]: watchmedo.cli.parse_args(["auto-restart", "echo", "123"])
Out[2]: Namespace(command='echo', command_args=['123'], directories=None, 
patterns='*', ignore_patterns='', ignore_directories=False, recursive=False, 
timeout=1.0, signal='SIGINT', debug_force_polling=False, kill_after=10.0, 
func=)

Python 3.9.8 (incorrect behaviour)
In [1]: from watchdog import watchmedo
In [2]: watchmedo.cli.parse_args(["auto-restart", "echo", "123"])
Out[2]: Namespace(command='auto-restart', command_args=['123'], 
directories=None, patterns='*', ignore_patterns='', ignore_directories=False, 
recursive=False, timeout=1.0, signal='SIGINT', debug_force_polling=False, 
kill_after=10.0, func=)

--
nosy: +lwalejko

___
Python tracker 

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



[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Abdullah Alnajim

New submission from Abdullah Alnajim :

After updating python to the latest version, an issue related to reading files 
in long paths (>256 letters) is arisen. Whenever I try to read such a file in 
Windows 11, I got an exception telling me that the file is not there, even 
though it’s there and I allowed windows 11 to accept long paths  (> Max_Path). 
Absolute and relative paths did not work. Projects that were working before 
normally, are no longer working. The exception is “FileNotFoundError: [Errno 2] 
No such file or directory: The_Long_Path_To_The_File,

--
messages: 406078
nosy: Alnajim
priority: normal
severity: normal
status: open
title: Issue in reading files with a path longer than 256 letters after latest 
update
type: behavior
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



[issue10483] http.server - what is executable on Windows

2021-11-10 Thread mike mcleod


mike mcleod  added the comment:

Should I go ahead and make the changes as per msg122208 ? on my local copy and 
test?

--

___
Python tracker 

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



[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-11-10 Thread Hai Shi


Change by Hai Shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue45774] Detect SQLite in configure.ac

2021-11-10 Thread Christian Heimes


Christian Heimes  added the comment:

I saw your message concerning sqlite3 on the FreeBSD buildbot. It's hard to 
tell why configure on FreeBSD doesn't find sqlite3.h without access to 
config.log or a shell. Maybe sqlite3 is installed in /usr/local ? ``configure`` 
does not use /usr/local/include and /usr/local/lib by default. ``setup.py`` 
extends the search paths for headers and libraries by non-standard locations.

A "config.site" file should do the trick:

$ mkdir -p /usr/local/etc
$ cat > /usr/local/etc/config.site << EOF
test -z "$CPPFLAGS" && CPPFLAGS="-I$/usr/local/include"
test -z "$LDFLAGS" && LDFLAGS="-L/usr/local/lib"
EOF

--

___
Python tracker 

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