[issue43911] Queue.get() memory leak

2021-04-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

For a large amount of data, a list uses a single large contiguous block of 
memory while a deque uses many small discontiguous blocks.  In your demo, I 
that suspect that some of the memory pages for deque's blocks are also being 
used for other small bits of data.  If any of the those small bits survive 
(either in active use or held for future use by the small memory allocator), 
then the page cannot be reclaimed.  When memory fragments like this, it 
manifests as an increasing amount of process memory.

Also, the interaction between the C library allocation functions and the O/S 
isn't under our control.  Even when our code correctly calls PyMem_Free(), it 
isn't assured that total process memory goes goes back down.

As an experiment, try to recreate the effect by building a list of lists:

class Queue(list):
def put(self, x):
if not self or len(self[-1]) >= 66:
self.append([])
self[-1].append(x)
def get(self):
if not self:
raise IndexError
block = self[0]
x = block.pop(0)
if not block:
self.pop(0)
return x

--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-23 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 23.04.2021 03:37, akdor1154 wrote:
> 
> akdor1154  added the comment:
> 
> If I understand the target of this issue, this is a breaking change in python 
> 3.9 .
> 
> E.g. see https://github.com/SAP/PyHDB/issues/149
> 
> Ideally if we did not intend to break libraries then can this be fixed?
> Or if it is acceptable to have such a breaking change, can it be documented 
> as such? (maybe this is https://github.com/python/cpython/pull/23096 ? though 
> I would not interpret that as a breaking change at first glance)

This patch only restored the behavior we had before (and for many many
years). It's not breaking, it's in fact resolving a break which was
caused by earlier:

https://bugs.python.org/issue37751#msg349448

Please note that search functions determine how to map codec names
to codec implementations. The codec search function in the encodings
package uses one way to do this (and depends on how the package
is structured).

The approach taken by the encodings search function is listed here:
https://github.com/python/cpython/blob/master/Lib/encodings/__init__.py#L43

Other search functions can work in different ways.

Now, unfortunately, parts of this kind of normalization have also made
its way into the codecs module itself and into the Unicode
implementation and perhaps not always in a way which allows search
functions to use a different approach or which is consistent.

As I mentioned before, the safest way to go about this is to use
alnum only names for codecs, with the addition of underscores to
separate important parts.

The Python implementation should make sure that such names continue
to work when passed through any codec name normalization.

--
title: In codecs,  function 'normalizestring' should convert both spaces and 
hyphens to underscores. -> In codecs, function 'normalizestring' should convert 
both spaces and hyphens to underscores.

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also, when running deque measurements, run the following before getting the 
starting process memory:

   deque(range(2000)).clear()   # fill the deque freelist

That will give a cleaner before/after comparison.

--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-23 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 23.04.2021 07:47, Inada Naoki wrote:
> 
> Inada Naoki  added the comment:
> 
> I think it is too late. Python 3.9 has been released already.  Reverting the 
> change is also breaking change.
> 
> PEP 100 says:
> "Search functions are expected to take one argument, the encoding name in all 
> lower case letters and with hyphens and spaces converted to underscores"
> https://www.python.org/dev/peps/pep-0100/#codecs-coder-decoders-lookup
> 
> But codecs.register() says:
> "Search functions are expected to take one argument, being the encoding name 
> in all lower case letters".
> 
> I don't know historical reason why two document are inconsistent.
> https://docs.python.org/3/library/codecs.html#codecs.register

I guess just an oversight on my part.

PEP 100 is certainly what I meant and implemented. I should have also
made it clear in PEP 100 that I meant lower case ASCII letters.

--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-23 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



[issue43804] "Building C and C++ Extensions on Windows" docs are very out-of-date

2021-04-23 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I'm attaching a patch for improving "Building C and C++ Extensions on Windows" 
and "Building C and C++ Extensions" docs.

--
Added file: https://bugs.python.org/file49973/patch.patch

___
Python tracker 

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



[issue32133] documentation: numbers module nitpick

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue30094] PDB enhancement

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue23602] Implement __format__ for Fraction

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue23975] numbers.Rational implements __float__ incorrectly

2021-04-23 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

I've removed the "?" from the end attributes for pattern nodes.

The draft PR branch now compiles, but I've clearly made a mistake somewhere as 
it segfaults when trying to compile test_patma.py.

--

___
Python tracker 

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



