[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 871eb4237b9be95263ca13ba8856e78344eb9eba by Erlend Egeberg 
Aasland in branch 'master':
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)
https://github.com/python/cpython/commit/871eb4237b9be95263ca13ba8856e78344eb9eba


--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer

Am 16.02.21 um 06:36 schrieb dn:

Pascal's value as a teaching language was that it embodied many aspects
of structured programming, and like Python, consisted of a limited range
of items which could be learned very quickly (in contrast to PL/I's many
'bells and whistles'). 


ROFL. Maybe that was true for Python when it was first invented. Today 
it is not "a few simple things". Even just the core language, anything 
that's built into the interpreter if you leave out any standard 
function, is enormous. To name a few: List comprehension, format 
strings, iterator protocol, asynchronous programming, everything called 
__dunderland. A minimal language with only very few basic rules, that 
would be Scheme e.g. Of course, it doesn't mean that Scheme is easier to 
program, but it is easier to write a compiler for it than for Python.


That is a misundestanding often presented - a language that is simple in 
the sense of having a few simple rules, is usually hard to use. (e.g. 
Brainfuck). A language which is easy to use, often comes with a large 
variety of building blocks, to give you the right tool to choose for the 
job at hands (e.g. Python), and therefore is "complex".


Christian

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


[issue43228] Regression in function builtins

2021-02-15 Thread Lumír Balhar

Lumír Balhar  added the comment:

I'm not an expert nor an author but this might help:

Cloudpickle offers extended possibilities for pickling but uses the standard 
pickle module for unpickling:

>>> import pickle, cloudpickle
>>> cloudpickle.load is pickle.load
True
>>> cloudpickle.loads is pickle.loads
True

So, the question here is why the new Python version cannot handle cloudpickle 
output anymore.

>>> def f():
... return len("")
... 


>>> pickle.dumps(f)
b'\x80\x04\x95\x12\x00\x00\x00\x00\x00\x00\x00\x8c\x08__main__\x94\x8c\x01f\x94\x93\x94.'

>>> cloudpickle.dumps(f)
b'\x80\x05\x95\xa9\x01\x00\x00\x00\x00\x00\x00\x8c\x17cloudpickle.cloudpickle\x94\x8c\r_builtin_type\x94\x93\x94\x8c\nLambdaType\x94\x85\x94R\x94(h\x02\x8c\x08CodeType\x94\x85\x94R\x94(K\x00K\x00K\x00K\x00K\x02KCC\x08t\x00d\x01\x83\x01S\x00\x94N\x8c\x04\x94\x86\x94\x8c\x03len\x94\x85\x94)\x8c\x07\x94\x8c\x01f\x94K\x01C\x02\x00\x01\x94))t\x94R\x94}\x94(\x8c\x0b__package__\x94N\x8c\x08__name__\x94\x8c\x08__main__\x94uNNNt\x94R\x94\x8c\x1ccloudpickle.cloudpickle_fast\x94\x8c\x12_function_setstate\x94\x93\x94h\x18}\x94}\x94(h\x15h\x0f\x8c\x0c__qualname__\x94h\x0f\x8c\x0f__annotations__\x94}\x94\x8c\x0e__kwdefaults__\x94N\x8c\x0c__defaults__\x94N\x8c\n__module__\x94h\x16\x8c\x07__doc__\x94N\x8c\x0b__closure__\x94N\x8c\x17_cloudpickle_submodules\x94]\x94\x8c\x0b__globals__\x94}\x94u\x86\x94\x86R0.'

It seems to me that cloudpickle adds also __globals__ to the final output and 
pickle is no longer able to restore it.

--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Christian Gollwitzer

Am 15.02.21 um 21:37 schrieb Roel Schroeven:


So your claim is that your compiler is able to, or will be able to, 
compile any language just by specifying a small schema file. Great!


Do you maybe have a proof-of-concept? A simple language with a simple 
schema file to test the basic workings of your compiler, 


Here is the git repo:

https://github.com/i42output/neos

under languages/ you'll find different schema files.

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


[issue43238] python picking garbage values randomly incase running palindrome function

2021-02-15 Thread Raghav Bhandari


New submission from Raghav Bhandari :

temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python3 and 
revtemp value is   3nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39 and 
revtemp value is   93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/ and 
revtemp value is   /93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/p and 
revtemp value is   p/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/py and 
revtemp value is   yp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyt and 
revtemp value is   typ/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & 
   
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyth and 
revtemp value is   htyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C 
&  
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pytho 
and revtemp value is   
ohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python 
and revtemp value is   
nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &  
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python. 
and revtemp value is   
.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C  value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.e and revtemp 
value is   e.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.ex and revtemp 
value is   xe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp 
value is   exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe  and revtemp 
value isexe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c and revtemp 
value is   c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c: and 
revtemp value is   :c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/ and 
revtemp value is   /:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/U and 
revtemp value is   U/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Us and 
revtemp value is   sU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Use and 
revtemp value is   esU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/User and 
revtemp value is   resU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users and 
revtemp value is   sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/ and 
revtemp value is   /sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/R 
and revtemp value is   R/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ra 
and revtemp value is   aR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Rag 
and revtemp value is   gaR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragh 
and revtemp value is   hgaR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe 
c:/Users/Ragha and revtemp value is   ahgaR/sresU/:c 

Re: New Python implementation

2021-02-15 Thread Dan Stromberg
On Mon, Feb 15, 2021 at 9:37 PM dn via Python-list 
wrote:

> On 16/02/2021 17.57, Dan Stromberg wrote:
> > On Mon, Feb 15, 2021 at 8:52 PM Igor Korot  wrote:
> >
> >> Hi, guys,
> >> Let me try to throw in another one - PL/1.
> >> This guys used to be very popular with the accounting community...
> >>
> >
> > Actually PL/I is basically proprietary Pascal - from IBM.  My Intro Comp
> > Sci classes at the University of Cincinnati were in PL/I, because IBM had
> > an office not far from the University, and they liked to hire interns
> from
> > UCinci.  I was told that otherwise the classes would've been in Pascal.
>
>
> Might a coincidence of location have been conflated with language
> development?
>
Nah.  All 3 are in the Algol family: Algol, Pascal, PL/I.

I'll grant you that PL/I is a "big language" though.  It didn't rely on
external libraries as much as it should have.
-- 
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.7.10 and 3.6.13 security updates now available

