[issue43972] Simple HTTP Request Handler in http.server does not set a content-length and does not close connections on 301s

2021-05-05 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

I am also hesitant to fix something that is not broken. So, please share the 
broken behavior that could be verified, and this will give us greater 
confidence to commit this patch.

--

___
Python tracker 

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



[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-05-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Victor, thanks for the work to mitigate the costs of _PyType_GetModuleByDef().  
It now has much lower overhead.

--

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-05 Thread Hasan


Change by Hasan :


Removed file: https://bugs.python.org/file50018/test_plistlib_plutil.py

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-05 Thread Hasan


Change by Hasan :


Added file: https://bugs.python.org/file50020/test_plistlib_plutil.py

___
Python tracker 

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



[issue41491] plistlib can't load macOS BigSur system LaunchAgent

2021-05-05 Thread Hasan


Change by Hasan :


Removed file: https://bugs.python.org/file50019/test_plistlib_plutil.py

___
Python tracker 

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



[issue41491] plistlib can't load macOS BigSur system LaunchAgent

2021-05-05 Thread Hasan


Change by Hasan :


Added file: https://bugs.python.org/file50019/test_plistlib_plutil.py

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-05 Thread Hasan


Change by Hasan :


Removed file: https://bugs.python.org/file50017/test_plistlib_plutil.py

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-05 Thread Hasan


Change by Hasan :


Added file: https://bugs.python.org/file50018/test_plistlib_plutil.py

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is only backported to 3.10 and not 3.9 because the fix recommendations 
were only added in 3.10.

If the code difference became a problem, this could be backported because the 
roundabout method for name and attribute errors would work in 3.9.

--
stage: patch review -> 

___
Python tracker 

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



[issue43972] Simple HTTP Request Handler in http.server does not set a content-length and does not close connections on 301s

2021-05-05 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Hi Stephen, 

With the example, I couldn't reproduce the problem with curl 7.65.3

That said, I do recognize that this change is a positive improvement, but I 
cannot see this a bug-fix (and for client misbehavior, which I couldn't verify).

To take a call, I think, this change could go into `main` branch as an 
"improvement" change than a bug-fix. 

Note: the existing behavior is 10+ year old and don't want to introduce changes 
if it is not a bug.


Thanks

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



[issue17681] Work with an extra field of gzip and zip files

2021-05-05 Thread Benjamin Sergeant


Benjamin Sergeant  added the comment:

type Header struct {
Comment string// comment
Extra   []byte// "extra data"
ModTime time.Time // modification time
Namestring// file name
OS  byte  // operating system type
}

This is what the header/extra things look like for reference.

--

___
Python tracker 

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



[issue17681] Work with an extra field of gzip and zip files

2021-05-05 Thread Benjamin Sergeant


Benjamin Sergeant  added the comment:

There is a comment field too which would be nice to support.

The Go gzip module has a Header class that describe all the metadata. I see in 
3.8 mtime was made configurable, so hopefully we can add comment and extra.

https://golang.org/pkg/compress/gzip/#Header

For our purpose we'd like to put arbitrary stuff in a gzip file but it is 
complicated to do so, I might use the patch here and apply to the python gzip 
module, but that feels a bit  hackish.

--
nosy: +Benjamin.Sergeant

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 60ba0b68470a584103e28958d91e93a6db37ec92 by Miss Islington (bot) 
in branch '3.10':
bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 
Continue (GH-25916) (GH-25931)
https://github.com/python/cpython/commit/60ba0b68470a584103e28958d91e93a6db37ec92


--

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-05 Thread Hasan


Change by Hasan :


Added file: https://bugs.python.org/file50017/test_plistlib_plutil.py

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


miss-islington  added the comment:


New changeset ea9327036680acc92d9f89eaf6f6a54d2f8d78d9 by Miss Islington (bot) 
in branch '3.9':
bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 
Continue (GH-25916)
https://github.com/python/cpython/commit/ea9327036680acc92d9f89eaf6f6a54d2f8d78d9


--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 24f1d1a8a2c4aa58a606b4b6d5fa4305a3b91705 by Miss Islington (bot) 
in branch '3.10':
bpo-43882 Remove the newline, and tab early. From query and fragments. 
(GH-25936)
https://github.com/python/cpython/commit/24f1d1a8a2c4aa58a606b4b6d5fa4305a3b91705


--

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks guangli dong (leveryd)!

This is in and the 3.10-3.6 PRs should automerge (thru 3.9) after the CI runs, 
or be merged by the release managers (3.6-3.8).

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24603
pull_request: https://github.com/python/cpython/pull/25936

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24601
pull_request: https://github.com/python/cpython/pull/25934

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24600
pull_request: https://github.com/python/cpython/pull/25933

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24602
pull_request: https://github.com/python/cpython/pull/25935

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24599
pull_request: https://github.com/python/cpython/pull/25932

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread miss-islington


miss-islington  added the comment:


New changeset 3b2a45ff95a68acc8276b37678c98740a232f6d4 by Miss Islington (bot) 
in branch '3.10':
bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927)
https://github.com/python/cpython/commit/3b2a45ff95a68acc8276b37678c98740a232f6d4


--

___
Python tracker 

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



[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread William Pickard


William Pickard  added the comment:

Do you mind ticking the box, "Run as Administrator" in the Compatibility tab 
for python.exe and try winreg again?

--
nosy: +WildCard65

___
Python tracker 

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



[issue44051] Virtualalloc wrong return type

2021-05-05 Thread Eryk Sun


Eryk Sun  added the comment:

> ctypes.windll.kernel32.VirtuAlloc function return by default 
> a ctypes.c_long

In Windows, ctypes.c_int is an alias for ctypes.c_long, which is a signed 
32-bit integer. This is the default conversion type for the integer parameters 
of an FFI (foreign function interface) call, as well as the result. It's up to 
the author of a library wrapper to define the correct function prototypes, 
pointer types, and aggregate struct/union types. Some common Windows types are 
defined/aliased in the ctypes.wintypes module, but none of the API is 
prototyped.

> ctypes.windll.kernel32.VirtuAlloc

I suggest avoiding the global ctypes.windll loader. IMO, it's not a great idea 
to use a global library loader since it caches WinDLL instances, which cache 
function pointer instances. This make it possible for unrelated projects to 
interfere with each other and the main script by defining incompatible function 
prototypes -- particularly for common Windows API functions. It also doesn't 
allow passing use_last_error=True to enable the safe capturing of the thread's 
last error value as ctypes.get_last_error().

I recommend creating individual CDLL / WinDLL instances. For example:

import ctypes

kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)

kernel32.VirtualAlloc.restype = ctypes.c_void_p
kernel32.VirtualAlloc.argtypes = (
ctypes.c_void_p, # lpAddress
ctypes.c_size_t, # dwSize
ctypes.c_ulong,  # flAllocationType
ctypes.c_ulong)  # flProtect

If the call fails, you can raise an OSError as follows:

base_addr = kernel32.VirtualAlloc(None, size, alloc_type, protect)
if base_addr is None:
raise ctypes.WinError(ctypes.get_last_error())

--
components: +ctypes
nosy: +eryksun
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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24597
pull_request: https://github.com/python/cpython/pull/25930

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Steve: I think the point of discussing whether "pip install" can
be used to manage system wide packages is moot. It's been like that
for ages, not only for pip, but also for the distutils setup.py install
process and the old Makefile.pre.in approach before that. People
have their reasons, it's what you'd expect to work as a Unix sysadmin
and won't go away anytime soon :-)

So back to the original point...

Filipe: Could you please explain why patching sysconfig.py is not a
long term solution ?

This doesn't involve any changes on the CPython side, is as flexible
as you can get (you can also patch functions defined in sysconfig.py
to do the necessary magic, not only provide a static dict),
doesn't create overhead for Python's startup, works with all the
different command line options for limiting sys.path additions and
avoids security issues with the Python import logic.

It's already clear that sysconfig.py will be the new golden source
for installation related APIs and schemes (perhaps this could be
made even clearer in the docs), so 3rd party packages will adapt
to this once 3.10 is out.

--

___
Python tracker 

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



[issue44030] Markup with_traceback code example

2021-05-05 Thread Miguel Brito


Miguel Brito  added the comment:

If we make it a code snippet it works. Just adding a `::` after the paragraph.

Here's a print on Firefox locally: https://imgur.com/a/g2vsqf2

I created a PR for that if you think it's a good solution, feel free to merge :)

--

___
Python tracker 

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



[issue44030] Markup with_traceback code example

2021-05-05 Thread Miguel Brito


Change by Miguel Brito :


--
keywords: +patch
nosy: +miguendes
nosy_count: 2.0 -> 3.0
pull_requests: +24596
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25929

___
Python tracker 

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



[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-05-05 Thread Mateusz Loskot


Change by Mateusz Loskot :


--
nosy: +mloskot

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44051] Virtualalloc wrong return type

2021-05-05 Thread Steve Dower


Steve Dower  added the comment:

The return type of a ctypes function is set by whoever is accessing it. If that 
is you, then you should do:

ctypes.windll.kernel32.VirtualAlloc.restype = ctypes.c_void_p

If it's not you, can you point out which code is getting this wrong? ctypes 
defaults to 32-bit int by default because that's what C does, and it has no 
knowledge of the function you're calling to do anything different.

--

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Steve Dower


Steve Dower  added the comment:

>> The best option for restricting the import while still having it be a Python
>> import is to find the file (if it's present in the expected location under
>> sys.whatever), and then use importlib to import it:
>> https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
>
> Right, though that requires also a new import, importlib, which may not be
> optimal. Considering that this module is meant to be private and basically all
> other private importable parts of Python suffer from the same issue, I am
> finding it hard to justify. If there's enough consensus that this approach 
> would
> be better, I am more than happy to change the implementation.

Another alternative would be to convert sysconfig into a directory and make the 
vendor patch a submodule. That's _very slightly_ more impactful for the 
unpatched case, but only really for scenarios where people are trying to do 
things they shouldn't. Or we can include the file in all distros and import it 
earlier (before taking environment variables, etc. into account).

In my opinion, the security implications alone suggest we shouldn't be 
importing this by name without knowing where it is coming from.

>> I'd rather not have a new option here, I would much prefer "-S" in this
>> context to mean "run Python with only core libraries" and "-s" to mean "run
>> Python with only core and distro libraries" (and neither to mean "run Python
>> with core, distro and user libraries").
>
> I don't think having an option to start Python with only the vendor modules
> would be *necessary*, though it would certainly be helpful. Among other 
> things,
> it would be super helpful to be able to tell users to run Python with the -D
> (made up) option to isolate issues with the vendor modules and the user Python
> environment.

But the user can already exclude their user-installed packages with -s, right? 
It's the site-installed packages that would require -S, but that also excludes 
vendor modules.

Why do we encourage users to install site-wide packages using pip? Why is it 
such an important scenario for a distro-provided Python to be able to modify 
its global install using non-distro-provided tools and non-distro-provided 
packages? What's wrong with saying "install for --user", or else "apt install 
some-different-python-bundle" first and use that?

(To be clear, I'm framing these as confrontational questions to help my 
understanding. I'm totally willing to accept an answer of "just because", 
provided whoever is giving that answer actually "owns" dealing with the 
fallout.)

--

___
Python tracker 

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



[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Paul


Paul  added the comment:

*** Again, I am using a LOCAL ADMINISTRATIVE account. ***

"Actually behind the scenes, winreg uses win32api which doesn't allow setting 
HKEY_LOCAL_MACHINE keys for unprivileged users. Running the application in 
admin mode may work because at that point your application  getting admin 
privileges but it also may not work because winreg module may not gain admin 
privileges even though your application does."

That is not correct.  What special permissions do I need to leverage winreg to 
write to HKEY_LOCAL_MACHINE that a normal local administrator does not have?  
By default, any user that has adequate permissions to write / modify directly 
to their HKCU hive, can also do so in HKEY_LOCAL_MACHINE.  The only isolated 
exceptions are where there are specialized keys in which custom permissions 
were modified outside the default inherited permissions.  To be clear, there is 
no "admin mode", but I think what you mean is being logged in either with local 
Administrator account, or logged in with an account that has local 
Administrator permissions.  (You can either be logged in as Administrator, or 
have an account that has local admin privileges, both of which I am doing when 
I am executing winreg methods that fail with permission errors.)

"When you run regedit you get an admin pop up, right? Like that also run python 
in admin mode."

No, there is no pop up.  The reason there is no pop up is because as explained 
previously, my account has local administrative permissions, and secondly, I 
have UAC turned off.  I can freely make changes directly to the Registry in any 
hive, including HKEY_LOCAL_MACHINE.  This is NOT a permissions issue in the 
Registry and / or with the user account I am using.  If there is a permission 
issue do to a lack of proper winreg security flag, then that is different, and 
I need to understand which winreg security flag(s) I SHOULD be using so I can 
correct it.   You don't want popups, especially for processes you want to run 
automatically and unattended, right?  If there was a pop up during an attempted 
change to the Registry, then any methods used would otherwise not have a chance 
to execute correctly, and any application doing this would obviously break.

"I've never used C# but as far as I know it doesn't use win32api while Python 
does. C# is specifically designed to work with these while C is not therefore 
it uses win32api. Python uses the C interface of win32api."

Actually, C++ and C# uses Win32 API through .NET framework, while also allows 
even more intimate and direct connection to Win32 (both in managed and 
unmanaged interfaces).  Obviously, due to the differences of outcomes, while 
the interfaces winreg is using to access the Registry are similar, apparently 
they are quite different, as I can run equivalent Registry functions in C# with 
C++ Win32 API, and it runs just fine.  Again, no permission issues at all.

"Please provide an example that does not involve setting of values (I actually 
don't want to mess with my registry). If this is occurring while setting of 
values then I am on right track. If it's not then this requires quite a 
investigation and debugging. "

No, you are not on track yet.  How can you test a defect in winreg of writing 
to HKEY_LOCAL_MACHINE without actually trying to write to it?  You can't, and 
you are not even investigating it yet.  

If you are not going to leverage the examples provided, then how are you going 
to learn about this winreg defect? If you don't like the Registry values in the 
examples, then simply change them to something you are more comfortable with 
that is equally as innocuous as my examples, as long as you use HKCU on one, 
and run the exact same one pointed to HKLM, so that you can very quickly and 
easily see for yourself, and reproduce this defect.  If your account 
permissions are set up correctly and mine are not, then BOTH examples I gave 
you should execute and write Registry settings to both HKCU and HKLM, without 
any errors.

After running into this issue and reviewing documentation all over again, I 
also see a pattern that every example out there only uses HKCU hive, while 
there are zero working examples that demonstrate writing to the Registry in the 
HKEY_LOCAL_MACHINE. This no longer appears to be just a coincidence, but 
instead a limitation.  While HKCU is quite common for user-specific Registry 
settings, HKLM is very heavily used for nearly everything that is not 
user-specific settings.  For winreg not being able to write to HKLM hive 
successfully, regardless if the user is a local admin and has inherited admin 
privileges to HKLM even by default, then this is a major bug and a huge 
limitation to winreg that someone should investigate and implement a solution.  
  

Also, if you are not going to run the examples I provided (even with your own 
Registry values you are comfortable with), then provide ONE working example of 
writing to Registry with 

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Mike: There may be multiple ways to read that WHATWG recommendation?  The 
linked to section is about implementing a state machine for parsing a URL into 
parts safely.  But that may not imply that anything that passed through that 
state machine should be considered "valid".  Just that this spec is able to 
make some sense out of otherwise messy data.  Network adage: Be lenient in what 
you accept.  I doubt anyone would want something producing URLs for consumption 
by something else to allow these in their output.

I have yet to read the _entire_ WHATWG spec from head to toe to try and better 
understand the context they had in mind.

I agree that it is unfortunate that the original URL may have these issues and 
go on to be (re)used in another context where it passes to something that might 
not treat it in the same manner.  That's in some sense a flaw in our API design 
that we allow string based URLs to be used in APIs rather than require them to 
have gone through a parsing sanitization step into a instance of a URL object 
(for example). API design like that is clearly out of scope for this issue. :)

Regardless my gut feeling is that we continue with the existing fix that remove 
the characters as we've already started releasing.  If we need to change our 
mind on how we've done that, so be it, we can, that'll show up in later patches.

--

___
Python tracker 

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



[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Eryk Sun


Eryk Sun  added the comment:

> There is no reason why a user should be able to write to 
> HKCU but not HKLM.  

Modifying system keys is limited to SYSTEM, administrators, and various 
privileged accounts and services such as TrustedInstaller. Standard users are 
not allowed to modify system keys.

> User is a local admin on the machine, and UAC is disabled as well. 

Please show the output from running the following:

import subprocess
import winreg

print(subprocess.check_output('whoami.exe /groups /fo list', text=True))

hkey = winreg.HKEY_LOCAL_MACHINE
winreg.OpenKey(hkey, 'SOFTWARE', 0, winreg.KEY_ALL_ACCESS)

If it shows that the administrators group is enabled but full access is still 
denied to the system "SOFTWARE" hive, then something peculiar is happening here 
that warrants further inspection.

---

Background

The base object type that implements the registry is the Key type. A key object 
can contain other keys and values, or a symbolic link to another key. A key can 
also be mounted by a hive, which is a tree of keys that's persisted in a file.

The root key is named "\REGISTRY". The system mounts user profile hives (i.e. 
"\NTUSER.DAT") on subkeys of "\REGISTRY\USER" and system hives on 
subkeys of "\REGISTRY\MACHINE". Each loaded user profile hive is mounted on a 
subkey that's named for the user's SID string -- e.g. 
"\REGISTRY\USER\S-1-5-21--", except the default user 
profile hive is mounted as "\REGISTRY\USER\.DEFAULT". The mounted system hives 
include BCD (boot configuration database), SYSTEM, SOFTWARE, SECURITY, 
and SAM. The system hives, with the exception of the BCD hive, are found on 
disk in the directory "%SystemRoot%\System32\config". 

The "\REGISTRY\USER" and "\REGISTRY\MACHINE" keys are made available via the 
predefined handles HKEY_USERS and HKEY_LOCAL_MACHINE. These predefined handles 
can also reference the "USER" and "MACHINE" keys on a remote system via 
winreg.ConnectRegistry(). In the local case, the API maps the predefined handle 
to an actual handle that it opens via NtOpenKeyEx(). In the remote case, the 
predefined handle is mapped to an RPC (remote procedure call) handle that 
proxies a handle on the remote system.

HKEY_CURRENT_USER is a predefined handle for the user profile key of the 
current user. It exists for convenience. Otherwise a program would have to get 
the name of the subkey to use by getting the current user's SID as a string.

The predefined handles that are documented to work with ConnectRegistry() are 
HKEY_USERS, HKEY_LOCAL_MACHINE, and HKEY_PERFORMANCE_DATA (a virtual key that 
the API implements) [1]. ConnectRegistry() is not documented to support 
HKEY_CURRENT_USER. For a remote system, it opens the default profile. This is 
undefined behavior for an unsupported parameter. It happens to work in the 
local case when computer_name is None.

A key object is secured by a security descriptor that grants or denies specific 
users and groups various standard rights and specific key rights. winreg 
provides the API constants for specific key rights, as well as constants with 
mapped rights for generic access, including KEY_READ, KEY_WRITE, KEY_EXECUTE, 
and KEY_ALL_ACCESS. These are defined as follows:

STANDARD_RIGHTS_REQUIRED:
WRITE_OWNER
WRITE_DAC
READ_CONTROL
DELETE

KEY_READ / KEY_EXECUTE:
KEY_QUERY_VALUE
KEY_ENUMERATE_SUB_KEYS
KEY_NOTIFY
READ_CONTROL

KEY_WRITE:
KEY_SET_VALUE
KEY_CREATE_SUB_KEY
READ_CONTROL

KEY_ALL_ACCESS:
KEY_READ
KEY_WRITE
KEY_CREATE_LINK
STANDARD_RIGHTS_REQUIRED

>From the command line, you can use Sysinternals "accesschk.exe" to check the 
>access that a key grants to a particular user or group, such as the "Users" 
>group. For example:

C:\>accesschk -nobanner -kdv Users "HKLM\SOFTWARE\Microsoft\Windows 
NT\CurrentVersion\Winlogon"
R  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
KEY_QUERY_VALUE
KEY_ENUMERATE_SUB_KEYS
KEY_NOTIFY
READ_CONTROL

Standard users are only granted read access to the "Winlogon" key. Full access 
is granted to administrators, SYSTEM, and the TrustedInstaller service. 

By default, if UAC is enabled, an administrator uses a non-elevated logon that 
has the administrators group disabled for everything except denying access to 
objects. Spawning a process with "run as administrator" uses an elevated logon 
that enables the administrators group for granting access to secured objects.

---

[1] 
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regconnectregistryw

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The bug: Our http client can get stuck infinitely reading len(line) < 64k lines 
after receiving a '100 Continue' http response.  So yes, this could lead to our 
client being a bandwidth sink for anyone in control of a server.

Clear issue: That's a denial of network bandwidth and the denial of service in 
terms of CPU needed to process read and skip such lines.  The infinite lines 
are size bounded and are not buffered so there is no memory based DoS.

Maybe issue: If a the underlying socket has a timeout set on it, it can be used 
to prevent the timeout from triggering by sending a line more often than the 
timeout.  this is a denial of service by making a http client connection that 
an author may have assumed would timeout based on their 
socket.setdefaulttimeout() settings hang forever.

I expect there are plenty of other ways to accomplish the latter in our http 
client code though.  Ex: A regular response with a huge content length where 
one byte is transmitted occasionally could also effectively accomplish that.  
The stdlib http stack doesn't have its own overall http transaction timeout as 
a feature.

--

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
title: "urllib" will result to deny of service -> urllib http client possible 
infinite loop on a 100 Continue response
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue40617] sqlite3: expose sqlite3_create_window_function

2021-05-05 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add create_window_function() to sqlite3.Connection

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As described above in msg392163, the other fix is to put the prompt on a line 
by itself.  I hoped to get a switch between fixes into b1 but ran out of time 
and energy.  I intend to have in in the next, along with other improvements.

--

___
Python tracker 

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



[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> eric.snow
nosy: +eric.snow

___
Python tracker 

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



[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
dependencies: +unaligned memory access in the _sha3 extension

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +24594
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25927

___
Python tracker 

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



[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> I can also add, modify, and delete Registry entries in HKLM (or any other 
> hive) by hand with no problem, so it is definitely not a permissions issue.

When you run regedit you get an admin pop up, right? Like that also run python 
in admin mode.

> I can also write, update, modify, etc. anything in HKLM using C# just fine, 
> but NOT with winreg in Python.  

I've never used C# but as far as I know it doesn't use win32api while Python 
does. C# is specifically designed to work with these while C is not therefore 
it uses win32api. Python uses the C interface of win32api. 

> Keep in mind that the exact same Registry write methods work as long as you 
> are pointed to HKCU hive. However, if you point to HKLM and do not change 
> anything else, winreg will throw a permissions error every time, no matter 
> what combination of permission flags you specify.
> You will be able to reproduce and see the problem if you try the two examples 
> I provided.  Have you tried the two code snippets I provided yet?  Please do 
> so, and confirm the outcome so that you are on the same page.

Please provide an example that does not involve setting of values (I actually 
don't want to mess with my registry). If this is occurring while setting of 
values then I am on right track. If it's not then this requires quite a 
investigation and debugging. 


Lastly a WinError always means Access Denied. AFAICT this is a permission 
problem.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Mike Lissner


Mike Lissner  added the comment:

> I'd wonder how to pass through valid exceptions without urlparse raising 
> something.

Oops, meant to say "valid URLs", not valid exceptions, sorry.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Mike Lissner


Mike Lissner  added the comment:

> Instead of the patches as you see them, we could've raised an exception.

In my mind the definition of a valid URL is what browsers recognize. They're 
moving towards the WHATWG definition, and so too must we. 

If we make python raise an exception when a URL has a newline in the scheme 
(e..g: "htt\np"), we'd be raising exceptions for *valid* URLs as browsers 
define them. That doesn't seem right at all to me. I'd be frustrated to have to 
catch such an exception, and I'd wonder how to pass through valid exceptions 
without urlparse raising something.


> Making the output 'sanitized' means that invalid input is converted into 
> valid output.  This goes against the principle of least surprise.

Well, not quite, right? The URLs this fixes *are* valid according to browsers. 
Browsers say these tabs and newlines are OK. 



I agree though that there's an issue with the approach of stripping input in a 
way that affects output. That doesn't seem right. 

I think the solution I'd favor (and I imagine what's coming in 43883) is to do 
this properly so that newlines are preserved in the output, but so that the 
scheme is also placed properly in the scheme attribute. 

So instead of this (from the initial report):

> In [9]: from urllib.parse import urlsplit
> In [10]: urlsplit("java\nscript:alert('bad')")
> Out[10]: SplitResult(scheme='', netloc='', path="java\nscript:alert('bad')", 
> query='', fragment='')

We get something like this:

> In [10]: urlsplit("java\nscript:alert('bad')")
> Out[10]: SplitResult(scheme='java\nscript', netloc='', path="alert('bad')", 
> query='', fragment='')

In other words, keep the funky characters and parse properly.

--

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

that patch looks fine, i'll turn it into a PR.

--
assignee: christian.heimes -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> christian.heimes
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



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

2021-05-05 Thread miss-islington


miss-islington  added the comment:


New changeset 8f3ef457ad286e73f272dadec8b98d2ea3a6ec72 by Miss Islington (bot) 
in branch '3.10':
bpo-43795: Mark PyCodec_Unregister as a function, not data, in stable ABI 
(GH-25920)
https://github.com/python/cpython/commit/8f3ef457ad286e73f272dadec8b98d2ea3a6ec72


--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks Florian!  Indeed, I'm glad you have tests for this.  (I expect anyone 
writing their own validation code will have such tests)

Making urlsplit raise an exception where it never has before has other 
consequences:

In CPython's own test suite test_urllib fails as many of its tests for 
validation that these characters are either ignored or cause a specific 
http.client.InvalidURL error on urlopen() start failing.  I draw no conclusions 
from that other than we'd need to rework some of those tests.  It just reflects 
the state of our test suite and even inconsistent behavior between excluding 
the characters or erroring within the http.client code on them based on past 
CVEs.

Regardless, if people would people prefer to see urlsplit `raise 
SomeExistingException(f'Invalid characters in URL or scheme. url={url!r} 
scheme={scheme!r}')` in 3.9.6 and the security patch releases for other 3.x 
versions, evidence that it wouldn't cause alternate problems would be helpful.

I've kicked off tests at work on our huge codebase with both variants as a 
datapoint to see if that is informative or not.

If we went the exception route: SomeExistingException might make sense as 
`http.client.InvalidURL`, but that'd be a circular dependency (no big deal) and 
heavyweight import for urllib.parse to have.  `urllib.error.URLError` could 
also make sense, but that's an OSError descendant and identifies itself as a 
urlopen error which would be surprising.  `ValueError` is a reasonable 
fallback.  But using that guarantees someone will wonder why it isn't one of 
the other two...  As this is a bugfix, defining a new exception isn't an option.

We as a community currently lack a way for security patches to CPython to be 
tested against a broad swath of projects in advance of them appearing in a 
release.  Once upon a time there were release candidates for patches releases 
that could serve this purpose...

--

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Is it possible to add a Settings option under the General tab to switch between 
the sidebar mode and traditional mode?

--

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

Fixed in 3.10 and 3.11, thanks Albert for your patch.

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

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 10d6f6bfd749c0e7da51a96f53ca326c336f7a00 by Miss Islington (bot) 
in branch '3.10':
bpo-35753: Fix crash in doctest with unwrap-able functions (GH-22981) (#25926)
https://github.com/python/cpython/commit/10d6f6bfd749c0e7da51a96f53ca326c336f7a00


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Filipe Laíns

Filipe Laíns  added the comment:

That always depends on the way distros patch Python, though all the major 
distros I know will add their schemes to sysconfig, which works what that 
approach. But yeah, that is what you probably want to be doing :)

--

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2021-05-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



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

2021-05-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24590
pull_request: https://github.com/python/cpython/pull/25923

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24591
pull_request: https://github.com/python/cpython/pull/25924

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 515a7bc4e13645d0945b46a8e1d9102b918cd407 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-43882 - urllib.parse should sanitize urls containing ASCII newline 
and tabs. (GH-25595) (#25726)
https://github.com/python/cpython/commit/515a7bc4e13645d0945b46a8e1d9102b918cd407


--

___
Python tracker 

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



[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Paul


Paul  added the comment:

Clarification:
User is a local admin on the machine, and UAC is disabled as well.  I can also 
add, modify, and delete Registry entries in HKLM (or any other hive) by hand 
with no problem, so it is definitely not a permissions issue.  I can also 
write, update, modify, etc. anything in HKLM using C# just fine, but NOT with 
winreg in Python.  

Note:  Keep in mind that the exact same Registry write methods work as long as 
you are pointed to HKCU hive. However, if you point to HKLM and do not change 
anything else, winreg will throw a permissions error every time, no matter what 
combination of permission flags you specify.  There is no reason why a user 
should be able to write to HKCU but not HKLM.  Try it and you will experience 
the same.  This is clearly a major bug and should be fixed.  It severely limits 
developers from writing to other Registry hives.  While HKCU is quite common to 
use, HKLM is the most common that developers use, especially when you don't 
want specific Registry keys to be accessible only to a specific user.

You will be able to reproduce and see the problem if you try the two examples I 
provided.  Have you tried the two code snippets I provided yet?  Please do so, 
and confirm the outcome so that you are on the same page.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
pull_requests: +24589
pull_request: https://github.com/python/cpython/pull/25921

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

Alright so to get all the package paths, included distro-managed ones would be 
this right?

for scheme in sysconfig.get_scheme_names():
 for name in ['purelib', 'platlib']:
  sysconfig.get_path(name, scheme)

--

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-05 Thread Filipe Laíns

Filipe Laíns  added the comment:

We cannot change how `sudo pip install` fundamentally works because there are 
too many people depending on it, and even if we could, this is not the place :P

I think we went a little off-topic here, so let's get back to the discussion.

> The best option for restricting the import while still having it be a Python 
> import is to find the file (if it's present in the expected location under 
> sys.whatever), and then use importlib to import it: 
> https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly

Right, though that requires also a new import, importlib, which may not be 
optimal. Considering that this module is meant to be private and basically all 
other private importable parts of Python suffer from the same issue, I am 
finding it hard to justify. If there's enough consensus that this approach 
would be better, I am more than happy to change the implementation.

> I'd rather not have a new option here, I would much prefer "-S" in this 
> context to mean "run Python with only core libraries" and "-s" to mean "run 
> Python with only core and distro libraries" (and neither to mean "run Python 
> with core, distro and user libraries").

I don't think having an option to start Python with only the vendor modules 
would be *necessary*, though it would certainly be helpful. Among other things, 
it would be super helpful to be able to tell users to run Python with the -D 
(made up) option to isolate issues with the vendor modules and the user Python 
environment.

> That may be a bigger change, but there's enough angst around this issue that 
> we would be better off getting it right this time, even if it changes things, 
> than continuing to preserve the system that people dislike so much.

This may be completely wrong for other people, but is my understanding. AFAIK 
those these issues come from lack of separation between the distro, system and 
user environments, causing a hell of conflicts and silent module shadowing that 
neither the system package manager or pip can fix. Almost every time I help 
people with Python I have to tell them to use a virtual env, which most people 
aren't expecting, and would likely run into issues had I not suggested it.
Considering that, I think this approach, including the CLI option, would be a 
step forward. How big would that step be, I am not sure, but probably not 
*that* big.

But yeah, this is, of course, my experience, and that can vary for other 
people, so there may be different perspectives here. So I'd very much like to 
hear other people on this.

--

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Filipe Laíns

Filipe Laíns  added the comment:

If you are relying on the value of distutils.sysconfig.get_python_lib() as you 
shown in your system, you probably don't want to. That directory 
(dist-packages) should be for Debian provided packages only, so moving to 
sysconfig.get_path() would be a good thing, as it has the correct value for 
user installed packages on your system.

But anyway, there have been introduced mechanisms that should allow distros to 
deal with these issues. The goal is to make it so that distros can officially 
customize such details and not have to rely on heavy patching.

--

___
Python tracker 

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



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

2021-05-05 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +24588
pull_request: https://github.com/python/cpython/pull/25920

___
Python tracker 

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



[issue44017] Deprecation warning in tests over no current event loop

2021-05-05 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue44017] Deprecation warning in tests over no current event loop

2021-05-05 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
nosy: +corona10
nosy_count: 5.0 -> 6.0
pull_requests: +24587
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25918

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

That seems fine, tho for some of distros that do lots of python customizations 
(tried the docker ubuntu image for 18.04.3) it get a bit strange:

Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> import distutils.sysconfig
>>> sysconfig.get_path('platlib')
'/usr/lib/python3.6/site-packages'
>>> sysconfig.get_path('purelib')
'/usr/lib/python3.6/site-packages'
>>> distutils.sysconfig.get_python_lib()
'/usr/lib/python3/dist-packages'

--

___
Python tracker 

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



[issue44051] Virtualalloc wrong return type

2021-05-05 Thread baptistecrepin


New submission from baptistecrepin :

The ctypes.windll.kernel32.VirtuAlloc function return by default a 
ctypes.c_long but on 64bits systems memory addresses can be higher so it should 
be a ctypes.c_uint64 or ctypes.c_void_p.

--

___
Python tracker 

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



[issue44051] Virtualalloc wrong return type

2021-05-05 Thread baptistecrepin


Change by baptistecrepin :


--
components: Windows
nosy: baptistecrepin, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Virtualalloc wrong return type
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Filipe Laíns

Filipe Laíns  added the comment:

I believe sysconfig.get_path('purelib') and sysconfig.get_path('platlib') 
should work for you.

> sysconfig.get_path('purelib')
/usr/lib/python3.9/site-packages
> sysconfig.get_path('platlib')
/usr/lib/python3.9/site-packages

(here it's the same path, but it is not guaranteed to be)

--

___
Python tracker 

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



[issue41282] Deprecate and remove distutils

2021-05-05 Thread Ionel Cristian Mărieș

Ionel Cristian Mărieș  added the comment:

Hello everyone, 

How are we supposed to use get_python_lib now (a function that returned the 
site-packages location)?

`from setuptools._distutils.sysconfig import get_python_lib` doesn't really 
seem like the right solution and the sysconfig stdlib module doesn't have any 
get_python_lib function.

--
nosy: +ionelmc

___
Python tracker 

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



[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Christian, could you look into that patch?

--

___
Python tracker 

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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-05-05 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

The errors are occurring because the code before these commits checked whether 
those algorithms were present or not. If an algorithm was not present it was 
not tested. The new code doesn't check and therefore if even one of the 
algorithm modules are not present raises an error.

--
nosy: +shreyanavigyan

___
Python tracker 

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



[issue43977] Implement the latest semantics for PEP 634 for matching collections

2021-05-05 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 2.0 -> 3.0
pull_requests: +24586
pull_request: https://github.com/python/cpython/pull/25917

___
Python tracker 

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



[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-05 Thread Brad Larsen


Brad Larsen  added the comment:

> Just curious, how did you find this?

I am working on some new CodeQL queries 
(https://securitylab.github.com/tools/codeql/) and saw a warning about this 
self-assignment from one of the existing queries.

LGTM apparently regularly scans cpython: 
https://lgtm.com/projects/g/python/cpython

Thanks for the quick review.

--

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-05 Thread Andre Roberge


Change by Andre Roberge :


--
nosy: +aroberge

___
Python tracker 

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



[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Ken Jin


Change by Ken Jin :


--
keywords: +3.9regression
nosy: +christian.heimes, lukasz.langa, vstinner

___
Python tracker 

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



[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Trygve Aaberge


Trygve Aaberge  added the comment:

And here are the bug reports for two Python scripts that are affected by this 
issue:
https://github.com/wee-slack/wee-slack/issues/812
https://github.com/poljar/weechat-matrix/issues/248

--

___
Python tracker 

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



[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Trygve Aaberge


Trygve Aaberge  added the comment:

Here is the Python script that the C program to reproduce the issue runs.

--
Added file: https://bugs.python.org/file50016/subinterpreter_ssl_issue.py

___
Python tracker 

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



[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Trygve Aaberge


New submission from Trygve Aaberge :

This issue is a regression in Python 3.9. It was recently fixed in main/3.10, 
but I'm opening this issue to request that it is fixed in 3.9 as well since it 
breaks certain Python scripts running in WeeChat.

I have a C application which is using the Python/C API and is running multiple 
python subinterpreters. One of those subinterpreters is running a script which 
is reading data from a non-blocking ssl socket. When there is no more data to 
read, trying to read throws `ssl.SSLWantReadError` which is handled by the 
script. However, if a script in another subinterpreter imports _ssl, the 
SSLWantReadError exceptions thrown in the first script now have a different 
class instance, so they are not catched anymore.

This is a regression in 3.9. It didn't happen in 3.8. The commit that 
introduced the issue is 
https://github.com/python/cpython/commit/82c83bd907409c287a5bd0d0f4598f2c0538f34d
The commit that fixes the issue in 3.10 is 
https://github.com/python/cpython/commit/7f1305ef9ea7234e1a5aacbea17490232e9b7dc2

I have attached a C program to reproduce the issue. It seems I can only attach 
one file per comment, so the python script that program runs will follow in the 
next commit. It connects to an ssl socket, so you need to have that running 
first. That can be started by running this:

```
openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -days 
365 -subj '/'
openssl s_server -key key.pem -cert cert.pem -accept 1234
```

The script will output this when the issue is not present (so in 3.8 and main):
```
no data
no data
```

And this when the issue is present (in 3.9):
```
no dataunknown error: The operation did not complete (read) (_ssl.c:2627)
exception name: SSLWantReadError
SSLWantReadError id: 93893206532320
exception id: 93893207118800
```

--
components: Subinterpreters
files: interpreter.c
messages: 393011
nosy: trygveaa
priority: normal
severity: normal
status: open
title: Exceptions in a subinterpreter are changed by another subinterpreter
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50015/interpreter.c

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-05-05 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Anthony Sottile


Anthony Sottile  added the comment:

oddly enough, when I add `-X faulthandler` it passes

___

I did some research on the error message and it looks like the ubuntu 
maintainers have found the same thing and reported it here:

https://bugs.python.org/issue36445

this points at (intentional?) misaligned accesses being a problem on arm

looks like they've provided a patch as well here: 
https://bugs.python.org/issue36515

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Florian Apolloner

Florian Apolloner  added the comment:

Thank you for the kind words Michał. We (Django) are exactly in the position 
that you describe. Our validation, at least for now has to stay strict, exactly 
to prevent fallout further down the road (see 
https://github.com/django/django/pull/14349#pullrequestreview-652022529 for 
details).

Sure, we might have been a bit naive when relying on urllib.parse for parts of 
our validation routines, but this is why we have tests for this behavior. We 
can easily work around this fix and will issue a release shortly to prevent 
security issues for users on newer Python versions. But no matter how the 
Python code ends up in the long run, our validator (at least this specific 
class) cannot simply accept new URLs because a spec changed. We owe it to our 
users to keep in mind that relaxing the validation can cause other issues down 
the road.

--
nosy: +apollo13

___
Python tracker 

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



[issue44049] Use C99 Variable-length array if possible

2021-05-05 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue44049] Use C99 Variable-length array if possible

2021-05-05 Thread Dong-hee Na


Change by Dong-hee Na :


--
resolution:  -> wont fix

___
Python tracker 

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



[issue44049] Use C99 Variable-length array if possible

2021-05-05 Thread Dong-hee Na


Dong-hee Na  added the comment:

> Also, on a minor note, we use a restricted set of c99 supported by all 
> compilers so we would need to check if this is supported in all of them

Ah, I notice that msvc does not support VLA (Sorry, I am not using Windows 
machine for 5 years +)
Using a C99/C11 features looks like a long future :(

--

___
Python tracker 

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



[issue44049] Use C99 Variable-length array if possible

2021-05-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the suggestion! Unfortunately I am not very convinced since we 
already have the self imposed limitation for the maximum size of the string 
(this is to limit the execution time and memory) so there is no point of 
allowing bigger buffers. Also consider that this may happen on threads where 
the stack is much much smaller, so we cannot allow arbitrary length arrays.

Also, on a minor note, we use a restricted set of c99 supported by all 
compilers so we would need to check if this is supported in all of them.

--

___
Python tracker 

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



[issue44024] Improve the TypeError message for non-string second arguments passed to the built-in functions getattr and hasattr

2021-05-05 Thread Géry

Change by Géry :


--
title: Improve the error message for non-string second arguments passed to the 
built-in functions getattr and hasattr -> Improve the TypeError message for 
non-string second arguments passed to the built-in functions getattr and hasattr

___
Python tracker 

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



[issue44049] Use C99 Variable-length array if possible

2021-05-05 Thread Dong-hee Na


New submission from Dong-hee Na :

I had a chance to read Python/suggestion.c and I can notice that we use the 
static declared size of the array.

Since we live in the C99 era and the CPython codebase already uses C99(struct 
initialization is a good example), how about using the C99 feature if possible.

We should care about stack overflow from the big input but with the expected 
very small input size it will be okay to use.

-static size_t buffer[MAX_STRING_SIZE];
-
 // Both strings are the same (by identity)
 if (a == b) {
 return 0;
@@ -68,6 +66,8 @@ levenshtein_distance(const char *a, size_t a_size,
 size_t t_size = a_size; a_size = b_size; b_size = t_size;
 }

+size_t buffer[a_size];
+
 // quick fail when a match is impossible.
 if ((b_size - a_size) * MOVE_COST > max_cost) {
 return max_cost + 1

--
messages: 393006
nosy: corona10, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: Use C99 Variable-length array if possible
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



[issue44022] "urllib" will result to deny of service

2021-05-05 Thread Gen Xu


Gen Xu  added the comment:

Looks like it is caused by the httplib not limiting total header size after 
receiving 100. Added a counter for that to be same size as _MAXLINE=65536.

--
versions:  -Python 3.7

___
Python tracker 

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



[issue44022] "urllib" will result to deny of service

2021-05-05 Thread Gen Xu


Gen Xu  added the comment:

Added a possible PR. Review will be appreicated.

--

___
Python tracker 

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



[issue44022] "urllib" will result to deny of service

2021-05-05 Thread Gen Xu


Change by Gen Xu :


--
keywords: +patch
nosy: +gen-xu
nosy_count: 1.0 -> 2.0
pull_requests: +24585
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25916

___
Python tracker 

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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-05-05 Thread Charalampos Stratakis


New submission from Charalampos Stratakis :

The buildbot started experiencing some failures. First after 
https://github.com/python/cpython/commit/ddbef71a2c166a5d5dd168e26493973053a953d6
 this test started failing with:

==
ERROR: test_disallow_instantiation (test.test_hashlib.HashLibTestCase)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 160, in __hash_new
return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py",
 line 912, in test_disallow_instantiation
h = constructor()
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py",
 line 133, in _test_algorithm_via_hashlib_new
return hashlib.new(_alg, **kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 166, in __hash_new
return __get_builtin_constructor(name)(data)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 123, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5


And then after 
https://github.com/python/cpython/commit/91554e4c5ca3c762998296522f854a7166ba84f0
 there is another failure:

==
ERROR: test_readonly_types (test.test_hashlib.HashLibTestCase)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 160, in __hash_new
return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py",
 line 933, in test_readonly_types
hash_type = type(constructor())
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py",
 line 133, in _test_algorithm_via_hashlib_new
return hashlib.new(_alg, **kwargs)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 166, in __hash_new
return __get_builtin_constructor(name)(data)
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py",
 line 123, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5

--
assignee: christian.heimes
components: SSL
messages: 393003
nosy: christian.heimes, cstratak
priority: normal
severity: normal
status: open
title: test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" 
buildbot
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



[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2021-05-05 Thread Irit Katriel


Irit Katriel  added the comment:

This was fixed in 3.9+ and 3.8 is in security fix now, so closing.

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



[issue44047] [sqlite3] remove unused argument from _pysqlite_seterror()

2021-05-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue44047] [sqlite3] remove unused argument from _pysqlite_seterror()

2021-05-05 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

Suggesting to remove the statement pointer argument from _pysqlite_seterror(), 
as it has been unused since commit 525269430a3f9fbb7287e4bb6b365ac216004980.

--
components: Extension Modules
messages: 393001
nosy: berker.peksag, erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] remove unused argument from _pysqlite_seterror()
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



[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Miro Hrončok

Miro Hrončok  added the comment:

In Fedora, our build passed on Fedoras 32, 33, 34, 35.

We have:

F32: gcc 10.2.1, openssl 1.1.1k
F33: gcc 10.3.1, openssl 1.1.1k
F34: gcc 11.1.1, openssl 1.1.1k
F35: gcc 11.1.1, openssl 1.1.1k

Let me know how can I help to debug the difference in environment more.

--
nosy: +hroncok

___
Python tracker 

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



[issue41756] Do not always use exceptions to return result from coroutine

2021-05-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



  1   2   >