[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:

I wasn't aware of this bpo and created bpo-43885 a couple of days ago. 

tl;dr I do not understand test changes in 
fb7e7505ed1337bf40fa7b8b68317d1e86675a86 at all. I think that these changes are 
broken, too. ThreadedEchoServer and ConnectionHandler must not raise unhandled 
exceptions. An unhandled exception can break tests and sometimes causes 
threaded tests to hang indefinitely.

--
nosy: +christian.heimes
priority: normal -> high
versions: +Python 3.10, Python 3.11, Python 3.8

___
Python tracker 

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



[issue43885] ResourceWarning: unclosed test_pha_required_nocert

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks Victor, let's handle the issue in bpo-37322 instead.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_ssl: test_pha_required_nocert() emits a ResourceWarning

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 32980fb669a6857276da18895fcc0cb6f6fbb544 by Hai Shi in branch 
'master':
bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 
(GH-23096)
https://github.com/python/cpython/commit/32980fb669a6857276da18895fcc0cb6f6fbb544


--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

My proposed MatchConstant node name was bothering me, as most constants are 
actually matched by equality in MatchValue, the same way variables are.

So I'm switching my proposed name for that node to be MatchSingleton, since 
that better reflects the key difference with MatchValue (i.e. comparing by 
identity rather than by value, and specifically comparing with the builtin 
singletons).

--

___
Python tracker 

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



[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +24273
pull_request: https://github.com/python/cpython/pull/25553

___
Python tracker 

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



[issue37363] Additional PEP578 hooks

2021-04-23 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.10 -Python 3.8, Python 3.9

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


New submission from Christian Heimes :

OpenSSL 3.0.0-alpha15 handles empty data input to d2i_X509_bio() and 
PEM_read_bio_X509() differently. This causes cadata test for invalid data to 
fail with inconsistent error message.

Let's handle 0 result case more consistent and raise an error message that is 
more understandable than "no start line" or "not enough data".

--
assignee: christian.heimes
components: SSL
messages: 391673
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: OpenSSL 3.0.0: handle empty cadata consistently
type: behavior
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

Segfaults are fixed (I had a couple of cases where I wasn't checking for NULL, 
and another where I was looking up MatchMapping attributes on a MatchClass 
node).

test_patma passes except for test cases 240, 241, and 242, which look like 
genuine regressions - the logic to reject illegal MatchValue nodes is missing 
from the code generator side, and these particular values make it through the 
parser OK. I'll need to add back some of the code I took out so these still get 
rejected.

--

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue37363] Additional PEP578 hooks

2021-04-23 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:


New changeset 927b841c215a1ca36c9b3203eadc67ce05b1ed07 by Saiyang Gou in branch 
'master':
bpo-37363: Add audit events to the `http.client` module (GH-21321)
https://github.com/python/cpython/commit/927b841c215a1ca36c9b3203eadc67ce05b1ed07


--

___
Python tracker 

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



[issue37363] Additional PEP578 hooks

2021-04-23 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

the http module is covered by the audit events

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/405/builds/9

Extract from the logs:

The Buildbot has detected a new failure on builder AMD64 Windows8.1 Non-Debug 
3.x while building python/cpython.
Full details are available at:
https://buildbot.python.org/all/#builders/405/builds/9

Buildbot URL: https://buildbot.python.org/all/

Worker for this Build: ware-win81-release

Build Reason: 
Blamelist: E-Paine <63801254+e-pa...@users.noreply.github.com>, Raymond 
Hettinger , Simon Charette 
, Steve Dower 

BUILD FAILED: failed test (failure)


Summary of the results of the build (if available):
===

== Tests result: FAILURE then FAILURE ==

395 tests OK.

10 slowest tests:
- test_multiprocessing_spawn: 2 min 43 sec
- test_concurrent_futures: 2 min 25 sec
- test_io: 1 min 43 sec
- test_largefile: 1 min 41 sec
- test_peg_generator: 1 min 39 sec
- test_mmap: 1 min 19 sec
- test_asyncio: 58.8 sec
- test_regrtest: 45.3 sec
- test_unparse: 44.1 sec
- test_tokenize: 41.1 sec

1 test failed:
test_ssl

30 tests skipped:
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll
test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue
test_multiprocessing_fork test_multiprocessing_forkserver test_nis
test_openpty test_ossaudiodev test_pipes test_poll test_posix
test_pty test_pwd test_readline test_resource test_spwd
test_syslog test_threadsignals test_wait3 test_wait4
test_xxtestfuzz test_zipfile64

1 re-run test:
test_ssl

Total duration: 9 min 15 sec



Captured traceback
==

Traceback (most recent call last):
   File 
"D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_ssl.py", line 
2333, in wrap_conn
self.sslconn = self.server.context.wrap_socket(
   File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\ssl.py", line 
518, in wrap_socket
return self.sslsocket_class._create(
   File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\ssl.py", line 
1070, in _create
self.do_handshake()
   File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\ssl.py", line 
1339, in do_handshake
self._sslobj.do_handshake()
 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: self signed certificate (_ssl.c:969)


Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_ssl.py", line 
255, in wrapper
return func(*args, **kw)
  File 
"D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_ssl.py", line 
3171, in test_wrong_cert_tls13
self.fail("Use of invalid cert should have failed!")
AssertionError: Use of invalid cert should have failed!



Test report
===

Failed tests:

- test_ssl

Failed subtests:

- test_wrong_cert_tls13 - test.test_ssl.ThreadedTests




Sincerely,
 -The Buildbot

--
assignee: christian.heimes
messages: 391677
nosy: christian.heimes, pablogsal
priority: normal
severity: normal
status: open
title: test_ssl fails on Windows buildbots
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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Gentle ping

--

___
Python tracker 

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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Commenting out the enum tests reveals that test_socket has additional problems:

𓋹 ./python.exe -m test test_socket  -R 3:3
0:00:00 load avg: 2.32 Run tests sequentially
0:00:00 load avg: 2.32 [1/1] test_socket
beginning 6 repetitions
123456
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
./Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
./Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
./Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
./Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
./Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2701: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg(bufsize, *args)
/Users/pgalindo3/github/python/master/Lib/test/test_socket.py:2792: 
RuntimeWarning: received malformed or improperly-truncated ancillary data
  result = sock.recvmsg_into([buf], *args)
.
test_socket leaked [20, 20, 20] file descriptors, sum=60
test_socket failed in 2 min 25 sec

== Tests result: FAILURE ==

1 test failed:
test_socket

Total duration: 2 min 25 sec
Tests result: FAILURE

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +steve.dower

___
Python tracker 

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



[issue43852] [sqlite3] Improve tuple creation

2021-04-23 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset e9194ea6eaa18299d6ccbd3555ce150fab0c6184 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43852: Improve tuple creation in sqlite3 (GH-25421)
https://github.com/python/cpython/commit/e9194ea6eaa18299d6ccbd3555ce150fab0c6184


--

___
Python tracker 

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



[issue43852] [sqlite3] Improve tuple creation

2021-04-23 Thread Berker Peksag


Change by Berker Peksag :


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

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


--
dependencies: +OpenSSL 3.0.0: handle empty cadata consistently

___
Python tracker 

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-23 Thread Mark Dickinson


Mark Dickinson  added the comment:

For the record, here's the python-ideas thread: 
https://mail.python.org/archives/list/python-id...@python.org/thread/AWNTQZ3HHAQ42O2ZHRA3U2US4HGKC2TF/

I'm no longer convinced that this is a good idea. It's the usual difference 
between "Would it have been better if we'd called it 'Integer' rather than 
'Integral'?", and "Given where we are, is it worth changing the name now?". The 
name "Integral" isn't actually _wrong_ as such; it's just perhaps not the name 
that we would have chosen if we were inventing the numbers ABC right now.

If we add "Integer", we have to choose between

- maintaining both names indefinitely, or
- deprecating and eventually removing the "Integral" name

Neither option seems appealing: the first is a violation of "one obvious way"; 
the second causes unnecessary work for third-party projects already using 
Integral.

--
nosy: +rhettinger, tim.peters

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset b9ad88be0304136c3fe5959c65a5d2c75490cd80 by Christian Heimes in 
branch 'master':
bpo-43920: Make load_verify_locations(cadata) error message consistent 
(GH-25554)
https://github.com/python/cpython/commit/b9ad88be0304136c3fe5959c65a5d2c75490cd80


--

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +24275
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +24276
pull_request: https://github.com/python/cpython/pull/25556

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-04-23 Thread Petr Viktorin

Petr Viktorin  added the comment:


New changeset 90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf by Lumír 'Frenzy' Balhar 
in branch 'master':
bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation of 
the PEP) (GH-23142)
https://github.com/python/cpython/commit/90d02e5e63e2cb8f66a2c0dd2ea8d7d4f45f4ebf


--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-23 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset e7cc64e297001cc79b9afab80f71d9e6d1267cb7 by Petr Viktorin in 
branch 'master':
bpo-43795: PEP-652: Simplify headers for easier static analysis (GH-25483)
https://github.com/python/cpython/commit/e7cc64e297001cc79b9afab80f71d9e6d1267cb7


--

___
Python tracker 

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-23 Thread Sergey B Kirpichev


Sergey B Kirpichev  added the comment:

On Fri, Apr 23, 2021 at 11:51:17AM +, Mark Dickinson wrote:
> The name "Integral" isn't actually _wrong_ as such; it's just perhaps
> not the name that we would have chosen if we were inventing the
> numbers ABC right now.
> 
> If we add "Integer", we have to choose between
> 
> - maintaining both names indefinitely, or
> - deprecating and eventually removing the "Integral" name
> 
> Neither option seems appealing: the first is a violation of "one
> obvious way"; the second causes unnecessary work for third-party
> projects already using Integral.

The second option require very small part of work (oneline patch, to be
precise).  The one of the best parts of the Python is that it's a live
language.  I.e. wrong decisions could be corrected.

The current one is not wrong, in a strict sense, but if the C
standard, wikipedia pages, etc (include the Scheme numbers tower)
reference integer types and CPython docs call this "integral" -
I'm not sure if the later is a good name.

--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-23 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 9d6a2d0ee7e55402656e1dec46400591b62db331 by Petr Viktorin in 
branch 'master':
bpo-43795: PEP-652: Clean up the stable ABI/limited API (GH-25482)
https://github.com/python/cpython/commit/9d6a2d0ee7e55402656e1dec46400591b62db331


--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

To get the "0+0" matching case rejected again I had to flesh out a bit more of 
the AST validator. This initial piece of the validator replaces the previously 
pattern-matching-specific AST optimisation code that refused to fold BinOp 
expressions that weren't complex numbers, allowing the compiler to reject them.

I also added two new tests (240b and 241b) to ensure that 0+0 & f"" were also 
rejected as mapping keys. 241b passes with the current PR, as f"" gets rejected 
by both the check in the AST validator *and* by the "constant or attribute 
lookup" restriction in the compiler, so the latter check covers for the leaky 
validator.

240b is disabled for now, as it won't pass until the AST validator checks all 
the subexpressions being used as keys in a mapping pattern (because it gets 
constant folded to "0", the check in the compiler accepts it).

That leaves fixing the unparser tests as the key thing to do before I create 
the main PR.

Before that, though, I'll look at potentially simplifying the MatchMapping code 
by changing the signature as Brandt suggested.

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset dcf658157df11de198a98e3db2a3050dd4f6b973 by Christian Heimes in 
branch 'master':
bpo-38820: Test with OpenSSL 3.0.0-alpha15 (GH-25537)
https://github.com/python/cpython/commit/dcf658157df11de198a98e3db2a3050dd4f6b973


--

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset e259a77f21bdfc7d4195913b379cbd6daee45d0d by Christian Heimes in 
branch '3.9':
[3.9] bpo-43920: Make load_verify_locations(cadata) error message consistent 
(GH-25554) (GH-2)
https://github.com/python/cpython/commit/e259a77f21bdfc7d4195913b379cbd6daee45d0d


--

___
Python tracker 

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



[issue43868] Remove PyOS_ReadlineFunctionPointer from the stable ABI list

2021-04-23 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 91b69b77cf5f78de6d35dea23098df34b6fd9e53 by Petr Viktorin in 
branch 'master':
bpo-43868: Remove PyOS_ReadlineFunctionPointer from the stable ABI list 
(GH-25442)
https://github.com/python/cpython/commit/91b69b77cf5f78de6d35dea23098df34b6fd9e53


--

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Jens


Jens  added the comment:

Thanks for your input.

So i've run the tests with the List of Lists Queue class, there seems to be a 
resulting difference depending on what qsize() method I define, that is called 
my script.

For an instance where qsize just return None,

class QueueLists(list):

def put(self, x):
if not self or len(self[-1]) >= 66:
self.append([])
self[-1].append(x)

def get(self):
if not self:
raise IndexError
block = self[0]
x = block.pop(0)
if not block:
self.pop(0)
return x

# def qsize(self):
# tot = 0
# for elem in self:
# tot += len(elem)
# return tot

def qsize(self):
return None

The results are:
>#
>del_after_puts False del_after_gets True n_puts 2000
>before run
>mem_pct 0.15%
>-- put done  - qsize None
>mem_pct 38.06% 
>-- gets done  - qsize None
>mem_pct 2.35% 
>deleting queue after gets []
>mem_pct 2.35% 
>time elapsed 0:01:04.703969

For a Queue instance, where qsize() returns the actual size

class QueueLists(list):

def put(self, x):
if not self or len(self[-1]) >= 66:
self.append([])
self[-1].append(x)

def get(self):
if not self:
raise IndexError
block = self[0]
x = block.pop(0)
if not block:
self.pop(0)
return x

def qsize(self):
tot = 0
for elem in self:
tot += len(elem)
return tot
the results are:

>#
>del_after_puts False del_after_gets True n_puts 2000
>before run
>mem_pct 0.15% 
>-- put done  - qsize 2000
>mem_pct 38.05% 
>-- gets done  - qsize 0
>mem_pct 2.35% 
>deleting queue after gets []
>mem_pct 0.18% 
>time elapsed 0:00:53.347746

So both instances leak as you've indicated, but the one that returns None as 
queue size does not get it's leak released after the instance is deleted which 
is a weird difference.

--

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Jens


Jens  added the comment:

Regarding deque, the leak indeed does not seem to be releasable after it is 
inited to up the size of the number of elements that are going to put into the 
queue, as:


qmem = collections.deque(range(n_puts))
qmem.clear()

The results are:

>#
>del_after_puts False del_after_gets True n_puts 2000
>before run
>mem_pct 0.14% 
>-- put done  - qsize 2000
>mem_pct 37.61% 
>-- gets done  - qsize 0
>mem_pct 2.22% 
>deleting queue after gets deque([])
>mem_pct 2.22% 
>time elapsed 0:00:16.800156

--

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Jens


Jens  added the comment:

So this got me thinking of trying to use some other linked list 
implementations. 

I've used a llist library - https://github.com/ajakubek/python-llist

Using their doubly linked list implementation:

class DllistQueue(queue.Queue):
def _init(self, maxsize):
self.queue = dllist()

Results are:
>del_after_puts False del_after_gets True n_puts 2000
>before run
>mem_pct 0.15% 
>-- put done  - qsize 2000
>mem_pct 55.34% 
>-- gets done  - qsize 0
>mem_pct 0.15% 
>deleting queue after gets <__main__.DllistQueue object at 0x7f494ba91450>
>mem_pct 0.15% 
>time elapsed 0:02:17.642700

Using their singly listed list implementation:

class SllistQueue(queue.Queue):
def _init(self, maxsize):
self.queue = sllist()

results are:
>del_after_puts False del_after_gets True n_puts 2000
>before run
>mem_pct 0.15% 
>puting  0 qsize 0
>-- put done  - qsize 2000
>mem_pct 55.34% 
>-- gets done  - qsize 0
>mem_pct 0.15% 
>deleting queue after gets <__main__.SllistQueue object at 0x7ff07bf484d0>
>mem_pct 0.15% 
>time elapsed 0:02:03.495047

I have not dived in how their C implementations differ from deque, but it seems 
to use more memory and it's slower, but it does not seem to leak at all. 

Thanks

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

https://github.com/ncoghlan/cpython/pull/9/commits/54940a3817df3046da3f9c51d4d426a73b2ec786
 implements Brandt's suggestion of disallowing NULL keys in MatchMapping and 
instead passing in an explicit "rest" identifier to capture the extra keys.

This did require moving to a multi-branch pattern definition in the grammar, 
similar to class patterns, in order to enforce the separating comma when both 
ordinary key:pattern pairs and a double-star target are present. I think it's a 
nice ergonomic improvement on the AST node itself though, as it makes it 
trivial to check if a mapping patterns captures extra keys or not (vs the 
relatively non-obvious check to see if the last key is NULL/None).

That just leaves updating the unparser to handle the new node types.

Capturing the latest node definitions from the draft PR:

pattern = MatchAlways
 | MatchValue(expr value)
 | MatchSingleton(constant value)
 | MatchSequence(pattern* patterns)
 | MatchMapping(expr* keys, pattern* patterns, identifier? rest)
 | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, 
pattern* kwd_patterns)

 | MatchStar(identifier? target)
 -- The optional "rest" MatchMapping parameter handles capturing extra 
mapping keys

 | MatchAs(pattern? pattern, identifier target)
 | MatchOr(pattern* patterns)
  attributes (int lineno, int col_offset, int end_lineno, int 
end_col_offset)

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan


Nick Coghlan  added the comment:

Setting clear timing expectations, given beta is so close: I'm not expecting to 
have time to finish the unparser work over the weekend, but I do expect to have 
time to finish it on Monday evening my time (UTC+10).

--

___
Python tracker 

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



[issue43856] Docs for importlib.metadata should mention Python version

2021-04-23 Thread Jason R. Coombs


Change by Jason R. Coombs :


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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Jens


Jens  added the comment:

Also compared this library to deque, and Queues based on this:

https://github.com/kata198/python-cllist

It seems to be as fast as deque, uses a bit more memory at the top usage, but 
does not leak at all.

--

___
Python tracker 

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



[issue43914] Highlight invalid ranges in SyntaxErrors

2021-04-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a77aac4fca9723b8fd52a832f3e9df13beb25113 by Pablo Galindo in 
branch 'master':
bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525)
https://github.com/python/cpython/commit/a77aac4fca9723b8fd52a832f3e9df13beb25113