2021-02-15 Thread Ned Deily
Python 3.7.10 and 3.6.13, the lastest security fix rollups for Python 3.7 and 
Python 3.6, are now available. You can find the release files, links to the 
changelogs, and more information here:

https://www.python.org/downloads/release/python-3710/
https://www.python.org/downloads/release/python-3613/

These releases are source code only; Windows and macOS binary installers are 
not provided for security fix releases.

Note that Python 3.9 is now the latest feature release series of Python 3. You 
should consider upgrading to 3.9 as soon as practical. Get the latest release 
of 3.9.x here:

https://www.python.org/downloads/

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

https://www.python.org/psf-landing/

--
  Ned Deily
  n...@python.org -- []

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


Re: New Python implementation

2021-02-15 Thread dn via Python-list



On 16/02/2021 17.57, Dan Stromberg wrote:
> On Mon, Feb 15, 2021 at 8:52 PM Igor Korot  wrote:
> 
>> Hi, guys,
>> Let me try to throw in another one - PL/1.
>> This guys used to be very popular with the accounting community...
>>
> 
> Actually PL/I is basically proprietary Pascal - from IBM.  My Intro Comp
> Sci classes at the University of Cincinnati were in PL/I, because IBM had
> an office not far from the University, and they liked to hire interns from
> UCinci.  I was told that otherwise the classes would've been in Pascal.


Might a coincidence of location have been conflated with language
development?


PL/I (note the Roman "one") was developed out of the IBM System/360
effort, ie one computer architecture for all types of users (cf
different computers for 'commercial' and 'scientific' clients - which
you can see again today in AWS' range of compute options, for example).
It was to be 'one language to rule them all'.

Initially, it was based on FORTRAN. We joked that it took all of the bad
parts of FORTRAN and COBOL and mashed them into a single ... language.
However, like many such efforts, it attempted to take 'the best' from
many sources (including ALGOL).

Sadly, (maybe) it, like Ada (another attempt to be 'all things to all
men') only ever really existed in a niche market.


Pascal, named after the mathematician and philosopher the French credit
with 'inventing the computer', was developed in the European world -
which even back-then had marked differences in thinking to the American
approach/domination of computing.

Prof Niklaus Wirth published a seminal book "Algorithms + Data
Structures = Programs" (which I seem to have lost, somewhere in the
mists of time). I don't think it gave examples in Pascal, but it did use
a pseudo-code/-language which illuminated various ideas and ways of
developing programmatic solutions. As I recall, it (and Pascal) was very
ALGOL like, and thus heavily influenced by "stack architecture" (cf
IBM's collections of "registers" in an ALU). Certainly the language was
clearly based upon ALGOL-60. Clearly it led to the refinement and/or
development of Pascal.

Pascal's value as a teaching language was that it embodied many aspects
of structured programming, and like Python, consisted of a limited range
of items which could be learned very quickly (in contrast to PL/I's many
'bells and whistles'). Thus, once absorbed, learning attention could be
directed to ComSc/algorithms + data!

Pascal was also very efficient, to compile and to execute, which made it
a competent fore-runner of Micro-Python (etc) in the micro and
single-board computer arenae/arenas.

Without Python, I think I'd prefer to use (an updated) UCSD-Pascal or
Borland Turbo-Pascal to this very day! PL/I, not so much - even on a
mainframe project!
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman


Michael Wayne Goodman  added the comment:

Sorry, typo in my last statement. I did *not* verify if the behavior is the 
same with earlier/later versions.

--

___
Python tracker 

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



[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman


Michael Wayne Goodman  added the comment:

Sorry to resurrect an old bug, but I've also found the docs lacking and I can 
fill in some gaps with some experimental results. Setup:

>>> import sqlite3
>>> conn = sqlite3.connect(':memory:')
>>> conn.execute('CREATE TABLE foo (x INTEGER, y INTEGER, z INTEGER)')


When the parameters is a sequence, the named placeholders can be repeated. 
There should be as many parameters as unique placeholders:

>>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4)]

Using numeric named placeholders is misleading, because they don't correspond 
to the indices in the parameters sequence. The following inserts (6, 7, 6), not 
(7, 6, 7):

>>> conn.execute('INSERT INTO foo VALUES (:2, :1, :2)', (6, 7))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6)]

So it is probably better to stick to non-numeric names:

>>> conn.execute('INSERT INTO foo VALUES (:a, :a, :a)', (8,))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8)]

When the number of parameters is not the same as the number of unique 
placeholders, an sqlite3.ProgrammingError is raised:

>>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5, 6))
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The 
current statement uses 2, and there are 3 supplied.

Question mark placeholders may be mixed with named placeholders. Each question 
mark uses the next "unclaimed" parameter, which then cannot be reused.

>>> conn.execute('INSERT INTO foo VALUES (:a, ?, :a)', (1, 2))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1)]

As mentioned by R. David Murray and Terry J. Reedy above, when the parameters 
are given as a dict, extra items are ignored and no error is raised:

>>> conn.execute('INSERT INTO foo VALUES (:a, :b, :a)', {'a': 3, 'b': 4, 
'c': 5})

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1), (3, 4, 3)]

Disclaimer: I tested the above statements on Python 3.8.5. I did verify if the 
behavior is the same with earlier/later versions, and I don't know if this is 
intentional behavior or some undiscovered bug.

--
nosy: +goodmami

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Dan Stromberg
On Mon, Feb 15, 2021 at 8:52 PM Igor Korot  wrote:

> Hi, guys,
> Let me try to throw in another one - PL/1.
> This guys used to be very popular with the accounting community...
>

Actually PL/I is basically proprietary Pascal - from IBM.  My Intro Comp
Sci classes at the University of Cincinnati were in PL/I, because IBM had
an office not far from the University, and they liked to hire interns from
UCinci.  I was told that otherwise the classes would've been in Pascal.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-15 Thread suresh


suresh  added the comment:

Dear Team,

  Any more details are required. Kindly let me know.

--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Igor Korot
Hi, guys,
Let me try to throw in another one - PL/1.
This guys used to be very popular with the accounting community...

Thank you.

On Mon, Feb 15, 2021 at 9:51 PM Alan Gauld via Python-list
 wrote:
