[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Mariusz Felisiak


Change by Mariusz Felisiak :


--
pull_requests: +25918
pull_request: https://github.com/python/cpython/pull/27385

___
Python tracker 

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



[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Change by Andrei Kulakov :


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

___
Python tracker 

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



[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I put the PR up here: 
https://github.com/python/cpython/pull/27384/files

--

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-07-26 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
nosy: +andrei.avk
nosy_count: 13.0 -> 14.0
pull_requests: +25916
pull_request: https://github.com/python/cpython/pull/27384

___
Python tracker 

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



[issue44739] Tkinter text horizontal scrollbar is not stationary

2021-07-26 Thread logon_name


Change by logon_name :


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



[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread ready-research


ready-research  added the comment:

Node.js is recommending using WHATWG URL API. Which handles all these 
correctly. We can test the same using https://jsdom.github.io/whatwg-url/

For example test the below and will return the same(correct) for all. 
https:///www.attacker.com/a/b
https:/www.attacker.com/a/b
https:\www.attacker.com/a/b
https:/\/\/\www.attacker.com/a/b
https:/\www.attacker.com/a/b



```
hrefhttps://www.attacker.com/a/b
protocolhttps:
username(empty string)
password(empty string)
port(empty string)
hostnamewww.attacker.com
pathname/a/b
search  (empty string)
hash(empty string)
```

SUMMARY:
python urlparse() function should also handle all the above in the same way.

--

___
Python tracker 

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



[issue39658] Include user scripts folder to PATH on Windows

2021-07-26 Thread Matthew Morrissette Vance


Change by Matthew Morrissette Vance :


--
nosy: +yinzara

___
Python tracker 

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



[issue40085] Argument parsing option c should accept int between -128 to 255 ?

2021-07-26 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
resolution:  -> not a bug
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: a simple question

2021-07-26 Thread Avi Gross via Python-list
In addition to the other requests for more info on a very ambiguous
question, let me add one. Did the message suggest something worked on an
earlier version and broke with a new version, or did they mean they just
started USING the current version and hoped the version number was
meaningful for the way they probably did not write proper code in the first
place that loads the module(s) they need?

-Original Message-
From: Python-list  On
Behalf Of Dennis Lee Bieber
Sent: Monday, July 26, 2021 9:46 PM
To: python-list@python.org
Subject: Re: a simple question

On Mon, 26 Jul 2021 22:19:58 + (UTC), Glenn Wilson via Python-list
 declaimed the following:

>I recently downloaded the latest version of python, 3.9.6. Everything works
except, the turtle module. I get an error message every time , I use basic
commands like forward, backward, right and left. My syntax is correct:
pat.forward(100) is an example. Can you tell me what is wrong.

No we can't. 

Please provide a cut (NOT a screen-grab image) of the error
traceback, an indication of what OS/hardware you are running upon, etc.
Maybe even which installer you downloaded (python.org, or some third-party
repackager: ActiveState, Anaconda, M$ app store)



-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/

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

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


[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
type:  -> behavior
versions: +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



[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Something changed between 3.8 and 3.9 so that "bare" references to methods on 
`object` no longer get linked. So for example, :meth:`__bool__` would get link 
to object.__bool__ anchor, but in 3.9+, it should be :meth:`~object.__bool__` 
for the link to be generated.

The case of __enter__ and __exit__ is that inside of contextmanager block, 
Sphinx knows that bare ref should link to contextmanager, but outside of the 
block, it does not, so no link is created.

In 3.8 docs, there are bare refs to __enter__ and __exit__ outside of relevant 
block, so they link to object.__enter__ and object.__exit__, which is of course 
wrong.

See 2nd paragraph below the block: 
https://docs.python.org/3.8/library/stdtypes.html#contextmanager.__exit__

I wasn't able to find why or how in 3.8 it was configured to auto-link bare 
refs to `object`. I looked at make.bat, conf.py and pyspecific.py

Perhaps in 3.8 the entire file was considered / configured a block for `object` 
object?

I will make a PR to fix the links.

--

___
Python tracker 

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



[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread ready-research

ready-research  added the comment:

Some other examples to test this behaviour:
urlparse('https:/\/\/\www.attacker.com/a/b')
urlparse('https:/\www.attacker.com/a/b')

## Comparing it to other languages/runtimes

How do other languages and their runtimes work with URL parsing functions?

Here's Node.js, also showing that it is missing the `host` and `hostname`, with 
a similar behavior to the currently reported "buggy" python `urlparse()` one:
```
node
>require("url").parse("https:/\/\/\www.attacker.com/a/b");

Will return

Url {
  protocol: 'https:',
  slashes: true,
  auth: null,
  host: '',
  port: null,
  hostname: '',
  hash: null,
  search: null,
  query: null,
  pathname: '/www.attacker.com/a/b',
  path: '/www.attacker.com/a/b',
  href: 'https:///www.attacker.com/a/b'
}
```
But it is already documented that using Node.js url.parse can lead to security 
issues: 
https://nodejs.org/dist/latest-v16.x/docs/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
`Use of the legacy url.parse() method is discouraged. Users should use the 
WHATWG URL API. Because the url.parse() method uses a lenient, non-standard 
algorithm for parsing URL strings, security issues can be introduced. 
Specifically, issues with host name spoofing and incorrect handling of 
usernames and passwords have been identified.`


Here's Ruby, also showing that it is missing the `host` and `hostname`, with a 
similar behavior to the currently reported "buggy" python `urlparse()` one:

```sh
irb(main):001:0> require 'uri'
=> false
irb(main):002:0> uri = URI.parse('https:/www.attacker.com/a/b')
=> #
irb(main):003:0> uri.host
=> nil
irb(main):004:0> uri.hostname
=> nil
irb(main):005:0> uri.scheme
=> "https"
irb(main):006:0> uri.path
=> "/www.attacker.com/a/b"
```

That said, it seems that Ruby throws on other permutations of the bad URL, 
which python does not. For example:

```
irb(main):011:0> other_uri = URI.parse('https:/\/\/\www.attacker.com/a/b')
Traceback (most recent call last):
8: from /usr/bin/irb:23:in `'
7: from /usr/bin/irb:23:in `load'
6: from /Library/Ruby/Gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `'
5: from (irb):11
4: from (irb):11:in `rescue in irb_binding'
3: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/common.rb:234:in
 `parse'
2: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:73:in
 `parse'
1: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in
 `split'
URI::InvalidURIError (bad URI(is not URI?): 
"https:/\\/\\/\\www.attacker.com/a/b")
```

Same for this other URI, which Ruby does not accept (unlike python, which does 
accept it and returns with a missing host and hostname properties as evident 
earlier in this report):

```
irb(main):012:0> other_uri = URI.parse('https:/\www.attacker.com/a/b')
Traceback (most recent call last):
8: from /usr/bin/irb:23:in `'
7: from /usr/bin/irb:23:in `load'
6: from /Library/Ruby/Gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `'
5: from (irb):12
4: from (irb):12:in `rescue in irb_binding'
3: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/common.rb:234:in
 `parse'
2: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:73:in
 `parse'
1: from 
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in
 `split'
URI::InvalidURIError (bad URI(is not URI?): "https:/\\www.attacker.com/a/b")
```

Let's look at PHP. PHP's parse_url() function behaves much like python, where 
it misses to identify the host property for all 3 examples provided in this 
report:
```
❯ php -a
Interactive shell

php > var_dump(parse_url('https:/\www.attacker.com/a/b'));
array(2) {
  ["scheme"]=>
  string(5) "https"
  ["path"]=>
  string(22) "/\www.attacker.com/a/b"
}
php > var_dump(parse_url('https:/www.attacker.com/a/b'));
array(2) {
  ["scheme"]=>
  string(5) "https"
  ["path"]=>
  string(21) "/www.attacker.com/a/b"
}
php > var_dump(parse_url('https:/\/\/\www.attacker.com/a/b'));
array(2) {
  ["scheme"]=>
  string(5) "https"
  ["path"]=>
  string(26) "/\/\/\www.attacker.com/a/b"
}
php > var_dump(parse_url('https://www.attacker.com/a/b'));
array(3) {
  ["scheme"]=>
  string(5) "https"
  ["host"]=>
  string(16) "www.attacker.com"
  ["path"]=>
  string(4) "/a/b"
}
```

The applicability of this vulnerability
It seems that, there's no direct way of manipulating a python runtime into a 
severe impact simply by sending it a malformed URL.
However, a userland logic implementation that bases its decision on the python 
urlparse() function may introduce a security vulnerability due to the 
unexpected returned values of the function. These vulnerabilities may manifest 
as an SSRF, Open Redirect and other types of 

Re: a simple question

2021-07-26 Thread dn via Python-list
On 27/07/2021 10.19, Glenn Wilson via Python-list wrote:
> I recently downloaded the latest version of python, 3.9.6. Everything works 
> except, the turtle module. I get an error message every time , I use basic 
> commands like forward, backward, right and left. My syntax is correct: 
> pat.forward(100) is an example. Can you tell me what is wrong.


Python comes with "batteries included". However, if 'everything' was
made immediately-available, each of your program[me]s would be very
long. Accordingly, the 'batteries' are kept in what is called "The
Python Standard Library". To use a library it must be import-ed into
your code.

Docs describing the library are available on-line, specifically the
turtle module (and some examples of its use) can be found at:
https://docs.python.org/3/library/turtle.html

Have fun!
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread Logan Jones


Logan Jones  added the comment:

I don't know if urlparse is actually "mishandling" these URLs.

Looking over RFC 1808 (https://datatracker.ietf.org/doc/html/rfc1808.html) the 
BNF (https://datatracker.ietf.org/doc/html/rfc1808.html#section-2.2) seems to 
support what urlparse is reporting, at least for the first two examples.

I'll try to break down each scenario. Maybe you can help me understand what you 
expect it to report?

https  :   // /www.attacker.com
^  ^  ^
scheme   Net loc Not a valid  
 Delimeter   netloc character, but
 is a valid abs_path beginning
 (according to the spec net_loc
 is allowed to be empty)


https  :  /www.attacker.com/a/b
^ ^
schemevalid abs_path



https  :  \www.attacker.com/a/b
^ ^
scheme   This isn't actually matched
 anywhere in the BNF, so if
 anything maybe a value error
 should have been raised?

--

___
Python tracker 

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



[issue44745] Manual for python 3.9.6 will not let me search

2021-07-26 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I replicated the issue: downloading the "Windows Help File" (python396.chm) 
from the release page https://www.python.org/downloads/release/python-396/ , 
opening it, and entering a search term (e.g., "tuple") into the search tab 
resulted in a message box pop-up with the message "No topics found."

Doing the same with the corresponding file on prior release pages, (e.g. 
https://www.python.org/downloads/release/python-395/ ) produced in a list of 
search results, and no such pop-up message.

I'm running Windows 10.0.19042 Build 19042.

--
components: +Windows -Library (Lib)
nosy: +Dennis Sweeney, paul.moore, steve.dower, tim.golden, zach.ware
type: resource usage -> behavior

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Ah, I missed that and totally misinterrpreted other comments. 
Confirmation bias at work: I saw the code I expected to see, not the 
code that was actually there :-(

All good, I agree that it is a bug in the class, not in the language. 
Sorry for the noise.

--

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2021-07-26 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This feature (or one very like it) has been requested again, this time with an 
"i" prefix:

https://discuss.python.org/t/indented-multi-line-string-literals/9846/1

--

___
Python tracker 

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



[issue44719] Incorrect callable object crashes Python 3.11.0a0

2021-07-26 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Indeed, I got no crash on main after GH-27313.

I also got no crash on 3.10 after GH-23568. Its backport to 3.9 (GH-24501) 
would have fixed this, but broke the stable ABI and was reverted. This was 
related to bpo-42500.

I'm closing this "fixed". Feel free to re-open if you still see an issue.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Brandt Bucher


Brandt Bucher  added the comment:

> All the examples that are said to go into an infinite loop work fine in 3.9. 
> [...] At the very least, the examples shouldn't swallow the IndexError and go 
> into an infinite loop.

Note that the original example posted did not include a "raise IndexError" 
branch in its __getitem__. That was class I was referring to, since the lack of 
an IndexError causes the iteration to continue forever.

As far as I know, nothing has changed about the iteration protocol in 3.10.

--

___
Python tracker 

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



[issue34013] Inconsistent SyntaxError for print

2021-07-26 Thread Irit Katriel


Irit Katriel  added the comment:

This case has changed recently, and not for the better:

>>> print f(3)
  File "", line 1
print f(3)
^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

--

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

How is this not a regression? And a very serious one by the sound of it. All 
the examples that are said to go into an infinite loop work fine in 3.9.

(Obviously I can't check the match statement example in 3.9.)

If the Sequence Protocol really has been dropped from Python's execution model, 
shouldn't there be a PEP for such a major change in behaviour? Legacy or not, 
it is still a part of the language.

At the very least, the examples shouldn't swallow the IndexError and go into an 
infinite loop.

Brandt said:

> the destructuring is basically the same as if you had written:
> 
> [x, *w, y] = Seq()
> 
> ...which also hangs.


It works fine in 3.9, with or without inheriting from the Sequence ABC.

# Python 3.9
>>> class A:
... def __len__(self):
... return 5
... def __getitem__(self, i):
... print(i)
... if i < 5:
... return i
... raise IndexError
... 
>>> [x, *y, z] = A()
0
1
2
3
4
5
>>> x, y, z
(0, [1, 2, 3], 4)


Likewise for list(A()), etc.

The __len__ method isn't needed for iteration to work correctly. I just 
included it to match Pierre's example.

Inheriting from collections.abc.Sequence does not change the behaviour.

Still in 3.9:

>>> list(A())
0
1
2
3
4
5
[0, 1, 2, 3, 4]


I think that closing this is as Not A Bug was premature. If this isn't a bug, 
then I have no idea what counts as a bug any longer :-(

--
nosy: +steven.daprano

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6fc1efa4546ad94a904239fd5efb84e02894eb31 by Miss Islington (bot) 
in branch '3.10':
bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) 
(GH-27380)
https://github.com/python/cpython/commit/6fc1efa4546ad94a904239fd5efb84e02894eb31


--

___
Python tracker 

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



Re: a simple question

2021-07-26 Thread Paul Bryan
It would help to know the error message you get every time.

On Mon, 2021-07-26 at 22:19 +, Glenn Wilson via Python-list wrote:
> I recently downloaded the latest version of python, 3.9.6. Everything
> works except, the turtle module. I get an error message every time ,
> I use basic commands like forward, backward, right and left. My
> syntax is correct: pat.forward(100) is an example. Can you tell me
> what is wrong.
>      thanks, glenn

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


[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2021-07-26 Thread Irit Katriel


Irit Katriel  added the comment:

The script (3.py) now gives the RuntimeError (as of 3.9) so I think the 
discussion about back port is over and there is nothing more to do on this 
issue.  If nobody objects I will close this.

--
status: open -> pending

___
Python tracker 

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



a simple question

2021-07-26 Thread Glenn Wilson via Python-list
I recently downloaded the latest version of python, 3.9.6. Everything works 
except, the turtle module. I get an error message every time , I use basic 
commands like forward, backward, right and left. My syntax is correct: 
pat.forward(100) is an example. Can you tell me what is wrong.
     thanks, glenn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

In this case, it appears that ref with tilde and object makes it work in both 
3.10 and 3.11, but with just bare method specified, it doesn't create link in 
both -- so it may be good to try updating it to have tilde  and a ref to obj:


Once an iterator's :meth:`~iterator.__next__` method raises
:exc:`StopIteration`, it must continue to do so on subsequent calls.
Implementations that do not obey this property are deemed broken.


.. _generator-types:

Generator Types
---

Python's :term:`generator`\s provide a convenient way to implement the iterator
protocol.  If a container object's :meth:`__iter__` method is implemented as a
generator, it will automatically return an iterator object (technically, a
generator object) supplying the :meth:`__iter__` and :meth:`~generator.__next__`
methods.

--

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 11749e2dc20ad6a76e9a39e948853e89b2b4bbed by Mariusz Felisiak in 
branch 'main':
bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)
https://github.com/python/cpython/commit/11749e2dc20ad6a76e9a39e948853e89b2b4bbed


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44745] Manual for python 3.9.6 will not let me search

2021-07-26 Thread Matthew Zielinski


New submission from Matthew Zielinski :

The Manual for python 3.9.6 always says there are no entries. I searched things 
it definitely had, like modules, but it said there were no topics found.

--
components: Library (Lib)
files: Python Error.png
messages: 398261
nosy: matthman2019
priority: normal
severity: normal
status: open
title: Manual for python 3.9.6 will not let me search
type: resource usage
versions: Python 3.9
Added file: https://bugs.python.org/file50184/Python Error.png

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Nick! ✨  ✨

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0ea5e0d792a85b435ef299319dcd52e59f535cb1 by Miss Islington (bot) 
in branch '3.10':
bpo-44515: handle non-refcounted GC in contextlib tests (GH-26910) (GH-27379)
https://github.com/python/cpython/commit/0ea5e0d792a85b435ef299319dcd52e59f535cb1


--

___
Python tracker 

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



[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

The same thing happens in 3.11. I've also confirmed the markup is exactly the 
same.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue22239] asyncio: nested event loop

2021-07-26 Thread Yury Selivanov


Yury Selivanov  added the comment:

> nest-asyncio library (https://github.com/erdewit/nest_asyncio)

Seeing that the community actively wants to have support for nested loops I'm 
slowly changing my opinion on this.

Guido, maybe we should allow nested asyncio loops disabled by default?

--

___
Python tracker 

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



[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-07-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +25914
pull_request: https://github.com/python/cpython/pull/27379

___
Python tracker 

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



[issue44515] contextlib test incompatibility with non-refcounted GC

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a2c45e5bcf9d3dfff9f2699dbc161489897616b5 by Nick Coghlan in 
branch 'main':
bpo-44515: handle non-refcounted GC in contextlib tests (GH-26910)
https://github.com/python/cpython/commit/a2c45e5bcf9d3dfff9f2699dbc161489897616b5


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Mariusz Felisiak


Change by Mariusz Felisiak :


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

___
Python tracker 

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



[issue44739] Tkinter text horizontal scrollbar is not stationary

2021-07-26 Thread E. Paine


E. Paine  added the comment:

Thank you for reporting this issue. I have personally found this problem to be 
annoying and it is also noted in msg377227. I did a brief bit of research but 
couldn't find an existing ticket on https://core.tcl-lang.org/tk/ticket so 
please feel free to report it there.

I believe it is a side-effect of optimisations the Tk team have made to allow 
the Text widget to have reasonable performance with a large number of lines (so 
I would be surprised if this limitation was not already known by them). Again, 
thank you for reporting this issue, but tkinter is just a thin wrapper around 
Tk so I think the issue here should be closed.

--
nosy: +epaine, serhiy.storchaka
title: XScrollbar is not stationary -> Tkinter text horizontal scrollbar is not 
stationary

___
Python tracker 

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



[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread Logan Jones


Change by Logan Jones :


--
nosy: +loganasherjones

___
Python tracker 

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



[issue28356] [easy doc] Document os.rename() behavior on Windows when src and dst are on different filesystems

2021-07-26 Thread Ryan Ozawa


Change by Ryan Ozawa :


--
pull_requests: +25912
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27376

___
Python tracker 

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



[issue32635] test_crypt segfaults when using libxcrypt instead of libcrypt

2021-07-26 Thread Arfrever Frehtes Taifersar Arahesis


Arfrever Frehtes Taifersar Arahesis  added the comment:

Geoffrey Thomas:
I agree that including crypt.h only where required is better.
Can you file new bug with patch?


Benjamin Peterson:
I suspect that with crypt.h not included in _cryptmodule.c, crypt() was treated 
by compiler as implicitly declared function (returning 'int'), however real 
crypt() function returns 'char*'.

--
nosy: +Arfrever

___
Python tracker 

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



[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-07-26 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7482fff297727bb5faf64cc92c73561ccf48feda by Miss Islington (bot) 
in branch '3.9':
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) 
(GH-27370)
https://github.com/python/cpython/commit/7482fff297727bb5faf64cc92c73561ccf48feda


--

___
Python tracker 

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



[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 563e05743c8f31366db7ef35a00e396c9f442b17 by Miss Islington (bot) 
in branch '3.10':
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) 
(GH-27369)
https://github.com/python/cpython/commit/563e05743c8f31366db7ef35a00e396c9f442b17


--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 4a5457d5d48e6563ec481daad245ff3d6ef13503 by Miss Islington (bot) 
in branch '3.10':
bpo-44490: Add 'Whats New' docs regarding types.Union changes (GH-27215) 
(GH-27368)
https://github.com/python/cpython/commit/4a5457d5d48e6563ec481daad245ff3d6ef13503


--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 85ac81499ec5fb156a57408bcd95b06de4531488 by Miss Islington (bot) 
in branch '3.9':
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278) 
(GH-27367)
https://github.com/python/cpython/commit/85ac81499ec5fb156a57408bcd95b06de4531488


--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 256d97c8a3151ec7caba6c06bf2a1e682008c304 by Miss Islington (bot) 
in branch '3.10':
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278) 
(#27366)
https://github.com/python/cpython/commit/256d97c8a3151ec7caba6c06bf2a1e682008c304


--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Brandt Bucher


Brandt Bucher  added the comment:

I agree, Pablo.

The only thing that makes me pause is that, depending on the pattern, 
*sometimes* we use iteration and *sometimes* we use indexing. That might be 
sort of surprising to classes like Seq if you change patterns or major Python 
versions and this thing starts hanging. Hopefully, though, the reason will be 
relatively easy to debug and fix.

Closing as "not a bug".

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 8a37e8cf45105fbb592c31ebd30501bbdea5ab81 by Miss Islington (bot) 
in branch '3.10':
bpo-44732: Rename types.Union to types.UnionType (GH-27342)
https://github.com/python/cpython/commit/8a37e8cf45105fbb592c31ebd30501bbdea5ab81


--

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In general I would propose to close this as "not a bug"

--

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I don't think there is anything technically wrong here. The Seq class is 
relying on the legacy version of the iterator protocol, which specifies that 
you need to raise IndexError there to stop the iteration.

For instance, this version works:

import collections.abc

class Seq(collections.abc.Sequence):
def __getitem__(self, i):
if i >= len(self):
raise IndexError
return i
def __len__(self):
return 42

match Seq():
case [x, *w, y]:
z = 0
print(z)


Also, one could argue that Seq has exactly the same problem all over the 
language. For instance

>> list(Seq())

will hang

>> [x,*y] = Seq()

will hang

and so on and so forth. So, if I am a user and I am trying to **predict** how 
this would behave based on these two experiments my conclusion would be:

"Anything that tries to iterate on this thing will hang"

I think that whatever we do, we should make it *predictable* and consistency 
across the language, and IMHO only fixing it in pattern matching doesn't make 
it predictable. Being said that, I don't think these use cases justifies a 
major overhaul of how this behaves everywhere.

--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-07-26 Thread Logan Jones


Change by Logan Jones :


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

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Brandt Bucher


Brandt Bucher  added the comment:

(Raising the priority to "high" because any decision on this should ideally be 
made before the 3.10 RCs.)

Hm, interesting. This is because we use UNPACK_EX for these patterns, so the 
destructuring is basically the same as if you had written:

[x, *w, y] = Seq()

...which also hangs.

We actually have three implementations for destructuring sequences:
- Using UNPACK_EX, when there is a starred name.
- Using BINARY_SUBSCR, when there is a starred wildcard.
- Using UNPACK_SEQUENCE, when there is no star.

When using your Seq class:
- The first fails by falling into an infinite loop.
- The second works as expected.
- The third fails with a ValueError at runtime (for a length mismatch).

*If* we decide that this is a big enough problem to fix, then I think the 
easiest way of doing it is to use the BINARY_SUBSCR implementation for all 
three paths (we'll just also need to use BUILD_LIST / LIST_APPEND to actually 
collect the starred items). It will simplify the pattern compiler a bit, but I 
imagine it will also come with a performance penalty as well.

In my opinion, I don't think we should rewrite everything to support Seq 
(though my mind isn't made up entirely). Sequences are supposed to be sized and 
iterable, but Seq doesn't really support the iteration protocol correctly (it 
expects the iterating code to stop once the length is exhausted, rather than 
raising StopIteration).

I'm curious to hear opinions on whether we want to actually fix this, though. 
It seems that it will always be possible to write classes like Seq the hack our 
pattern-matching implementation with dubious sequences and mappings, so it 
really comes down to: is supporting classes like Seq worth potentially slowing 
down all other sequence patterns?

--
assignee:  -> brandtbucher
nosy: +Mark.Shannon, gvanrossum, pablogsal
priority: normal -> high

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-07-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +25909
pull_request: https://github.com/python/cpython/pull/27371

___
Python tracker 

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



[issue44453] Documented return type of sysconfig.get_path() is wrong

2021-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25910
pull_request: https://github.com/python/cpython/pull/27372

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-07-26 Thread Ram Rachum


Ram Rachum  added the comment:

Awesome. You can link to experimental code here. Even if it were not accepted 
to Python, it could be useful for me and for other people who might see this 
issue.

--

___
Python tracker 

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



[issue43443] Should shelve support dict union?

2021-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25908
pull_request: https://github.com/python/cpython/pull/27370

___
Python tracker 

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



[issue43443] Should shelve support dict union?

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c97c2a050cf753003012ae3f08e035326b8f6167 by Serhiy Storchaka in 
branch 'main':
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004)
https://github.com/python/cpython/commit/c97c2a050cf753003012ae3f08e035326b8f6167


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue43443] Should shelve support dict union?

2021-07-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25906
pull_request: https://github.com/python/cpython/pull/27368

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-07-26 Thread Logan Jones


Logan Jones  added the comment:

I think I have a solution for this, but I'm pretty new to contributing. Still 
writing up some tests.

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6c1b57d958e2b0d5bcf0f2315b5044838e11638f by Yurii Karabas in 
branch 'main':
bpo-44490: Add 'Whats New' docs regarding types.Union changes (GH-27215)
https://github.com/python/cpython/commit/6c1b57d958e2b0d5bcf0f2315b5044838e11638f


--
message_count: 17.0 -> 18.0
nosy: +lukasz.langa
nosy_count: 10.0 -> 11.0
pull_requests: +25906
pull_request: https://github.com/python/cpython/pull/27368

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25905
pull_request: https://github.com/python/cpython/pull/27367

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1d582bbc969e05896addf97844ddf17ce9830e5e by T. Wouters in branch 
'main':
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278)
https://github.com/python/cpython/commit/1d582bbc969e05896addf97844ddf17ce9830e5e


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0 by Hasan in branch 
'main':
bpo-44732: Rename types.Union to types.UnionType (#27342)
https://github.com/python/cpython/commit/2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +25903
pull_request: https://github.com/python/cpython/pull/27365

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks! ✨  ✨

--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7b2185b8e495daed30b50fe89f3ada0dc0129b62 by Miss Islington (bot) 
in branch '3.9':
bpo-44734: Fix precision in turtle tests (GH-27343) (GH-27362)
https://github.com/python/cpython/commit/7b2185b8e495daed30b50fe89f3ada0dc0129b62


--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 16a174f7bac481ff6f859179b30a74d867747137 by Miss Islington (bot) 
in branch '3.10':
bpo-44734: Fix precision in turtle tests (GH-27343) (GH-27361)
https://github.com/python/cpython/commit/16a174f7bac481ff6f859179b30a74d867747137


--

___
Python tracker 

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



[issue44697] Memory leak when asyncio.open_connection raise

2021-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Thank you Arteem, that should help indicate where the memory leak is present.

--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25902
pull_request: https://github.com/python/cpython/pull/27362

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +25901
pull_request: https://github.com/python/cpython/pull/27361

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 3f135c073a53793ec68902f6b513934ddff47235 by Logan Jones in branch 
'main':
bpo-44734: Fix precision in turtle tests (GH-27343)
https://github.com/python/cpython/commit/3f135c073a53793ec68902f6b513934ddff47235


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44744] [security] Open redirect attack due to insufficient validation in Urlparse

2021-07-26 Thread ready-research


New submission from ready-research :

`urlparse` mishandles certain uses of extra slash or backslash(such as 
https:/// , https:/, https:\) and interprets the URI as a relative path. 

A userland logic implementation that bases its decision on the urlparse() 
function may introduce a security vulnerability due to the unexpected returned 
values of the function. These vulnerabilities may manifest as an SSRF, Open 
Redirect, and other types of vulnerabilities related to incorrectly trusting a 
URL.

```
from urllib.parse import urlparse
url1=urlparse('https://www.attacker.com/a/b')
url2=urlparse('https:///www.attacker.com/a/b')
url3=urlparse('https:/www.attacker.com/a/b')
url4=urlparse('https:\www.attacker.com/a/b')
print("Normal behaviour: HOSTNAME should be in netloc\n")
print(url1)
print("\nMishandling hostname and returning it as path\n")
print(url2)
print(url3)
print(url4)
```

OUTPUT:
```
Normal behaviour: HOSTNAME should be in netloc

ParseResult(scheme='https', netloc='www.attacker.com', path='/a/b', params='', 
query='', fragment='')

Mishandling hostname and returning it as path

ParseResult(scheme='https', netloc='', path='/www.attacker.com/a/b', params='', 
query='', fragment='')
ParseResult(scheme='https', netloc='', path='/www.attacker.com/a/b', params='', 
query='', fragment='')
ParseResult(scheme='https', netloc='', path='\\www.attacker.com/a/b', 
params='', query='', fragment='')
```

--
components: Parser
messages: 398232
nosy: lys.nikolaou, pablogsal, ready-research
priority: normal
severity: normal
status: open
title: [security] Open redirect attack due to insufficient validation in 
Urlparse
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue44682] Pdb commands allows to add commands to invalid breakpoint

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I agree not backporting is most likely fine; just want to add that the issue 
here is that it allows you to enter command for an invalid breakpoint, creating 
a strong impression both that bpoint is valid and that command will be active.

--

___
Python tracker 

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



[issue44037] Broad performance regression from 3.10a7 to 3.10b2 with python.org macOS binaries

2021-07-26 Thread Ondrej Novak


Change by Ondrej Novak :


--
nosy: +andrenvk

___
Python tracker 

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



[issue44682] Pdb commands allows to add commands to invalid breakpoint

2021-07-26 Thread Irit Katriel


Irit Katriel  added the comment:

Silently ignoring errors is not exactly a bug, and this change might break some 
scripts. So I think we should not backport it.

--
nosy: +iritkatriel
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



[issue44743] asyncio DatagramProtocol stops calling callbacks after OSError

2021-07-26 Thread Julian_Orteil


New submission from Julian_Orteil :

After working through the Transports and Protocols documentation of asyncio, I 
decided to stress test the DatagramProtocol as an application I'm developing 
needs to act as a UDP server.

One of my tests drops the client before the server responds which raises an 
OSError on the server; however, after the error is raised, the server stops 
executing callbacks (like connection_made, datagram_received, error_received 
and connection_lost) until it is restarted. There is no documentation I can 
find that explains this behavior nor is there any meaningful discussions about 
it elsewhere. I don't think the socket itself drops because the client doesn't 
raise an OSError itself when connecting to the now-errored server.

Interestingly though, when I tried to enable debug mode of the loops on both 
the client to see if there were any silent errors being raised (which didn't 
occur), this issue doesn't occur. Enabling debug mode on the server had no 
effect.

Attached is the reproducible code; it is a slightly modified version of the UDP 
Echo Client/Server example found in the docs named above. My environment is 
Python 3.9.5 on Windows 10.

--
components: asyncio
files: reproducible_datagramprotocol_error.py
messages: 398229
nosy: JulianOrteil, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio DatagramProtocol stops calling callbacks after OSError
type: behavior
versions: Python 3.9
Added file: 
https://bugs.python.org/file50183/reproducible_datagramprotocol_error.py

___
Python tracker 

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



[issue44742] smtplib: less confusing behaviour when giving incorrect multiple recipients list

2021-07-26 Thread Célestin Matte

New submission from Célestin Matte :

When giving recipients in a string format ("email1, email2") to sendmail(), an 
email is sent to the first email in the list only.
This is not a bug since the documentation indicates that sendmail() takes 
either a list of addresses, or a single address in a string. However, this 
error is easy to make since the "To:" field expects a comma-separated series of 
email addresses in a string format.

I suggest either that:
- sendmail() accepts a series of emails in a string format: "email1, email2" 
for the recipient lists
- sendmail() raises an exception if a series of email in a string format is 
detected

Attached is an example script to test confusing behaviour (email is sent to 
ema...@mydomain.com only):

--
files: test_sendmail.py
messages: 398228
nosy: cmatte
priority: normal
severity: normal
status: open
title: smtplib: less confusing behaviour when giving incorrect multiple 
recipients list
type: enhancement
Added file: https://bugs.python.org/file50182/test_sendmail.py

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Dong-hee Na


Dong-hee Na  added the comment:

@felixxm

Please submit the PR :)

--
nosy: +corona10

___
Python tracker 

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



[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pierre Quentel


New submission from Pierre Quentel :

This code

match range(42):
case [x, *w, y]:
z = 0

sets w to a list with 40 items : the length of the subject, minus the number of 
non-star subpatterns.

But this code (adapted from test_patma_186) enters an infinite loop

import collections.abc

class Seq(collections.abc.Sequence):
def __getitem__(self, i):
print('get item', i)
return i
def __len__(self):
return 42

match Seq():
case [x, *w, y]:
z = 0

__getitem__ gets called forever, instead of stopping when the expected number 
of items in w is reached.

--
components: Interpreter Core
messages: 398226
nosy: quentel
priority: normal
severity: normal
status: open
title: Pattern Matching - star subpattern with a subject derived from 
collections.abc.Sequence
type: crash
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue40106] multiprocessor spawn

2021-07-26 Thread Ondrej Novak


Change by Ondrej Novak :


--
nosy: +andrenvk

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

That seems reasonable to me.

--
nosy: +eric.smith

___
Python tracker 

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



[issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager

2021-07-26 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I have confirmed the reproducer posted by Ronald also works for me, on 3.11 
compiled from dev branch, also with cpu count == 8; on the new M1 silicon (that 
shouldn't matter though).

I agree this can be closed.

--
nosy: +andrei.avk
status: pending -> open

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2021-07-26 Thread wyz23x2


Change by wyz23x2 :


--
versions: +Python 3.10, Python 3.11 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Mariusz Felisiak

New submission from Mariusz Felisiak :

AP lowercased "internet" and "web" in all instances – web page, the web, web 
browser, etc. on June 1, 2016:

https://twitter.com/APStylebook/status/716384777406922753
https://twitter.com/APStylebook/status/716279539052191746?s=20

I'd be happy to provide a patch, if accepted.

We will update the Django docs to follow this recommendation, see 
https://code.djangoproject.com/ticket/32956.

--
assignee: docs@python
components: Documentation
messages: 398223
nosy: docs@python, felixxm
priority: normal
severity: normal
status: open
title: Lowercase "Internet" and "web" in docs
type: enhancement

___
Python tracker 

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



[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2021-07-26 Thread Thomas Wouters


Thomas Wouters  added the comment:

This was fixed back in 2018, in fact.

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



[issue44739] XScrollbar is not stationary

2021-07-26 Thread logon_name


New submission from logon_name :

Hello!
When I was working on Tkinter GUI, I made a Text with two Scrollbars. But when 
I created many lines, filled the last line with letters, and then dragged the 
YScrollbar upwards, the XScrollbar could not be dragged. Moreover, when 
dragging down to the end, the Slider of the XScrollbar is not on the far right.
I hope this bug can be fixed as soon as possible.

--
components: Tkinter
files: editor.py
messages: 398221
nosy: logon_name
priority: normal
severity: normal
status: open
title: XScrollbar is not stationary
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50181/editor.py

___
Python tracker 

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



[issue44590] Create frame objects lazily when needed

2021-07-26 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset ae0a2b756255629140efcbe57fc2e714f0267aa3 by Mark Shannon in 
branch 'main':
bpo-44590: Lazily allocate frame objects (GH-27077)
https://github.com/python/cpython/commit/ae0a2b756255629140efcbe57fc2e714f0267aa3


--

___
Python tracker 

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



[issue44697] Memory leak when asyncio.open_connection raise

2021-07-26 Thread Artem


Artem  added the comment:

Checked on 3.9.6 - still leaking.

Strange stuff, but if I write 

except OSError as e:
del self

instead of 

except OSError as e:
pass

leak is disappearing.

--
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue44738] io_uring as a new backend to selectors and asyncio

2021-07-26 Thread Joongi Kim


Joongi Kim  added the comment:

As in the previous discussion, instead of tackling stdlib right away, it would 
be nice to evaluate the approach using 3rd-party libs, such as trio and/or 
async-tokio, or maybe a new library.

I have a strong feeling that we need to improve the async file I/O.
AFAIK, aiofiles is the only choice we have and it uses a thread pool, which 
involves many more context switches than required.

--

___
Python tracker 

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



[issue44738] io_uring as a new backend to selectors and asyncio

2021-07-26 Thread Joongi Kim


Joongi Kim  added the comment:

Ah, yes, but one year has passed so it may be another chance to discuss its 
adoption, as new advances like tokio_uring became available.

--

___
Python tracker 

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



[issue44738] io_uring as a new backend to selectors and asyncio

2021-07-26 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

I think this is a dupe of issue41271?

--

___
Python tracker 

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



[issue44738] io_uring as a new backend to selectors and asyncio

2021-07-26 Thread Joongi Kim


New submission from Joongi Kim :

This is a rough early idea suggestion on adding io_uring as an alternative I/O 
multiplexing mechanism in Python (maybe selectors and asyncio). io_uring is a 
relatively new I/O mechanism introduced in Linux kernel 5.1 or later.

https://lwn.net/Articles/776703/
https://lwn.net/Articles/810414/
https://blogs.oracle.com/linux/post/an-introduction-to-the-io_uring-asynchronous-io-framework

The advantages of io_uring over epoll:
 - completion-based
 - less number of syscalls
 - higher performance (https://twitter.com/hielkedv/status/1218891982636027905)
 - file I/O support including read/write/stat/open/close

I'm not sure that io_uring would bring actual performance improvements to 
Python (and asyncio) or not yet.
We need some exploration and prototyping, but still technically it would be a 
nice-to-have feature, considering Python's recent speed-up optimizations.
Also io_uring is also intended to support high-speed storage devices such as 
NVMe, and may be a good addition to asyncio in terms of improved async file I/O 
support.

Here are existing attempts to incorporate uring in other languages:
 - liburing (C, https://github.com/axboe/liburing)
 - iou, tokio-uring (Rust, https://tokio.rs/blog/2021-07-tokio-uring)

I don't have any estimation on the efforts and time required to do the work,
but just want to spark the discussion. :)

--
components: asyncio
messages: 398215
nosy: achimnol, asvetlov, corona10, njs, yselivanov
priority: normal
severity: normal
status: open
title: io_uring as a new backend to selectors and asyncio
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



  1   2   >