--

___
Python tracker 

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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread Julien Castiaux


New submission from Julien Castiaux :

Hello,

We received multiple bug reports about broken links in rich html emails. 
Sometime, in some emails, a link like https://example.com";> would 
become https://example..com>, notice the double dot.

After multiple researches both in the Python email source code and in the RFC, 
it turns out that Python correctly implements the standard but that the distant 
(non-python) smtp server used by some of our customers doesn't.

The various email standard state the following:

1) As a single dot (".", chr(0x2e)) in a line ends the SMTP transmission, such 
single dots must be escaped when they are part of the message. RFC 5321, 
section 4.5.2 requires to escape all dots when they appear at the beginning of 
a line, using a dot as escape symbol. That is, when the user message contains: 
"\r\n.\r\n", it is escaped to "\r\n..\r\n". The other smtp side is responsible 
to remove the extra dot.

2) When we transport the email body using the quoted-printable encoding, RFC 
2045 requires each line to have maximum 78 characters and define a single equal 
("=", chr(0x3d)) as soft-warp sequence to fold lines too long. The RFC does 
only require to split the line outside of a quoted character (cannot split in 
the middle of "=2E"). Like any other character, it is allowed to split the line 
before a dot.

Take the following example:

from email.message import EmailMessage
from email.policy import SMTP