>
> On 15/02/2021 22:24, Roel Schroeven wrote:
> > Grant Edwards schreef op 15/02/2021 om 21:59:
> >> On 2021-02-15, Roel Schroeven  wrote:
> >>
> >>> Is it your intention to not only compile procedural and object-oriented
> >>> languages, or also functional languages such as Haskell, Ocaml, Scheme?
> >>
> >> And Prolog!
> >
> > Ha, yes, that one was the next one I thought about, but in the I decided
> > to leave it out.
>
> Yes, Prolog is definitely different. When I was at Uni' in the mid 80s
> we all got taught Prolog because the Japanese had promised to produce
> a 5th generation computer by 1990 and it would be based on Prolog.
> We're still waiting, but in the meantime we got the internet and GUIs.
>
> Looks like Sun got it right - "the network is the computer"...
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43237] datetime.__eq__ returns true when timezones don't match

2021-02-15 Thread Richard Wise


New submission from Richard Wise :

from datetime import datetime, timezone, timedelta

datetime_in_sgt = datetime(2021, 2, 16, 8, 0, 0, 
tzinfo=timezone(timedelta(hours=8)))
datetime_in_utc = datetime(2021, 2, 16, 0, 0, 0, tzinfo=timezone.utc)

print(datetime_in_sgt == datetime_in_utc)

Expected: False
Actual: True

Although these two datetimes represent the same instant on the timeline, they 
are not identical because they use different timezones. This means that when 
unit testing timezone handling, tests will incorrectly pass despite data being 
returned in UTC instead of the requested timezone, so we need to write code 
such as this:

# Timestamp comparison
self.assertEqual(datetime_in_sgt, datetime_in_utc)
# Timezone comparison
self.assertEqual(datetime_in_sgt.tzinfo, datetime_in_utc.tzinfo)

This is confusing and non-intuitive.

For examples of how other languages handle such comparison, can refer to: 
https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html#equals-java.lang.Object-
 and 
https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#equals-java.lang.Object-

--
components: Library (Lib)
messages: 387087
nosy: Woodz
priority: normal
severity: normal
status: open
title: datetime.__eq__ returns true when timezones don't match
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



[issue43236] Windows IDLE taskbar icon jump list fails to open recent files

2021-02-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will just note that the IDLE File menu has a Recent Files list, which is the 
same thing.  (Notepad++ does also, in addition to a working icon jump list.)

--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Alan Gauld via Python-list
On 15/02/2021 22:24, Roel Schroeven wrote:
> Grant Edwards schreef op 15/02/2021 om 21:59:
>> On 2021-02-15, Roel Schroeven  wrote:
>>
>>> Is it your intention to not only compile procedural and object-oriented
>>> languages, or also functional languages such as Haskell, Ocaml, Scheme?
>>
>> And Prolog!
> 
> Ha, yes, that one was the next one I thought about, but in the I decided 
> to leave it out.

Yes, Prolog is definitely different. When I was at Uni' in the mid 80s
we all got taught Prolog because the Japanese had promised to produce
a 5th generation computer by 1990 and it would be based on Prolog.
We're still waiting, but in the meantime we got the internet and GUIs.

Looks like Sun got it right - "the network is the computer"...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


[issue43236] Windows IDLE taskbar icon jump list fails to open recent files

2021-02-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a Windows installer code issue rather than an IDLE code issue.  On 
Win10, I do not see jump lists for IDLE icons but do for several others.  
Perhaps the installer was changed to disable the non-functional lists.  I will 
let the installer people comment further.

--
assignee: terry.reedy -> 
components: +Installation, Windows -IDLE
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Windows Taskbar Jump List fails to open Recent files -> Windows IDLE 
taskbar icon jump list fails to open recent files

___
Python tracker 

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



[issue43230] typo in Simplified/Traditional Chinese documentation for library argparse

2021-02-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The translation is maintained under GitHub. Please report to 
https://github.com/python/python-docs-zh-cn/issues

--
nosy: +xtreak
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43236] Windows Taskbar Jump List fails to open Recent files

2021-02-15 Thread veganaiZe


New submission from veganaiZe :

OS: Windows 8.1 (x86-64)
Python: 3.8.7

When I right-click on IDLE's rectangle/icon in the Windows taskbar it displays 
a "jump list" which contains recent/pinned filenames.

A program will typically open a file when it's selected from the list.

IDLE doesn't open the file, nor does it switch to the corresponding editor 
window if the file is already open.  It seems to ignore the selection entirely.

If IDLE is going to display a "Recent" list, within the jump list, then it 
would be nice if it actually opened the file(s).

--
assignee: terry.reedy
components: IDLE
files: jumplist.png
messages: 387082
nosy: terry.reedy, veganaiZe
priority: normal
severity: normal
status: open
title: Windows Taskbar Jump List fails to open Recent files
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49812/jumplist.png

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Dan Stromberg
On Mon, Feb 15, 2021 at 3:25 PM Grant Edwards 
wrote:

> On 2021-02-15, Avi Gross via Python-list  wrote:
> Of all the languages I've used, Prolog was by far the hardest to get
> my head around. The dialect I used the most (which still wasn't much)
> was part of Digitalk's Smalltalk system. I don't recall if Digitalk
> Prolog was written entirely in Smalltalk, or if it was just integrated
> into the Smalltalk system as an opaque object.
>
I actually found Prolog to be a lot like /usr/bin/make.

It's an OK language if everything you need to do can be solved well using a
depth first search. Otherwise, it kind of gets in the way.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue35026] Winreg's documentation lacks mentioning required permission at some points

2021-02-15 Thread Eryk Sun


Eryk Sun  added the comment:

winreg.DeleteKey[Ex] does not require any particular access on the `key` 
handle. This handle is used only as the native NT API RootDirectory [1] when 
opening `subkey` with DELETE access via NtOpenKeyEx [2].