msg = EmailMessage(policy=SMTP)
msg.set_context("Hello there, just need some text to reach that seventy-six 
character, example.com")
#   
  ^
#   
  78th char

print(msg.as_string())
# Content-Type: text/plain; charset="utf-8"
# Content-Transfer-Encoding: quoted-printable
# MIME-Version: 1.0
#
# Hello there, just need some text to reach that seventy-six character, 
example=
# .com

When the message is sent over smtp, smtplib escapes the line ".com" to become 
"..com" as required by the RFC. So no problem in the python implementation, it 
is the other side that is buggy.

But! We have two solutions to "fix" the other side, the problem is that they do 
not correctly parse lines starting with a dot. A solution would be to ensure no 
line starts with the dot character. Two solutions : (1) quoted-printable encode 
dots when they are at the beginning of a line, (2) prevent the line folding 
code from splitting a line before a dot.

(1) is allowed by the RFC, any character can be quoted-printable encoded even 
those that have a safe ascii representation already. In our "example=\n.com" 
example above, we can qp the code: "example=\n=2Ecom". The line starts with a 
"2" instead of a dot and the content is the same.

(2) is allowed by the RFC, the RFC only states that a line must be at most 78 
chars long, it also states it is allowed to fold a line anywhere but in a 
quoted-printable sequence. It is safe to split a line earlier than the 78th 
character. In our "example=\n.com" example above, we could split the line at 
the 77th character: "exampl=\ne.com". The line starts with a "e" instead of a 
dot and the content is the same.

A pull request is coming shortly.

--
components: email
messages: 391698
nosy: Julien Castiaux, barry, r.david.murray
priority: normal
severity: normal
status: open
title: Double dots in quopri transported emails
type: enhancement
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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 82b6c0909aae423d9c8f4ff7d0e8df16106dbe28 by Christian Heimes in 
branch '3.8':
[3.8] bpo-43920: Make load_verify_locations(cadata) error message consistent 
(GH-25554) (GH-25556)
https://github.com/python/cpython/commit/82b6c0909aae423d9c8f4ff7d0e8df16106dbe28


--

___
Python tracker 

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



[issue43920] OpenSSL 3.0.0: handle empty cadata consistently

2021-04-23 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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread Jérôme Vanhaudenard

Change by Jérôme Vanhaudenard :


--
nosy: +jev2

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

I haven't followed this precisely, but I recall that when we first made PEP 563 
the default, we had to fix a number of bugs in various library modules (e.g. 
inspect) that were only apparent when `from __future__ import annotations` was 
used. I hope we're not throwing away those bugfixes. Hopefully Batuhan has a 
recollection of what I am thinking of, there was some significant delay while 
we figured out what to do about some of these.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Is there going to be a separate PR to actually *set* the IMMUTABLE flag on all 
built-in type objects? There are many of those.

--

___
Python tracker 

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



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks Zackery!

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

___
Python tracker 

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



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 7d37b86ad48368cf93440ca220b758696730d0e5 by Zackery Spytz in 
branch 'master':
bpo-35114: Make ssl.RAND_status() return a bool (GH-20063)
https://github.com/python/cpython/commit/7d37b86ad48368cf93440ca220b758696730d0e5


--
nosy: +christian.heimes

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, when running your code on my Intel Mac with 16 Gb of RAM, the "after 
return" result is 0.1%.  So getting up to 2.2% seems to be specific to your 
build.

Also, I just ran your code with a deque instrumented to count the number of 
mallocs and frees.  At the end of the run, there were 312506 blocks allocated 
and 312490 freed.  The difference of 16 is expected.  That is the number of 
blocks kept in the freelist to reduce allocator calls for common use cases.

So we're not seeing a "leak" in the traditional sense of more calls to malloc() 
than to free().  Instead, there is just an indirect measurement of total 
process memory which is something we can't directly control.  

That you observed similar a result with a list of lists corroborates that there 
isn't an issue specific to Queue or deques.  Instead, it is just an artifact of 
this particular pattern of exercising the memory allocators.  

I conclude that what you're seeing isn't a bug.  The effect is due to a mix of:
1) the interaction between the C library and the O/S memory management routines
2) normally occurring fragmentation
3) freelists which are intentionally reserved.

Thank you for the report, but we've spent enough time on it.  Trying to account 
for total process memory is like chasing rainbows, mostly elusive and there is 
not pot of gold at the end :-)

--
keywords: +patch
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
Added file: https://bugs.python.org/file49974/instrument_deque.diff

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
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-04-23 Thread FHTMitchell


New submission from FHTMitchell :

As of python 3.9, you now can't have multiple inheritance with 
`typing.NamedTuple` subclasses. This seems sensible, until you realise that 
`typing.Generic` works via inheritance. This fails whether or not `from 
__future__ import annotations` is enabled.

example:

```
class Group(NamedTuple, Generic[T]):
 key: T
 group: List[T]
 
---
TypeError Traceback (most recent call last)
 in 
> 1 class Group(NamedTuple, Generic[T]):
  2 key: T
  3 group: List[T]
  4 

~/.conda/envs/py39/lib/python3.9/typing.py in _namedtuple_mro_entries(bases)
   1818 def _namedtuple_mro_entries(bases):
   1819 if len(bases) > 1:
-> 1820 raise TypeError("Multiple inheritance with NamedTuple is not 
supported")
   1821 assert bases[0] is NamedTuple
   1822 return (_NamedTuple,)

TypeError: Multiple inheritance with NamedTuple is not supported
```