The extra access with winreg.DeleteKeyEx [3] is just to allow explicitly using 
the 32-bit or 64-bit registry view (i.e. KEY_WOW64_32KEY or KEY_WOW64_64KEY) 
when traversing the registry. I think this should be clarified in the docs. For 
example, if you have the predefined handle HKEY_LOCAL_MACHINE as the `key` 
handle, then deleting r"Software\Spam" will default to traversing the process 
32- or 64-bit view of the "Software" key, but you can override the default 
view. (Note that if you start from a handle for the "Software" key, then 
setting an explicit view in the access mode doesn't matter since "Software" 
isn't traversed to reach "Spam" in this case.) 

winreg.DeleteKeyEx uses KEY_WOW64_64KEY as the default `access` mode. I think 
this is a mistake. It should default to 0, and thus implicitly traverse the 
process view from the path of the `key` handle. A 32-bit process should not 
default to traversing the 64-bit registry view.

---
[1] 
https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes
[2] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwopenkeyex
[3] 
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regdeletekeyexw

--
nosy: +eryksun

___
Python tracker 

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



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread Petr Viktorin


Petr Viktorin  added the comment:

I want to address this in PEP 652.

--

___
Python tracker 

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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Any C extension class that implements a new_whatever() method that leaves the 
> class tracked and not ready.

I'm not aware of such C extension but they likely exists. If we have such 
extensions in the stdlib, we can try to fix them.

We cannot fix such GC bugs in third party code, and I don't think that we can 
hack the GC to work around this issue neither.

--

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Dustin for the bug report *and* the fix! I close the issue.

For people who want to support bracketed paste mode in Python, please disuss it 
in bpo-39820.

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4 by Miss Islington (bot) 
in branch '3.9':
bpo-42819, readline: Disable bracketed paste (GH-24108) (GH-24545)
https://github.com/python/cpython/commit/85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4


--

___
Python tracker 

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



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +steve.dower

___
Python tracker 

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



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal, petr.viktorin

___
Python tracker 

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



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

The symbol was exported on Unix since Python 3.9.0, but not on Windows. Is it 
ok to export it starting with Python 3.9.2? (backport the fix). IMO yes, it's 
ok.

--

___
Python tracker 

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



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a by Zackery Spytz in 
branch 'master':
bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500)
https://github.com/python/cpython/commit/8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a


--

___
Python tracker 

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



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Is there a test suite that checks that the limited API functions can all be 
> linked against?

Pablo Galindo wrote a new Tools/scripts/stable_abi.py for Unix, but this tool 
doesn't check PC/python3dll.c yet. The tool uses Doc/data/stable_abi.dat which 
*does* include PyCMethod_New symbol.

I created bpo-43235 "Tools/scripts/stable_abi.py should also check 
PC/python3dll.c (Windows stable ABI)".

--
nosy: +vstinner

___
Python tracker 

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



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


New submission from STINNER Victor :

bpo-43155 is just yet another example that we always forget to export symbols 
of the stable ABI on Windows.

It would be great to have a tool to check that all symbols exported on Unix are 
also exported on Windows.

Tools/scripts/stable_abi.py could check PC/python3dll.c (Windows stable ABI). 
For example, currently "PyCMethod_New" symbol is in Doc/data/stable_abi.dat but 
miss in PC/python3dll.c.

--
components: C API
messages: 387073
nosy: vstinner
priority: normal
severity: normal
status: open
title: Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows 
stable ABI)
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



Re: Mr. Flibble

2021-02-15 Thread Ben Bacarisse
Ethan Furman  writes:

> On 2/15/21 2:02 PM, Grant Edwards wrote:
>> On 2021-02-15, Ben Bacarisse  wrote:
>>
>>> You said you used Usenet (and your reply here was via Usenet).
>>> Usenet posts to comp.lang.python don't go to the mailing list (the
>>> "here" that Ethan is talking about).  Mails to the list /are/ sent
>>> here, but it's one-way traffic.
>>
>> That's new -- it always used to be two-way. When did it change?
>
> It is two-way still (or we wouldn't have seen his posts to begin
> with).

Ah, my mistake.  Sorry for the confusion.

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