This worked fine in python 3.7 and 3.8 and as I understand it was one of the 
motivating cases for pep 560. 

The change was made as part of bpo-40185: Refactor typing.NamedTuple. Whilst 
the obvious alternative is "use dataclasses", they don't have the same runtime 
properties or implications as namedtuples.

--
messages: 391705
nosy: FHTMitchell
priority: normal
severity: normal
status: open
title: Can't create generic NamedTuple as of py3.9
versions: Python 3.10, Python 3.11, Python 3.9

___
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-04-23 Thread FHTMitchell


Change by FHTMitchell :


--
type:  -> behavior

___
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-04-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +levkivskyi, rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


--
files: main.py
nosy: rafihassan190041234
priority: normal
severity: normal
status: open
title: print unexpected values in infinite loop
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49975/main.py

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-23 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

@steve.dower Would you mind merging the backport of the PR to the 3.9 branch 
manually? Apparently there seems to a test failure. I'm not sure why. But it 
reports that test has been failing recently.

--

___
Python tracker 

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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread R. David Murray


R. David Murray  added the comment:

Since python is doing the right thing here, I don't see a particularly good 
reason to put a hack into the stdlib to fix the failure of third party software 
to adhere to standards.  (On the output side.  We do follow Postel's rule on 
input and try hard to handle broken but recoverable input.)  I don't actually 
*object* to it, though, as long as it follows the standard on output, and is a 
*simple* change.

Please note that you can fix this locally by implementing and using a custom 
content manager.

--

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


--
type: behavior -> 

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Removed file: https://bugs.python.org/file49975/main.py

___
Python tracker 

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



[issue43538] [Windows] support args and cwd in os.startfile()

2021-04-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset 019e9e816882f5c43c4b833f81844b8299e815fd by Steve Dower in branch 
'master':
bpo-43538: Add extra arguments to os.startfile (GH-25538)
https://github.com/python/cpython/commit/019e9e816882f5c43c4b833f81844b8299e815fd


--

___
Python tracker 

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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24278
pull_request: https://github.com/python/cpython/pull/25559

___
Python tracker 

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



[issue43538] [Windows] support args and cwd in os.startfile()

2021-04-23 Thread Steve Dower


Change by Steve Dower :


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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset 3513d55a617012002c3f82dbf3cec7ec1abd7090 by Steve Dower in branch 
'master':
bpo-43607: Fix urllib handling of Windows paths with \\?\ prefix (GH-25539)
https://github.com/python/cpython/commit/3513d55a617012002c3f82dbf3cec7ec1abd7090