[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e by Miss Islington (bot) 
in branch '3.8':
bpo-42819, readline: Disable bracketed paste (GH-24108)
https://github.com/python/cpython/commit/f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e


--

___
Python tracker 

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



[issue35026] Winreg's documentation lacks mentioning required permission at some points

2021-02-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 7.0 -> 8.0
pull_requests: +23330
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24547

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23329
pull_request: https://github.com/python/cpython/pull/24546

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +23328
pull_request: https://github.com/python/cpython/pull/24545

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 755f3c1521b422bc2177013d289f5439975fdc4f by Dustin Rodrigues in 
branch 'master':
bpo-42819, readline: Disable bracketed paste (GH-24108)
https://github.com/python/cpython/commit/755f3c1521b422bc2177013d289f5439975fdc4f


--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Grant Edwards
On 2021-02-15, Avi Gross via Python-list  wrote:

> Haven't thought about Prolog in a LOOONG time but it had some wild
> twists on how to specify a problem that might not be trivial to
> integrate with other languages as our now seemingly censored person
> with much delusion of grandeur suggests. It is a language that does
> not specify what to do but more what rules an answer must abide by.

Of all the languages I've used, Prolog was by far the hardest to get
my head around. The dialect I used the most (which still wasn't much)
was part of Digitalk's Smalltalk system. I don't recall if Digitalk
Prolog was written entirely in Smalltalk, or if it was just integrated
into the Smalltalk system as an opaque object.

--
Grant

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


[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



Re: Mr. Flibble

2021-02-15 Thread dn via Python-list
On 16/02/2021 07.09, Ethan Furman wrote:
> Thank you to those who pointed out this individual to the moderators. As
> Mr. Flibble accurately noted, he is not on the mailing list -- so his
> posts won't be here either.

Appreciating the work you(s) invest on my/our behalf!
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> PyList_New() is also affected. Do you think about other types?

Any C extension class that implements a new_whatever() method that leaves the 
class tracked and not ready.

--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Roel Schroeven

Grant Edwards schreef op 15/02/2021 om 21:59:

On 2021-02-15, Roel Schroeven  wrote:


Is it your intention to not only compile procedural and object-oriented
languages, or also functional languages such as Haskell, Ocaml, Scheme?


And Prolog!


Ha, yes, that one was the next one I thought about, but in the I decided 
to leave it out.


--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

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


Re: New Python implementation

2021-02-15 Thread Buck Evan
On Thu, Feb 11, 2021 at 1:49 PM dn via Python-list 
wrote:

> When I first met it, one of the concepts I found difficult to 'wrap my
> head around' was the idea that "open software" allowed folk to fork the
> original work and 'do their own thing'. My thinking was (probably)
> "surely, the original is the authoritative version". Having other
> versions seemed an invitation to confusion and dilution.
>
> However, as soon as (open) software is made available, other people
> start making it 'better' - whatever their own definition of "better".
>
> Yes, it is both a joy and a complication.
>
> ...
>
> Wishing you well. It seems (to (neos-ignorant) me at least) an ambitious
> project. There are certainly times when 'execution speed' becomes a
> major criteria. Many of us will look forward to (your development of) a
> solution. Please let us know when it's ready for use/trials...
>

Well put! Thank you for this thoughtful and informative message. You
obviously put substantial work into it.
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: New Python implementation

2021-02-15 Thread Avi Gross via Python-list
Grant,

Haven't thought about Prolog in a LOOONG time but it had some wild twists on
how to specify a problem that might not be trivial to integrate with other
languages as our now seemingly censored person with much delusion of
grandeur suggests. It is a language that does not specify what to do but
more what rules an answer must abide by. 

Perhaps he should go to work for the Star Trek Federation and improving
their Universal Translator that can learn any alien language in about two
sentences. I am sure he will tell us it would be trivial for him or her
along with other Fibbles he/she tells.

Am I the only one who found it amusing, back to Python, that a recent attack
on Python was about a fairly trivial problem to solve in most languages, let
alone Python. Toy language does not normally apply to a fairly mature
language, regularly extended to do many things in many ways, unless anything
not fully standardized is a toy. I consider many such to become toys as they
end up near the end of their lives and hard to extend further. 

I think the question was as simple as how to find the first period in a
string (assuming it exists?) and replace it with an @ and not subsequent
ones. Not very challenging even using very basic commands in a computer
language. Computing 101?

Can you name any language where that is hard to do from scratch? Sure, many
will provide a ready-made function that does it in one line of code (or a
partial line) but most languages let you use something like a loop that lets
you look at one letter of a "string" variable at a time and perhaps copy it
to a new one. A logical variable can be set so you conditionally replace
just the first instance. Whether changed in place or in a copy, it seems
trivial.

So why snide comments that you need more than a toy language when this is
precisely what is doable even in a toy language, but so commonly done that
many better languages (and Python definitely is included) give you an
assortment of built-in functionality to make it easy, and then dozens of
other ways in modules you can load ...

Now there are fairly complex things that a user cannot easily build from
scratch or find a ready-made solution. There may well be say a PROLOG
program that is simple and elegant and very hard to solve using Python, let
alone a toy language.

To me, all languages are toys, albeit for different age/experience groups.

-Original Message-
From: Python-list  On
Behalf Of Grant Edwards
Sent: Monday, February 15, 2021 4:00 PM
To: python-list@python.org
Subject: Re: New Python implementation

On 2021-02-15, Roel Schroeven  wrote:

> Is it your intention to not only compile procedural and 
> object-oriented languages, or also functional languages such as Haskell,
Ocaml, Scheme?

And Prolog!

--
Grant



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

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


[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

I created 
https://python-security.readthedocs.io/vuln/urllib-query-string-semicolon-separator.html
 to track fixes of this vulnerability.

--

___
Python tracker 

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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> That's a lot slower unfortunately

Ah sorry, I forgot PyTuple_Pack(3, item1, item2, item3) which should be very 
efficient. This function is also safe: only track the tuple when it is fully 
initialized.

> This problem also is not unique to tuples, although is mainly prominent in 
> them.

PyList_New() is also affected. Do you think about other types?

PyDict_New() and PySet_New() create empty containers and so are ok.

--

___
Python tracker 

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



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seems a problem in FreeBSD 14.0 CURRENT. Koobs, could you report this 
upstream?

--

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Igor Korot
And C.

Thank you.


On Mon, Feb 15, 2021, 3:56 PM Grant Edwards 
wrote:

> On 2021-02-15, Roel Schroeven  wrote:
>
> > Is it your intention to not only compile procedural and object-oriented
> > languages, or also functional languages such as Haskell, Ocaml, Scheme?
>
> And Prolog!
>
> --
> Grant
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hu. The last time it succeeded was with platform.platform: 
FreeBSD-13.0-CURRENT-amd64-64bit-ELF:

https://buildbot.python.org/all/#/builders/151/builds/280

--

___
Python tracker 

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



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread STINNER Victor

STINNER Victor  added the comment:

> https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio

This is the CURRENT version of FreeBSD (latest kernel and latest libc). 
test.pythoninfo says:

os.uname: posix.uname_result(sysname='FreeBSD', nodename='140-CURRENT-amd64', 
release='14.0-CURRENT', version='FreeBSD 14.0-CURRENT #13 
main-n244626-cb7cc72c546: Fri Feb  5 02:20:29 UTC 2021 
root@130-CURRENT-amd64:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG', 
machine='amd64')

On FreeBSD 12.2 (stable), test_os pass because os.copy_file_range() is missing:

$ grep copy_file_range pyconfig.h -A1
/* Define to 1 if you have the `copy_file_range' function. */
/* #undef HAVE_COPY_FILE_RANGE */

$ ./python -m test test_os -v -m test_copy_file_range_offset
== CPython 3.9.1+ (heads/3.9:c9f07813ab, Feb 15 2021, 22:00:04) [Clang 10.0.1 
(g...@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a
== FreeBSD-12.2-RELEASE-p3-amd64-64bit-ELF little-endian
== cwd: /usr/home/vstinner/python/3.9/build/test_python_5324æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 11.77 Run tests sequentially
0:00:00 load avg: 11.77 [1/1] test_os
test_copy_file_range_offset (test.test_os.FileTests) ... skipped 'test needs 
os.copy_file_range()'

--

Ran 1 test in 0.002s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 674 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d0204963ec87beb9732e924e464b8a6a1ef4d341 by Pablo Galindo in 
branch 'master':
bpo-43231: Correctly calculate the curses color pair limit when checking for it 
(GH-24541)
https://github.com/python/cpython/commit/d0204963ec87beb9732e924e464b8a6a1ef4d341


--

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 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



Re: Mr. Flibble

2021-02-15 Thread Ethan Furman

On 2/15/21 2:02 PM, Grant Edwards wrote:

On 2021-02-15, Ben Bacarisse  wrote:


You said you used Usenet (and your reply here was via Usenet).
Usenet posts to comp.lang.python don't go to the mailing list (the
"here" that Ethan is talking about).  Mails to the list /are/ sent
here, but it's one-way traffic.


That's new -- it always used to be two-way. When did it change?


It is two-way still (or we wouldn't have seen his posts to begin with).

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


Re: Mr. Flibble

2021-02-15 Thread Grant Edwards
On 2021-02-15, Ben Bacarisse  wrote:

> You said you used Usenet (and your reply here was via Usenet).
> Usenet posts to comp.lang.python don't go to the mailing list (the
> "here" that Ethan is talking about).  Mails to the list /are/ sent
> here, but it's one-way traffic.

That's new -- it always used to be two-way. When did it change?

--
Grant



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


Re: New Python implementation

2021-02-15 Thread Grant Edwards
On 2021-02-15, Roel Schroeven  wrote:

> Is it your intention to not only compile procedural and object-oriented 
> languages, or also functional languages such as Haskell, Ocaml, Scheme?

And Prolog!

--
Grant



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


Re: Mr. Flibble

2021-02-15 Thread Ben Bacarisse
Mr Flibble  writes:

> On 15/02/2021 18:09, Ethan Furman wrote:
>> Thank you to those who pointed out this individual to the
>> moderators. As Mr. Flibble accurately noted, he is not on the mailing
>> list -- so his posts won't be here either.
>
> ORLY?

You said you used Usenet (and your reply here was via Usenet).  Usenet
posts to comp.lang.python don't go to the mailing list (the "here" that
Ethan is talking about).  Mails to the list /are/ sent here, but it's
one-way traffic.

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


[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +23327
pull_request: https://github.com/python/cpython/pull/24541

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ab2d48163901c9635401db0f6d784c45482d17ec by Pablo Galindo in 
branch 'master':
bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R 
(GH-24539)
https://github.com/python/cpython/commit/ab2d48163901c9635401db0f6d784c45482d17ec


--

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Instead of enabling it by default, why not just keep it but emulate the old 
> behavior by splitting and buffering the input lines?

PR 24108 change can and should be backported to 3.8 and 3.9 branches.

REPL enhancements can only land in the master branch and should be done in 
bpo-39820.

--

___
Python tracker 

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



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread Aaron Meurer


Aaron Meurer  added the comment:

Instead of enabling it by default, why not just keep it but emulate the old 
behavior by splitting and buffering the input lines? That way you still get 
some of the benefits of bracketed paste, i.e., faster pasting, but without the 
hard work of fixing the REPL to actually support native multiline editing + 
execing multiline statements (the broken "simple" design).

--
nosy: +asmeurer

___
Python tracker 

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



Re: New Python implementation

2021-02-15 Thread Roel Schroeven

Mr Flibble schreef op 15/02/2021 om 0:32:

On 14/02/2021 23:00, Christian Gollwitzer wrote:
I'm not saying that it is unfeasible or very difficult. I'm saying that it is a lot of work, and for a single 
developer who has this as a side project / support for his graphics engine and who wants to beat existing 
implementations wrt. speed, I'm saying it is going to take a lot of time. It'definitely impossible by 
"defining a few JSON schema files", as Leigh claims with his "universal compiler". There 
definitely IS a lot of stuff in a baseline CPython interpreter - a (seemingly) simple thing like 
"print" will have an implementation of 1000 lines in C with all the formatting library, file I/O 
etc. Arbitrary precision integers - another library, networking - yet another and so on.

There will only be one schema file and it is will be a relatively small task which 
certainly isn't "impossible": I should have a working implementation by the 
summer.


So your claim is that your compiler is able to, or will be able to, 
compile any language just by specifying a small schema file. Great!


Do you maybe have a proof-of-concept? A simple language with a simple 
schema file to test the basic workings of your compiler, like your 
neoscript or perhaps something like a minimal variant of Python? I'm 
curious what such a schema file would like look, and especially how you 
use it to not only specify the syntax but also the semantics of the 
various languages.


Is it your intention to not only compile procedural and object-oriented 
languages, or also functional languages such as Haskell, Ocaml, Scheme?


--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

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


[issue43108] test_curses is leaking references

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

The funny part is that the bug was there for 4 years. It's good that Serhiy 
added new tests to allow to catch this old bug!

commit f7eae0adfcd4c50034281b2c69f461b43b68db84
Author: Serhiy Storchaka 
Date:   Wed Jun 28 08:30:06 2017 +0300

[security] bpo-13617: Reject embedded null characters in wchar* strings. 
(#2302)

Based on patch by Victor Stinner.

Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters.

It wasn't me! Ok, maybejust a little bit :-D

--
nosy: +vstinner

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Should we strive to fix the cases in Include/internal as well?

No. The internal C API access directly to structure members on purpose, for 
best performances.

--

___
Python tracker 

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



[issue21309] Confusing "see also" for generic C-level __init__ methods in help output

2021-02-15 Thread Larry Hastings


Change by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

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



[issue41028] Move docs.python.org language and version switcher out of cpython

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:

@mdk, This seems to be working great for the the python.org doc builds. What do 
you think about backporting this to the current active branches so that the doc 
builds for individual releases and those included with binary installers show 
the new generic links rather than the out-of-date old links?

--
nosy: +ned.deily

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left.
$ grep -r "\->tp_" Include/:

Include/internal/pycore_abstract.h:PyNumberMethods *tp_as_number = 
Py_TYPE(obj)->tp_as_number;
Include/internal/pycore_interp.h:unsigned int version;  // initialized from 
type->tp_version_tag
Include/internal/pycore_object.h:return ((type->tp_flags & feature) != 0);
Include/internal/pycore_object.h:Py_ssize_t offset = 
Py_TYPE(op)->tp_weaklistoffset;
Include/internal/pycore_object.h:&& (Py_TYPE(obj)->tp_is_gc == NULL
Include/internal/pycore_object.h:|| 
Py_TYPE(obj)->tp_is_gc(obj)));
Include/cpython/pyerrors.h:#define PyExceptionClass_Name(x)  
(((PyTypeObject*)(x))->tp_name)
Include/cpython/abstract.h:offset = tp->tp_vectorcall_offset;
Include/cpython/abstract.h:( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
Include/cpython/object.h:((PyMemberDef *)(((char *)etype) + 
Py_TYPE(etype)->tp_basicsize))
Include/cpython/objimpl.h:#define _PyObject_SIZE(typeobj) ( 
(typeobj)->tp_basicsize )
Include/cpython/objimpl.h:_Py_SIZE_ROUND_UP((typeobj)->tp_basicsize + \
Include/cpython/objimpl.h:(nitems)*(typeobj)->tp_itemsize,\
Include/cpython/objimpl.h:#define PyType_SUPPORTS_WEAKREFS(t) 
((t)->tp_weaklistoffset > 0)
Include/object.h:flags = type->tp_flags;

Should we strive to fix the cases in Include/internal as well?

--

___
Python tracker 

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



[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows

2021-02-15 Thread Steve Dower


Steve Dower  added the comment:

> since they're allowed, I think importlib at least could try to resolve 
> relative paths in a copy of sys.path before searching. 

I agree with this fix. They can be resolved for each new import, if we think 
that's an important behaviour to preserve (might mess with the cache... but 
probably necessary if it's to be backported). But at some point sys.path 
entries need to be made absolute, and it definitely needs to happen before we 
try to load any DLLs.

--

___
Python tracker 

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



[issue21309] Confusing "see also" for generic C-level __init__ methods in help output

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

Still the same in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> help(ImportError.__init__)
Help on wrapper_descriptor:

__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

--
nosy: +iritkatriel
versions: +Python 3.10 -Python 3.5

___
Python tracker 

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



[issue16608] immutable subclass constructor call error does not show subclass name

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

The issue still exists in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class c(tuple):
...  def __init__(s,a,b):
...tuple.__init__(s,a)
...self.b = b
...
>>> c(tuple(),666)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: tuple expected at most 1 argument, got 2
>>>

--
nosy: +iritkatriel
versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation

2021-02-15 Thread Illia Volochii


Change by Illia Volochii :


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

___
Python tracker 

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



[issue16718] Mysterious atexit fail

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

Since this was fixed since 3.3, is there a reason why this issue is still open?


I don't get the error anymore:

C:\Users\User\src\cpython-dev>python.bat wow.py
Running Release|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\User\src\cpython-dev\wow.py", line 12, in 
import fail
ModuleNotFoundError: No module named 'fail'

C:\Users\User\src\cpython-dev>python.bat wy.py
Running Release|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\User\src\cpython-dev\wy.py", line 1, in 
import wow
  File "C:\Users\User\src\cpython-dev\wow.py", line 12, in 
import fail
ModuleNotFoundError: No module named 'fail'

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation

2021-02-15 Thread Illia Volochii


New submission from Illia Volochii :

https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/base_events.py#L816-L821

Setting non-ThreadPoolExecutor executors was supposed to be prohibited in 
Python 3.9.

--
components: asyncio
messages: 387052
nosy: asvetlov, illia-v, yselivanov
priority: normal
severity: normal
status: open
title: Prohibit passing non-ThreadPoolExecutor executors to 
loop.set_default_executor following a deprecation
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



[issue19073] Inability to specific __qualname__ as a property on a class instance.

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue19984] Add new format of fixed length string for PyErr_Format

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.5

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

>From the curses docs:

   init_pair
   The init_pair routine changes the definition of a color-pair.  It
   takes three arguments: the number of the color-pair to be
   changed, the foreground color number, and the background color
   number.  For portable applications:

   •   The first argument must be a legal color pair value.  If
   default colors are used (see use_default_colors(3X)) the
   upper limit is adjusted to allow for extra pairs which use a
   default color in foreground and/or background.

--

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hu, commenting out test_use_default_colors fixes the issue, so something is 
going on there

--

___
Python tracker 

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



[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This is resolved in all version of Python now. 
Thank you all for your contributions!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a 
query args separator -> [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache 
poisoning - `; ` as a query args separator

___
Python tracker 

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



Re: Is email.message.get() case insensitive for the header name?

2021-02-15 Thread dn via Python-list
On 15/02/2021 09.50, Chris Green wrote:
> It isn't clear from the documentation. Does email.message.get() care
> about the case of the header it's getting?
> 
> I checking mailing list mails and the "List-Id:" header is a bit
> 'mixed', i.e. it can be List-Id:, or List-ID: or list-id:, will
> email.message.get("List-Id:", "unknown") find all of them?


Case is (should be) irrelevant (as it is for most (parts of) Internet
Protocols).

Rather than the "Zen of Python", when it comes to IPs, "Postel's Law"
applies (https://en.wikipedia.org/wiki/Robustness_principle).

The library docs say it follows such.


Web.Refs:

https://docs.python.org/3/library/email.html
<<<
email — An email and MIME handling package

Source code: Lib/email/__init__.py

The email package is a library for managing email messages. It is
specifically not designed to do any sending of email messages to SMTP
(RFC 2821), NNTP, or other servers; those are functions of modules such
as smtplib and nntplib. The email package attempts to be as
RFC-compliant as possible, supporting RFC 5233 and RFC 6532...
>>>


https://tools.ietf.org/html/rfc6532.html
<<<
3.  Changes to Message Header Fields

   To permit non-ASCII Unicode characters in field values, the header
   definition in [RFC5322] is extended to support the new format.  The
   following sections specify the necessary changes to RFC 5322's ABNF.

   The syntax rules not mentioned below remain defined as in [RFC5322].

   Note that this protocol does not change rules in RFC 5322 for
   defining header field names.  The bodies of header fields are allowed
   to contain Unicode characters, but the header field names themselves
   must consist of ASCII characters only.

   Also note that messages in this format require the use of the
   SMTPUTF8 extension [RFC6531] to be transferred via SMTP.
...
>>>


https://tools.ietf.org/html/rfc5322
<<<
RFC 5322Internet Message Format October 2008

2.2.  Header Fields

   Header fields are lines beginning with a field name, followed by a
   colon (":"), followed by a field body, and terminated by CRLF.  A
   field name MUST be composed of printable US-ASCII characters (i.e.,
   characters that have values between 33 and 126, inclusive), except
   colon.  A field body may be composed of printable US-ASCII characters
   as well as the space (SP, ASCII value 32) and horizontal tab (HTAB,
   ASCII value 9) characters (together known as the white space
   characters, WSP).  A field body MUST NOT include CR and LF except
   when used in "folding" and "unfolding", as described in section
   2.2.3.  All field bodies MUST conform to the syntax described in
   sections 3 and 4 of this specification.
...
>>>
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The logic in _curses_init_pair_impl is quite odd. Seems that 
_CURSES_INIT_PAIR_FUNC succeeds the first run of (-R) even if pair_number >= 
COLOR_PAIRS but fails the second. Serhiy, do you know what's going on here?

--

___
Python tracker 

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



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

koobs, can you give us access to the buildbot? The latest IP you provided do 
not work anymore

--

___
Python tracker 

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



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

==
FAIL: test_copy_file_range_offset (test.test_os.FileTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_os.py", 
line 365, in test_copy_file_range_offset
self.assertIn(i, range(0, bytes_to_copy+1));
AssertionError: 7 not found in range(0, 7)
--

https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio

--
messages: 387046
nosy: koobs, lukasz.langa, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9
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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-02-15 Thread Illia Volochii


Change by Illia Volochii :


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

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5c17dfc5d70ce88be99bc5769b91ce79d7a90d61 by Senthil Kumaran in 
branch '3.6':
[3.6] bpo-42967: only use '&' as a query string separator (GH-24297)  (GH-24532)
https://github.com/python/cpython/commit/5c17dfc5d70ce88be99bc5769b91ce79d7a90d61


--

___
Python tracker 

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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-02-15 Thread Illia Volochii


New submission from Illia Volochii :

https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/trsock.py#L19-L24

Using of the operations was supposed to be prohibited in Python 3.9, but that 
was missed.

--
components: asyncio
messages: 387044
nosy: asvetlov, illia-v, yselivanov
priority: normal
severity: normal
status: open
title: Prohibit previously deprecated operations on 
asyncio.trsock.TransportSocket
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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seems to happen only when running with -R

--

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/433/builds/181/steps/5/logs/stdio


==
ERROR: test_init_pair (test.test_curses.TestCurses)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py",
 line 47, in wrapped
test(self, *args, **kwargs)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py",
 line 959, in test_init_pair
curses.init_pair(maxpair, 0, 0)
ValueError: Color pair is greater than COLOR_PAIRS-1 (65535).
--

--
messages: 387042
nosy: pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

___
Python tracker 

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



[issue43108] test_curses is leaking references

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ede1ff226c9ef4efd053109c69b4e33f75b2b17b by Miss Islington (bot) 
in branch '3.8':
bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429)
https://github.com/python/cpython/commit/ede1ff226c9ef4efd053109c69b4e33f75b2b17b


--

___
Python tracker 

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



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset d0d4d30882fe3ab9b1badbecf5d15d94326fd13e by Senthil Kumaran in 
branch '3.7':
[3.7] bpo-42967: only use '&' as a query string separator (GH-24297)  (GH-24531)
https://github.com/python/cpython/commit/d0d4d30882fe3ab9b1badbecf5d15d94326fd13e


--

___
Python tracker 

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



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e3110c3cfbb7daa690d54d0eff6c264c870a71bf by Senthil Kumaran in 
branch '3.8':
[3.8] bpo-42967: only use '&' as a query string separator (GH-24297)  (#24529)
https://github.com/python/cpython/commit/e3110c3cfbb7daa690d54d0eff6c264c870a71bf


--

___
Python tracker 

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



[issue43222] Regular expression split fails on 3.6 and not 2.7 or 3.7+

2021-02-15 Thread Philip


Change by Philip :


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



Re: Change first occurrence of character x in a string - how?

2021-02-15 Thread rust buckett
Grant Edwards  wrote:
> On 2021-02-14, Mr Flibble  wrote:
>> On 14/02/2021 21:14, Chris Green wrote:
>>> What's the easiest way to change the first occurrence of a specified
>>> character in a string?
>>
>> By using a grown up (i.e. non-toy) programming language.
> 
> 
> 
> [gotta love slrn's scoring feature...]
> 

Yep. That's gonna save me some time.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

And to dig a bit further with a semi-official answer.

RHEL4 had standalone support for s390, while since RHEL5+ we've had only 
multilib support (64 bits kernel and possibility of s390 userspace packages).

RHEL7 that is the oldest currently supported RHEL OS, does have multilib 
support, meaning that 32 bit (s390) userspace packages are available for s390x 
booting on 64 bit kernel.

Although a later base python version for RHEL7 will not be shipped as we 
already have python2.7.5 and python3.8.6 supported there, which already builds 
for s390 for the aforementioned multilib support.

On Software Collections where we actually sometimes ship later Python versions, 
we compile only for 64 bits so the removal of the s390 pieces wouldn't pose an 
issue here.

Hence the only problem I can figure out from my analysis would be for users on 
s390x who would download the necessary 32bit libraries and dependencies from 
the repos and use the -m32 CFLAGS and LDFLAGS to get a 32 bits build.

--

___
Python tracker 

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



Mr. Flibble

2021-02-15 Thread Ethan Furman
Thank you to those who pointed out this individual to the moderators. 
As Mr. Flibble accurately noted, he is not on the mailing list -- so his 
posts won't be here either.


--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset c9f07813ab8e664d8c34413c4fc2d4f86c061a92 by Senthil Kumaran in 
branch '3.9':
[3.9] bpo-42967: only use '&' as a query string separator (GH-24297) (#24528)
https://github.com/python/cpython/commit/c9f07813ab8e664d8c34413c4fc2d4f86c061a92


--

___
Python tracker 

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



[issue43228] Regression in function builtins

2021-02-15 Thread Mark Shannon


Mark Shannon  added the comment:

You need to define __builtins__ in the globals dictionary.

def func(s):
return len(s)

text = "abc"
print(func(text))

FuncType = type(func)
func_globals = {"__builtins__":__builtins__.__dict__}
code = func.__code__
func2 = FuncType(code, func_globals)

print(func2(text))


works for both 3.9 and 3.10.

Cloudpickle needs to initialize the globals dict *before* creating the function.

--

___
Python tracker 

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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>  If the GIL is released before the tuple is fully populated and something 
> access to this tuple via the GC (ex: gc.get_objects()), accessing the tuple 
> can crash, especially in the Python land (for example, repr(the_tuple) is 
> likely to crash).

It can happen even without releasing the GIL: A new tuple is created, then some 
other object is created using the CAPI, the gc runs, the callback triggers (or 
the tuplevisit method is invoked) and then kaboom

--

___
Python tracker 

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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> There are other safe alternatives like Py_BuildValue("(OOO)", item1, item2, 
> item3).


That's a lot slower unfortunately

--

___
Python tracker 

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



  1   2   >