--

___
Python tracker 

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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +24277
pull_request: https://github.com/python/cpython/pull/25558

___
Python tracker 

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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread Steve Dower


Change by Steve Dower :


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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Jens


Jens  added the comment:

Ok, I see, thanks Raymond. 

Queue based logging leaks seem to hang my deployed applications atm, so this 
seemed like a possible reason for it. I use locally 8GB Ubuntu, and it gets to 
2.2% after return with 20million puts, and on a remote 1GB Ubuntu instance, it 
gets to 3.79% up from 1.24% with 3 million puts after return. So I don't think 
this is necessarily specific to my local build and seems like a genuine issue.

I understand where are you coming from stating that it's not a bug, but the 
alternative deque implementations don't seem to suffer from the same issue, at 
least to such a big extent, as I have shown.

I will continue and try to adapt alternate deque implementations and see if it 
solves Queues leaking and hanging my instances.

Thanks for your time and involvement in this.

--

___
Python tracker 

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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24279
pull_request: https://github.com/python/cpython/pull/25560

___
Python tracker 

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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, I am being forced to revert commit 
a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 due to have it failing of all refleak 
buildbots for more than two days.

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Brandt Bucher


Brandt Bucher  added the comment:

I can probably find time to take a pass at the unparser, if you want.

> cls needs to be an expression node to allow for attribute lookups

That's why I suggested "identifier*"! Each identifier in the list would be one 
part of the dotted name, so we wouldn't need to worry about having arbitrary 
expressions:

Foo() -> MatchClass(["Foo"], [], [], [])
foo.bar.Baz() -> MatchClass(["foo", "bar", "Baz"], [], [], [])

Not a big deal, though.

--

___
Python tracker 

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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Ethan Furman


Ethan Furman  added the comment:

My apologies, I was having hardware issues.

Checking it out now.

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Added file: https://bugs.python.org/file49976/main.py

___
Python tracker 

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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread miss-islington


miss-islington  added the comment:


New changeset 04bcfe001cdf6290cb78fa4884002e5301e14c93 by Miss Islington (bot) 
in branch '3.9':
bpo-43607: Fix urllib handling of Windows paths with \\?\ prefix (GH-25539)
https://github.com/python/cpython/commit/04bcfe001cdf6290cb78fa4884002e5301e14c93


--

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Added file: https://bugs.python.org/file49977/main.py

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Removed file: https://bugs.python.org/file49976/main.py

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Removed file: https://bugs.python.org/file49977/main.py

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Rafi Hassan Chowdhury


Change by Rafi Hassan Chowdhury :


Added file: https://bugs.python.org/file49978/main.py

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> deferred blocker

___
Python tracker 

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



[issue43925] Add hangul syllables to unicodedata.decomposititon

2021-04-23 Thread Frédéric Grosshans-André

New submission from Frédéric Grosshans-André :

Currently (python 3.8.6, unidata_version 12.1.0) unicodedata.decomposition 
outputs an empty string for hangul syllable (codepoints in the AC00..D7A3 
range) while the decomposition is not empty: it is always two characters 
(either a LV syllable and a T Jamo or a L jamo and a V jamo). This 
decomposition is dedicible algorithmically (se §3.12 of Unicode Standard). A 
python version of the algorithm is below (I don’t know C, so I can’t propose a 
patch). 

For each hangul syllable hs, I have used unicodedata.noramize to check that the 
NFC of the decomposition is indeed hs, that the decomposition is two codepoints 
long, that the NFD of both hs and the decompotsition coincide 

def hangulsyllabledecomposition(c):
if not 0xAC00 <= ord(c) <= 0xD7A3 : raise ValueError('only Hangul syllables 
allowed')
dLV, T = divmod(ord(c) - 0xAC00, 28)
if T!=0 : #it is a LVT syllable, decomposed into LV:=dLV*19 and T 
return f'{0xAC00+dLV*28:04X} {0x11A7+T:04X}'
else : #it is a LVT syllable, decomposed into L , V
L, V = divmod(dLV,21)
return f'{0x1100+L:04X} {0x1161+V:04X}'
# Constants used:
# ==
# 0xAC00 : first syllable == 1st LV syllable 
#NB: there is one LV syllable every 28 
codepoints
# 0xD7A3 : last Hangul syllable
# 0x1100 : first L jamo
# 0x1161 : first V jamo
# 0x11A7 : one before the 1st T jamo (0x1148), since T=0 means no trailing
#
# (all number below restricted for modern jamos where this algorithm is 
relevant)
# 19 : Number of L jamos (not used here)
# 21 : Number of V jamos
# 28 : Number of T jamos plus one (since no T jamo for LV syllable)

--
components: Unicode
messages: 391715
nosy: ezio.melotti, frederic.grosshans, vstinner
priority: normal
severity: normal
status: open
title: Add hangul syllables to unicodedata.decomposititon
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



[issue38659] enum classes cause slow startup time

2021-04-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks a lot Ethan. I will wait then for the investigation.

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset e047239eafefe8b19725efffe7756443495cf78b by Christian Heimes in 
branch 'master':
bpo-43921: ignore failing test_wrong_cert_tls13 on Windows (GH-25561)
https://github.com/python/cpython/commit/e047239eafefe8b19725efffe7756443495cf78b


--

___
Python tracker 

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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread Julien Castiaux


Change by Julien Castiaux :


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

___
Python tracker 

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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread Julien Castiaux


Julien Castiaux  added the comment:

Hello David, thank you for your quick answer. I tried to keep it minimal with 
some unittests. Could you point me some resources to learn how to properly 
write a custom content manager ?

--

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset 52e9031fbd23c10668badc2a72ee5c203d6902c7 by Miss Islington (bot) 
in branch '3.9':
bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of 
sys.getwindowsversion() (GH-25500)
https://github.com/python/cpython/commit/52e9031fbd23c10668badc2a72ee5c203d6902c7


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-23 Thread Erlend Egeberg Aasland

Erlend Egeberg Aasland  added the comment:

Guido, I’ll prepare a separate PR for all converted built-in types, and you can 
decide what to do with it when consensus is reached :) There are approx. ~90 of 
these types. Not all of them are added to their respective module dicts though, 
but I would add the flag nonetheless, as it simplifies creating and reviewing 
the patch, and it does not have any performance impact.

--

___
Python tracker 

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



[issue43924] print unexpected values in infinite loop

2021-04-23 Thread Zachary Ware


New submission from Zachary Ware :

Without a description, it is impossible to tell what you're trying to report.  
You'll need to provide some details, such as what you're trying to do, what you 
expected to happen, what actually happened, and how you ran the code to get 
that result.

As is, I don't see anything wrong here.

--
nosy: +zach.ware
type:  -> behavior

___
Python tracker 

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



[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-04-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset e92d1106291e5a7d4970372478f2882056b7eb3a by Miss Islington (bot) 
in branch '3.8':
bpo-43607: Fix urllib handling of Windows paths with \\?\ prefix (GH-25539)
https://github.com/python/cpython/commit/e92d1106291e5a7d4970372478f2882056b7eb3a


--

___
Python tracker 

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



[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-04-23 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I've posted an entry on python-dev to collect comments about how we should act 
(whether just act them as strings on the symbol table or just forbid them 
completely): 
https://mail.python.org/archives/list/python-...@python.org/thread/5NQH5GURAYW6XINPBO6VSF45CWLQOHUQ/

Since we are almost days away from the cut, I will probably just submit a 
proper patch this weekend where we can debate more through reviews but first I 
need to know what kind of action we intend to take. (this all assumes PR 23952 
is goes in).

--

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I don't think this is necessarily specific to my local build

Replace "local" with "specific to a particular combination of C compiler and 
operating system".  On my Mac, the effect mostly doesn't occur as all, 0.05% 
before the run and 0.10% after the run.   This shows that Python source isn't 
at fault.

Also, since the same effect arises with a list of lists, we know that this 
isn't deque specific.

It isn't even Python specific.  For your OS and C compiler, it would happen to 
any C program that made the same pattern of calls to malloc() and free().  
Memory allocators vary greatly in quality and in their response to particular 
load patterns.  Fragmentation is a perpetual nuisance.


>  the alternative deque implementations don't seem 
> to suffer from the same issue

This is unsurprising.  Different patterns of memory access produce different 
random fragmentation artifacts.


> I will continue and try to adapt alternate deque 
> implementations and see if it solves Queues leaking 

For your own project, consider:

1) Use a PriorityQueue adding elements with a counter or timestamp:
  
  mem.put((time(), msg))
  ...
  _, msg = mem.get()

2) Build against a different memory allocator such dlmalloc.

3)  Subclass Queue with some alternate structure that doesn't tickle the 
fragmentation issues on your O/S.  Here's one to start with:

class MyQueue(Queue):
def _init(self, maxsize=0):
assert not maxsize
self.start = self.end = 0
self.q = {}
def _qsize(self):
return self.end - self.start
def _put(self, x):
self.q[self.end] = x
self.end += 1
def _get(self):
x = self.q.pop(self.start)
self.start += 1
return x


> and hanging my instances.

I suspect that hanging is completely unrelated.  The fragments we've studied 
don't hang.  They just have the undesirable property that the process holds 
more memory blocks than expected.  Those blocks are still available to Python 
for reuse.  They just aren't available to other processes.

Side note:  While Python supports large queues, for most applications if the 
queue depth gets to 20 million, it is indicative of some other design flaw.


> Thanks for your time and involvement in this.

You're welcome.  I wish the best for you.

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-04-23 Thread Christian Heimes


Christian Heimes  added the comment:

Another TLS 1.3 client cert auth test is flaky, too.

https://buildbot.python.org/all/#/builders/577/builds/14/steps/4/logs/stdio

==
FAIL: test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth)
--
Traceback (most recent call last):
  File "D:\buildarea\pull_request.bolen-windows10\build\lib\test\test_ssl.py", 
line 4412, in test_pha_required_nocert
s.recv(1024)
AssertionError: SSLError not raised

--

___
Python tracker 

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



[issue43922] Double dots in quopri transported emails

2021-04-23 Thread R. David Murray


R. David Murray  added the comment:

As far as I know the only resources are the context manager docs and the source 
code.  The stdlib content manager can serve as a model.  I have to admit that 
it was long enough ago that I wrote that code that I'd have to re-read the docs 
and code myself to figure it out :)

I'm afraid I don't really have time to do a complete review, but at a quick 
glance your patch doesn't look too complicated to me.  Quick observation:  the 
comment should explain why the dot check is done, and that it isn't needed for 
rfc compliance.

--

___
Python tracker 

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



  1   2   >