[issue1353] mp4 missing from mimetypes.py

2007-10-29 Thread Jacob

New submission from Jacob:

mp4 is missing from the mimetypes.py list of valid mimetypes. mp4 is 
registered with IANA and is defined in the mpeg-4 standard as a container 
for mpeg-4 codecs such as h264. Lack of this definition means the format 
cannot be recognised by software dependsing on the mimetypes modules, that 
don't use one of the suggested local mime definitions (OpenBSD).

--
components: Library (Lib)
files: mimetypes.py.patch
messages: 56900
nosy: kraft
severity: normal
status: open
title: mp4 missing from mimetypes.py
type: rfe
versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, 
Python 2.2.3, Python 2.3, Python 2.4, Python 2.5
Added file: http://bugs.python.org/file8649/mimetypes.py.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1353>
__--- mimetypes.py.orig   Mon Oct 29 23:47:08 2007
+++ mimetypes.pyMon Oct 29 23:19:05 2007
@@ -391,6 +391,7 @@
 '.movie'  : 'video/x-sgi-movie',
 '.mp2': 'audio/mpeg',
 '.mp3': 'audio/mpeg',
+'.mp4': 'video/mp4',
 '.mpa': 'video/mpeg',
 '.mpe': 'video/mpeg',
 '.mpeg'   : 'video/mpeg',
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2008-09-16 Thread Jacob

New submission from Jacob <[EMAIL PROTECTED]>:

Hello.

I run Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on Windows Vista
Home Premium.
IDLE won't start if not installed in the default directory.
When insalled in a custom directory, running idle.py
(\Lib\idlelib\idle.py) produces this error:

"Traceback (most recent call last):
File "C:\Programmer\Python\lib\idlelib\idle.py", line 21, in 
idlelib.PyShell.main()
File "C:\Programmer\Python\lib\idlelib\PyShell.py", line 1390, in main
root= Tk(className="Idle")
File "C:\Programmer\Python\lib\idlelib\Tkinter.py", line 1636, in
__init__ self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following
directories: {C:\Programmer\Python\tcl\tcl8.4}
{C:\Programmer\Python\tcl\tcl8.4} C:/Programmer/Python/tcl/tcl8.4
C:/Programmer/Python/lib/tcl8.4 C:/Programmer/Python/lib/tcl8.4
C:/lib/tcl8.4 C:/library C:/tcl8.4/library


This probable means that Tcl wasn't installed properly."

--
components: IDLE, Library (Lib), Windows
messages: 73301
nosy: kimsey0
severity: normal
status: open
title: IDLE won't start in custom directory.
type: crash
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2008-09-16 Thread Jacob

Jacob <[EMAIL PROTECTED]> added the comment:

No, nothing.
It's just a standart clean installation.

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-17 Thread Jacob

Jacob  added the comment:

I don't think it's just his machine (and mine), but i don't think so.
Unfortunealy, i don't have a Windows Vista key ready, else i'd have
testet it on a clean install, but i'll try to install the same package
on the next computer with Vista i stumple upon.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-17 Thread Jacob

Jacob  added the comment:

Okay, i'll try to find a key for Vista in all my drawers, and install a
clean version, try it, and then i'll tell you the result.
I just can't see what could produce the error at our computers.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-18 Thread Jacob

Jacob  added the comment:

I don't think thats the solution.
"C:\Program Files\Python\2.6\" and
"C:\Programas\Python\2.6\"
are the same, as "C:\Program Files\Python\2.6\" is a symbolic link to
"C:\Programas\Python\2.6\" to allow compatibility with different
operation system languages.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-18 Thread Jacob

Jacob  added the comment:

Great idea :)
Maybe we're starting to find the problem.
I'm using a Danish version of Windows Vista Home Premium SP1, and
C:\Programmer is the danish path for C:\Program Files.
I'll try that, and leave another message when i'we tried it.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-20 Thread Jacob

Jacob  added the comment:

Installing to C:\Program Files\Python\ worked.
Now we just have to find out WHY it doesn't work with the
C:\[Programmer/Programmas]\ to C:\Program Files\ link.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3881] IDLE won't start in custom directory.

2009-01-22 Thread Jacob

Jacob  added the comment:

Fantastic.
I started this post in October, and now we finaly found a solution.
Thank you Martin.
Will this patch be included in future versions of python?
Best regards, Jacob.

___
Python tracker 
<http://bugs.python.org/issue3881>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-23 Thread Jacob

New submission from Jacob:

This looks very related to: http://bugs.python.org/issue13829

I have very simple test code that looks like this:

import requests
r = requests.get('http://www.google.com')
print('requests.get() succeeded')

The above code works fine. However, when:

requests.get('http://www.google.com')

is run inside an rq Queue (redis queue) worker I see this problem.

Any fixes or known workarounds for this?




Process:   Python [34628]
Path:  
/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   3.4.3 (3.4.3)
Code Type: X86-64 (Native)
Parent Process:Python [34626]
Responsible:   Terminal [333]
User ID:   501

Date/Time: 2015-05-24 08:57:29.055 +0700
OS Version:Mac OS X 10.10.3 (14D136)
Report Version:11
Anonymous UUID:341D1B65-8C01-92A4-0CB5-DC7470E594BF

Sleep/Wake UUID:   5DCBEBD5-671C-48C9-8402-765FABE76C61

Time Awake Since Boot: 23 seconds
Time Since Wake:   4700 seconds

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x0110

VM Regions Near 0x110:
-->
__TEXT 000100239000-00010023b000 [8K] r-x/rwx 
SM=COW  
/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python

Application Specific Information:
*** multi-threaded process forked ***
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdispatch.dylib   0x7fff80f9616f 
_dispatch_async_f_slow + 395
1   com.apple.CoreFoundation0x7fff8c571541 
_CFPrefsWithDaemonConnection + 305
2   com.apple.CoreFoundation0x7fff8c540ac6 
__80-[CFPrefsSearchListSource 
generationCountFromListOfSources:count:allowFetching:]_block_invoke + 150
3   com.apple.CoreFoundation0x7fff8c5409d2 
-[CFPrefsSearchListSource 
generationCountFromListOfSources:count:allowFetching:] + 258
4   com.apple.CoreFoundation0x7fff8c3fcea5 
-[CFPrefsSearchListSource alreadylocked_copyDictionary] + 133
5   com.apple.CoreFoundation0x7fff8c3f7dba 
-[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 42
6   com.apple.CoreFoundation0x7fff8c57211c 
___CFPreferencesCopyAppValueWithContainer_block_invoke + 60
7   com.apple.CoreFoundation0x7fff8c53f979 
+[CFPrefsSearchListSource withSearchListForIdentifier:container:perform:] + 729
8   com.apple.CoreFoundation0x7fff8c572097 
_CFPreferencesCopyAppValueWithContainer + 183
9   com.apple.SystemConfiguration   0x7fff8c989dd4 
SCDynamicStoreCopyProxiesWithOptions + 153
10  _scproxy.so 0x000100fea8f2 get_proxy_settings + 
24
11  org.python.python   0x0001002e0c87 PyEval_EvalFrameEx + 
18047
12  org.python.python   0x0001002e3e8d fast_function + 203
13  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
14  org.python.python   0x0001002e3e8d fast_function + 203
15  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
16  org.python.python   0x0001002e3e8d fast_function + 203
17  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
18  org.python.python   0x0001002e3e8d fast_function + 203
19  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
20  org.python.python   0x0001002e3e8d fast_function + 203
21  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
22  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
23  org.python.python   0x00010026b562 function_call + 372
24  org.python.python   0x00010024b12e PyObject_Call + 103
25  org.python.python   0x0001002e12d5 PyEval_EvalFrameEx + 
19661
26  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
27  org.python.python   0x00010026b562 function_call + 372
28  org.python.python   0x00010024b12e PyObject_Call + 103
29  org.python.python   0x0001002e12d5 PyEval_EvalFrameEx + 
19661
30  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
31  org.python.python   0x0001002e3f03 fast_function + 321
32  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
33  org.python.python   0x0001002dc459 PyEval_EvalCod

[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-24 Thread Jacob

Jacob added the comment:

Thanks! That does work.

I'm concerned there may be unintended or undesired consequences of this.

Hope the bug gets fixed, but will use the workaround for now.

--

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



[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-10 Thread Jacob Hayes


Jacob Hayes  added the comment:

Thanks for the tips! I've been using this patch in my own code in a early 
imported `__init__.py`:

```
from graphlib import TopologicalSorter
from types import GenericAlias

if not hasattr(TopologicalSorter, "__class_getitem__"):  # pragma: no cover
TopologicalSorter.__class_getitem__ = classmethod(GenericAlias)  # type: 
ignore
```

Certainly a bit hacky, but aside from no-op on >=3.11 and satisfying mypy, it 
supports runtime type inspection via `get_type_hints` before 3.11 (which 
otherwise still errors for stringized versions). The stringized versions are 
probably a bit simpler/safer for most folks though :)

--

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



[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Jacob Nilsson


Change by Jacob Nilsson :


--
nosy: +ajoino

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



[issue46352] Steps To Do Arlo Setup

2022-01-11 Thread Jacob Martin


Change by Jacob Martin :


--
components: Installation
files: Arlo camera setup.jpg
nosy: jacobmartin717
priority: normal
severity: normal
status: open
title: Steps To Do Arlo Setup
type: security
versions: Python 3.8
Added file: https://bugs.python.org/file50558/Arlo camera setup.jpg

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



[issue46440] ArgumentParser.parse_args exits on missing required argument with exit_on_error=False

2022-01-23 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 1.0 -> 2.0
pull_requests: +29018
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30832

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



[issue41255] Argparse.parse_args exits on unrecognized option with exit_on_error=False

2022-01-28 Thread Jacob Walls


Change by Jacob Walls :


--
nosy: +jacobtylerwalls
nosy_count: 6.0 -> 7.0
pull_requests: +29183
pull_request: https://github.com/python/cpython/pull/30832

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



[issue41259] Find adverbs is not correct on the documentation

2022-02-04 Thread Jacob Walls


Jacob Walls  added the comment:

Fixed in PR 21420, suggest closing as fixed.

--
nosy: +jacobtylerwalls

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



[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2022-02-05 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 6.0 -> 7.0
pull_requests: +29326
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31149

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



[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-05 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 1.0 -> 2.0
pull_requests: +29329
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31152

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



[issue34191] argparse: Missing subparser error message should be more clear

2022-02-05 Thread Jacob Walls


Jacob Walls  added the comment:

Duplicate of issue29298 (fixed)

--
nosy: +jacobtylerwalls

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



[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-12 Thread Jacob Walls


Change by Jacob Walls :


--
pull_requests: +29458
pull_request: https://github.com/python/cpython/pull/31299

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



[issue46771] Add some form of cancel scopes

2022-02-16 Thread Jacob Nilsson


Change by Jacob Nilsson :


--
nosy: +ajoino

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



[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-03-04 Thread Jacob Walls


Jacob Walls  added the comment:

I agree not a bug. To ignore the document default you can set 
`specified_attributes` on the parser as documented:

https://docs.python.org/3/library/pyexpat.html#xml.parsers.expat.xmlparser.specified_attributes

Also, this was explicitly worked on recently in bpo-42151, so hard to imagine 
reversing course so soon. I suggest the issue be re-closed.

--
nosy: +jacobtylerwalls

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-05 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 4.0 -> 5.0
pull_requests: +29815
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31696

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



[issue25707] Add the close method for ElementTree.iterparse() object

2022-03-05 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 4.0 -> 5.0
pull_requests: +29816
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31696

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



[issue46461] Kodi crashing

2022-03-06 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

>From Kodi GH issues, they suspect is related to the work on subinterpreters 
>https://github.com/xbmc/xbmc/issues/19961#issuecomment-1008151611:

"The bulk of this issue is due to how python and it's modules handle sub 
interpreters.
There are several open python bpos and have been many prs to cpython to handle 
sub interpreters better, but it's still very much a work in progress.

All C modules are/were being updated to what they call multi phase init, which 
essentially moves away from static init of members. Sub interpreters can modify 
these static members which can cause other sub interpreter states to crash 
horribly.

For the user with the SSL crash running python 3.9, if you go to 3.10, the SSL 
module was converted to multiphase init, and shouldn't crash in the same manner 
for that particular module. However not all modules are converted still, so 
there are still failure points on other modules.

This is a cpython issue, and there's not much we can do but wait for it to be 
resolved in cpython"

--
nosy: +ajoino

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



[issue12361] Memory Leak in File Logging

2011-06-18 Thread Jacob Perkins

New submission from Jacob Perkins :

I have a custom proxy server that was using a WatchedFileHandler for logging 
requests (the files were rotated with logrotate). It was leaking memory, and I 
had to use supervisord's memmon plugin to restart it whenever it exceed a 
certain threshold. I eventually tried disabling the WatchedFileHandler, and 
memory usage flattened out. I also have a StreamHandler logging the requests, 
so I have to conclude the leak is in WatchedFileHandler or FileHandler. This is 
with Python 2.6.6.

--
components: Library (Lib)
messages: 138620
nosy: japerk
priority: normal
severity: normal
status: open
title: Memory Leak in File Logging
type: resource usage
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue12361>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12387] IDLE save hotkey problem

2011-06-22 Thread Jacob VB

New submission from Jacob VB :

IDLE (for Python 3.2) fails to save using the ctrl-s keyboard shortcut when 
caps-lock is enabled, and instead only saves when ctrl-shift-s is pressed.
When caps-lock is disabled, all shortcuts work normally.

--
components: IDLE
messages: 138828
nosy: Jacob.VB
priority: normal
severity: normal
status: open
title: IDLE save hotkey problem
type: behavior
versions: Python 3.2

___
Python tracker 
<http://bugs.python.org/issue12387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12387] IDLE save keyboard shortcut problem

2011-06-22 Thread Jacob VB

Changes by Jacob VB :


--
title: IDLE save hotkey problem -> IDLE save keyboard shortcut problem

___
Python tracker 
<http://bugs.python.org/issue12387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12387] IDLE save keyboard shortcut problem

2011-06-22 Thread Jacob VB

Jacob VB  added the comment:

IDLE (for Python 3.2) fails to save using the ctrl-s keyboard shortcut when 
caps-lock is enabled, and instead only saves when ctrl-shift-s is pressed.
When caps-lock is disabled, all shortcuts work normally.

--

___
Python tracker 
<http://bugs.python.org/issue12387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12387] IDLE save keyboard shortcut problem

2011-06-22 Thread Jacob VB

Jacob VB  added the comment:

I'm running Windows 7 Home Premium 64-bit, on an Alienware M17x (a laptop) 
using the built-in keyboard.

It's definitely possible that the problem is Windows-specific; perhaps it has 
to do with the fact that when caps lock is on the shift modifier seems to 
invert the case back to lowercase; although I don't know how it would affect it 
in that way.

--

___
Python tracker 
<http://bugs.python.org/issue12387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12361] Memory Leak in File Logging

2011-06-28 Thread Jacob Perkins

Jacob Perkins  added the comment:

Sorry about this. Turns out the flattening of memory usage was a temporary 
coincidence, and I eventually tracked the bug down to an old version of MySQLdb.

--
resolution:  -> invalid
status: pending -> closed

___
Python tracker 
<http://bugs.python.org/issue12361>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1006238] cross compile patch

2011-03-25 Thread Jacob Godserv

Jacob Godserv  added the comment:

I have two questions:

Will a new developer be assigned to this bug?
And, why are we wasting comments and grave-digging five-year-old discussions?

--

___
Python tracker 
<http://bugs.python.org/issue1006238>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47137] MemoryError

2022-03-27 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Python 3.6 reach end of life in December 2021, is this error reproducible in 
Python 3.7 and above?

If that is still the case, do you have an example of an exact input causing 
this crash? "random input" is not a lot to go by.

--
nosy: +ajoino

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



[issue43496] Save As dialog in IDLE doesn't accept keyboard shortcuts on MacOS

2021-03-14 Thread Jacob Walls


New submission from Jacob Walls :

Cmd-A to select all or Cmd-Z to undo, etc., have no effect when typing in the 
"Save As:" or "Tags:" fields of the native Save As... dialog on MacOS. Cmd-R, 
curiously, opens a Finder window.

IDLE dialogs such as Search behave as expected (Cmd-A selects all).

Python 3.9.2
macOS 10.15.7 (and 10.13.6)

Pardon me if my search for existing tickets came up short.

--
assignee: terry.reedy
components: IDLE, macOS
messages: 388699
nosy: jacobtylerwalls, ned.deily, ronaldoussoren, terry.reedy
priority: normal
severity: normal
status: open
title: Save As dialog in IDLE doesn't accept keyboard shortcuts on MacOS
type: behavior
versions: Python 3.9

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



[issue43535] Make str.join auto-convert inputs to strings.

2021-03-23 Thread Jacob Nilsson

Jacob Nilsson  added the comment:

For what my opinion is worth, I agree with Grégory's suggestion because the ',' 
part of ','.join(...) is almost as unintuitive as the problems Raymond's 
suggestions are trying to fix.

I was going to suggest a builtin to work on both str and bytes, like 
join(sep=None, strtype=str, *strings) but that interface looks pretty bad...

I think joinstr/joinbytes according to Grégory's suggestion (perhaps as 
classmethods of str/bytes?) would make the most sense.

--
nosy: +ajoino

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



[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-03-23 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Hi, I tried both code snippets, and they work for me with the output:

typing.Union[str, abc.ABC]

For your second code snippet.

Tested on 3.7.6 (IPython though) on a Windows machine, can test it on Linux 
tomorrow.

--
nosy: +ajoino

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



[issue43802] Seg fault on macOS using multiprocessing.JoinableQueue

2021-04-10 Thread Jacob Walls


New submission from Jacob Walls :

macOS 10.13.6
Python 3.9.2

I can consistently reproduce a seg fault while using 
multiprocessing.JoinableQueue in Python 3.9.2.

My use case is the sheet music processing library music21. My fork includes a 
folder of 209 files I use to reproduce, running 3 cores, shown in the script 
below. (This is a subset of the over 1,000 files found here: 
https://github.com/MarkGotham/When-in-Rome/tree/master/Corpus/OpenScore-LiederCorpus
Using this set of 1,000 files reproduces nearly every time; using the 209 files 
I committed to my fork was enough to reproduce about 75% of the time.)

I'm a contributor to music21, so if this is an overwhelming amount of 
information to debug, I will gladly pare this down as much as I can or create 
some methods to access the multiprocessing functionality more directly. Many 
thanks for any assistance.


pip3 install 
git+https://github.com/jacobtylerwalls/music21.git@bpo-investigation

from music21 import corpus
# suggest using a unique name each attempt
lc = corpus.corpora.LocalCorpus(name='bpo-investigation')
# point to the directory of files I committed to my fork for this investigation
lc.addPath('/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/music21/bpo-files')
# parse the files using multiprocessing
# calls music21.metadata.bundles.MetadataBundle.addFromPaths()
# which calls music21.metadata.caching.process_parallel()
lc.save()

# CTRL-C to recover from seg fault
# then, wipe out the entries in .music21rc so that you can cleanly reproduce 
again
from music21 import environment
us = environment.UserSettings()
us['localCorporaSettings'] = {}
quit()


Process:   Python [31677]
Path:  
/Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   3.9.2 (3.9.2)
Code Type: X86-64 (Native)
Parent Process:Python [31674]
Responsible:   Python [31677]
User ID:   501

Date/Time: 2021-04-10 11:21:19.294 -0400
OS Version:Mac OS X 10.13.6 (17G14042)
Report Version:12
Anonymous UUID:E7B0208A-19D6-ABDF-B3EA-3910A56B3E72

Sleep/Wake UUID:   C4B83F57-6AD1-469E-82AE-88214FAA6283

Time Awake Since Boot: 14 seconds
Time Since Wake:   5900 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x000100b3acd8
Exception Note:EXC_CORPSE_NOTIFY

Termination Signal:Segmentation fault: 11
Termination Reason:Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x100b3acd8:
--> 
__TEXT 0001068bb000-0001068bc000 [4K] r-x/rwx 
SM=COW   
[/Library/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.python.python   0x000106944072 PyObject_RichCompare 
+ 258
1   org.python.python   0x000106943e9b 
PyObject_RichCompareBool + 43
2   org.python.python   0x0001069ce3c0 min_max + 624
3   org.python.python   0x000106940bab cfunction_call + 59
4   org.python.python   0x000106901cad _PyObject_MakeTpCall 
+ 365
5   org.python.python   0x0001069d865c call_function + 876
6   org.python.python   0x0001069d5b8b 
_PyEval_EvalFrameDefault + 25371
7   org.python.python   0x000106902478 
function_code_fastcall + 104
8   org.python.python   0x0001069d85cc call_function + 732
9   org.python.python   0x0001069d5ad2 
_PyEval_EvalFrameDefault + 25186
10  org.python.python   0x0001069d92c3 _PyEval_EvalCode + 
2611
11  org.python.python   0x000106902401 
_PyFunction_Vectorcall + 289
12  org.python.python   0x0001069d85cc call_function + 732
13  org.python.python   0x0001069d5ad2 
_PyEval_EvalFrameDefault + 25186
14  org.python.python   0x0001069d92c3 _PyEval_EvalCode + 
2611
15  org.python.python   0x000106902401 
_PyFunction_Vectorcall + 289
16  org.python.python   0x000106901b05 
_PyObject_FastCallDictTstate + 293
17  org.python.python   0x0001069026e8 
_PyObject_Call_Prepend + 152
18  org.python.python   0x00010695be85 slot_tp_init + 165
19  org.python.python   0x0001069573d9 type_call + 345
20  org.python.python   0x000106901cad _PyObject_MakeTpCall 
+ 365
21  org.python.python   0x0001069d865c call_function + 876
22  org.python.python   0x

[issue43802] Seg fault on macOS using multiprocessing.JoinableQueue

2021-04-10 Thread Jacob Walls


Jacob Walls  added the comment:

Thanks for this detailed reply. I reproduced on Python 3.9.4 on the same iMac 
from my original report running macOS 10.13.6, but with much lesser frequency 
(I wouldn't use the word "consistently" anymore).

I tried on a MacBook Pro with worn-out hardware running a newer OS (10.15.4) 
and could not reproduce the issue there. I also built cPython (Python 3.10.0a7+ 
(heads/master:ac05f82ad4, Apr 10 2021, 20:16:36) [Clang 10.0.0 
(clang-1000.10.44.4)] on darwin) using --with-pydebug and ran the test case a 
few times on the good-hardware iMac, and observed the file parsing 
(predictably) slow to a crawl, but no reproduction of the segfault. This leads 
me to believe that, yes, this is a race condition I'm encountering on fast 
hardware.

Possibly related to issue-25769, since music21 makes heavy use of weakrefs and 
since music21.metadata.caching.MetadataCachingJob.run() calls gc.collect(). 
Perhaps I can look into engineering a minimal test case based on that 
discussion, involving a deliberately expensive __eq__() call.

To answer your original question: my first report on 3.9.2 was on this specific 
version:
3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:06:10) \n[Clang 6.0 (clang-600.0.57)]

--

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



[issue43802] Seg fault on macOS using multiprocessing.JoinableQueue

2021-04-18 Thread Jacob Walls


Jacob Walls  added the comment:

Unfortunately, at the outset I should have tested this without multiprocessing. 
I can reproduce without multiprocessing[1], which meant I could more easily 
pinpoint the failure. There is an expensive O(nm) algorithm[2] in the music21 
library that is overflowing.

I appreciate your time looking into this. Closing.

Regards, Jacob


[1] in the provided script, after one call to lc.save() call 
lc.rebuildMetadataCache(useMultiprocessing=False)

[2] music21.analysis.discrete.Ambitus.getPitchRanges(), and I plan to do 
something about it.

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

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



[issue19094] urljoin should raise a TypeError if URL is not a string

2021-06-10 Thread Jacob Walls


Jacob Walls  added the comment:

Hi vajrasky, do you have any interest in converting your patch to a GitHub PR? 
If not I can see about doing so myself. Cheers.

--
nosy: +jacobtylerwalls

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



[issue19094] urljoin should raise a TypeError if URL is not a string

2021-06-11 Thread Jacob Walls


Change by Jacob Walls :


--
pull_requests: +25276
pull_request: https://github.com/python/cpython/pull/26687

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



[issue37880] For argparse add_argument with action='store_const', const should default to None.

2021-06-12 Thread Jacob Walls


Jacob Walls  added the comment:

Sounds reasonable to me.

--
components: +Library (Lib)
nosy: +jacobtylerwalls
type:  -> behavior
versions: +Python 3.11 -Python 3.9

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



[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2021-06-13 Thread Jacob Walls


Change by Jacob Walls :


--
nosy: +jacobtylerwalls
nosy_count: 7.0 -> 8.0
pull_requests: +25291
pull_request: https://github.com/python/cpython/pull/26687

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



[issue22334] test_tcl.test_split() fails on "x86 FreeBSD 7.2 3.x" buildbot

2021-06-13 Thread Jacob Walls


Change by Jacob Walls :


--
nosy: +jacobtylerwalls
nosy_count: 5.0 -> 6.0
pull_requests: +25293
pull_request: https://github.com/python/cpython/pull/26687

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



[issue22334] test_tcl.test_split() fails on "x86 FreeBSD 7.2 3.x" buildbot

2021-06-13 Thread Jacob Walls


Change by Jacob Walls :


--
pull_requests:  -25293

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



[issue22334] test_tcl.test_split() fails on "x86 FreeBSD 7.2 3.x" buildbot

2021-06-13 Thread Jacob Walls


Jacob Walls  added the comment:

Sorry for noise; I typo-d when linking a PR on GitHub. Unlinked.

--

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



[issue22334] test_tcl.test_split() fails on "x86 FreeBSD 7.2 3.x" buildbot

2021-06-13 Thread Jacob Walls


Change by Jacob Walls :


--
nosy:  -jacobtylerwalls

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



[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2021-06-13 Thread Jacob Walls


Jacob Walls  added the comment:

Both this ticket and #19094 started from one method in urllib.parse and then 
generalized a proposal for the rest of the submodule to move away from 
duck-typing and to instead raise TypeErrors (or at least some error) for 
invalid types. The attached PR does that. But it broke pip, which was passing 
None to the `fragment` argument of `urlunsplit()`.

In a blaze of efficiency, Pip already merged my fix, but since the CPython test 
suite depends on the current version of pip -- perhaps there's an argument for 
at least raising a deprecation warning for ``None`` and then converting to '' 
or b''? In any case, green CI makes patches more reviewable, so I'm inclined to 
add such a warning/conversion for now and then see how feedback goes. Cheers, 
all.

BTW: perhaps we can close this as dupe of #19094?

--

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



[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2021-06-13 Thread Jacob Walls


Jacob Walls  added the comment:

Well, now I've looked at the CPython test failure more closely, and it's in 
`test.test_venv.EnsurePipTest` where we just download latest pip. 

Their release cadence suggests a new release in July, about 2-4 weeks from now. 
So I'll wait on adding the DeprecationWarning for passing `None` unless folks 
ask for it during review, and am happy to wait a few weeks for green CI.

--

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-14 Thread Jacob Walls


Jacob Walls  added the comment:

With the followup patch merged, can this be closed now?

--
nosy: +jacobtylerwalls

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



[issue44455] compileall should exit nonzero for nonexistent directories

2021-06-20 Thread Jacob Walls


Change by Jacob Walls :


--
components: +Library (Lib)
type:  -> behavior

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



[issue43077] Update bundled pip to 21.0.1 and setuptools to 52.0.0

2021-07-04 Thread Jacob Walls


Jacob Walls  added the comment:

Presumably this can be closed.

--
nosy: +jacobtylerwalls

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



[issue35277] Upgrade bundled pip/setuptools

2021-07-04 Thread Jacob Walls


Jacob Walls  added the comment:

Presumably this can be closed.

--
nosy: +jacobtylerwalls

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



[issue44587] BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-07-09 Thread Jacob Walls


Change by Jacob Walls :


--
components: +Library (Lib)
type:  -> behavior

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



[issue44516] Update bundled pip to 21.1.3

2021-07-09 Thread Jacob Walls


New submission from Jacob Walls :

Greetings, all. I take it this is fully resolved?

--
nosy: +jacobtylerwalls

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



[issue20116] urlparse.parse_qs should take argument for query separator

2021-07-09 Thread Jacob Walls


Jacob Walls  added the comment:

Greetings. I believe this is mooted by #42967 as well as changes even prior to 
that.

https://bugs.python.org/issue42967

--
nosy: +jacobtylerwalls

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



[issue31162] urllib.request.urlopen CERTIFICATE_VERIFY_FAILED error

2021-07-19 Thread Jacob Walls


Jacob Walls  added the comment:

Third voice chiming in to say not a bug, also. I think the last two messages 
inadvertently moved to pending and then back to open. I suggest closing.

--
nosy: +jacobtylerwalls

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



[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-13 Thread Jacob Nilsson


Change by Jacob Nilsson :


--
nosy: +ajoino

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



[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Could one possible downside of this suggestion be, if implemented like in 
https://newbedev.com/python-abstract-class-shall-force-derived-classes-to-initialize-variable-in-init,
 a slowdown in code creating a lot of instances of a class with metaclass 
ABCMeta?

I have personally never experienced that the current behavior is an issue, I've 
only occasionally got confused by the error messages until I read the traceback.

--

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-10 Thread Jacob Hayes


New submission from Jacob Hayes :

When deepcopying a parametrized types.GenericAlias (eg: a dict subclass) that 
has a __deepcopy__ method, the copy module doesn't detect the GenericAlias as a 
type and instead tries to call cls.__deepcopy__, passing `memo` inplace of 
self. This doesn't seem to happen with `typing.Generic` however.

Example:
```
from copy import deepcopy


class X(dict):
def __deepcopy__(self, memo):
return self


print(deepcopy(X()))
print(deepcopy(X))

print(type(X[str, int]))
print(deepcopy(X[str, int]()))
print(deepcopy(X[str, int]))
```
shows
```
{}


{}
Traceback (most recent call last):
  File "/tmp/demo.py", line 14, in 
print(deepcopy(X[str, int]))
  File "/Users/jacobhayes/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 
153, in deepcopy
y = copier(memo)
TypeError: __deepcopy__() missing 1 required positional argument: 'memo'
```

I don't know if it's better to update `copy.deepcopy` here or perhaps narrow 
the `__getattr__` for `types.GenericAlias` (as `typing. _BaseGenericAlias` 
seems to).

--
components: Library (Lib)
messages: 401601
nosy: JacobHayes
priority: normal
severity: normal
status: open
title: deepcopy of GenericAlias with __deepcopy__ method is broken
type: behavior
versions: Python 3.9

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



[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-10-03 Thread Jacob Hayes


New submission from Jacob Hayes :

Reproduction:

```
from graphlib import TopologicalSorter

TopologicalSorter[str]({"a": {}, "b": {"a"}})
```
```
$ mypy /tmp/toposort.py
Success: no issues found in 1 source file
$ python3 /tmp/toposort.py
Traceback (most recent call last):
  File "/tmp/toposort.py", line 3, in 
TopologicalSorter[str]({"a": {}, "b": {"a"}})
TypeError: 'type' object is not subscriptable
```

I opened the issue here (rather than typeshed) because we'd presumably like to 
support this at runtime too.

Typeshed link: 
https://github.com/python/mypy/blob/0a830481980bfc554ded61a3eaaaecde384a21e4/mypy/typeshed/stdlib/graphlib.pyi#L6

--
components: Library (Lib)
messages: 403115
nosy: JacobHayes
priority: normal
severity: normal
status: open
title: TopologicalSorter is not Generic at runtime (but is in typeshed)
type: behavior
versions: Python 3.9

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



[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-10-03 Thread Jacob Hayes


Change by Jacob Hayes :


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

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



[issue45586] Use starred expressions in list indices

2021-10-23 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

I don't understand, do you mean that lists should work like in your example? Or 
that your example code doesn't run?

If you mean the first issue, that is ok I guess but I've never used indexing 
like that outside of numpy, pandas and the like.

If you mean the second issue, it doesn't run because you are indexing a 0-dim 
array with 4 indices, if you instead try with a 1-dim array:

>>> import numpy as np
>>> a = np.array([0]) # 1-dim array instead of 0-dim
>>> print(a[[0, *[0, 0], 0]])
[0, 0, 0, 0]

You get the expected output.

--
nosy: +ajoino

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



[issue45586] Use starred expressions in list indices

2021-10-23 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Oh yeah, the reason lists don't allow the starred expression has nothing to do 
with the starred expression itself, it's syntactically correct and in your case 
a[1, *[2, 3], 4] is equivalent to a[1, 2, 3, 4]. The "problem" is that lists do 
not allow indexing by tuples.

Perhaps the title of this issue should be changed to reflect that: "Allow lists 
to be indexed by tuples"

--

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



[issue45586] Use starred expressions in subscripts

2021-10-26 Thread Jacob Nilsson


Jacob Nilsson  added the comment:

Ok, I see.

>>> a[1, 2, *[3, 4]]
Would still faith with PEP 646 because lists don't accept tuples, right?
>>> a[(1, 2, *[3, 4])]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not tuple

--

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



[issue45729] "history and license" link has wrong target

2021-11-05 Thread Jacob Lifshay


New submission from Jacob Lifshay :

https://docs.python.org/3.10/library/csv.html
at the bottom the "history and license" link just links back to csv.html, 
rather than the correct target.

--
assignee: docs@python
components: Documentation
messages: 405807
nosy: docs@python, programmerjake
priority: normal
severity: normal
status: open
title: "history and license" link has wrong target
versions: Python 3.10

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



[issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc)

2021-11-23 Thread Jacob Walls


Change by Jacob Walls :


--
nosy: +jacobtylerwalls
nosy_count: 4.0 -> 5.0
pull_requests: +27977
pull_request: https://github.com/python/cpython/pull/29739

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



[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-09 Thread Jacob Hayes


Jacob Hayes  added the comment:

Thanks for merging!

Should typeshed be updated for <3.11 in the meantime or do you suggest `if 
TYPE_CHECKING` blocks on user side? Perhaps it's a non-issue if no one else has 
noticed this. :)

--

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



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2019-12-04 Thread Jacob Taylor


New submission from Jacob Taylor :

This PR adds support for the HttpOnly flag as encoded in CURL cookiejars.

This PR was mainly designed to allow the MozillaCookieJar to parse in the 
cookies, as previously they were considered comments and ignored. 

As HttpOnly is considered a non-standard attribute, the nonstandard attribute 
dict was considered the most appropriate place to persist this information.

--
components: Library (Lib)
messages: 357837
nosy: Jacob Taylor
priority: normal
severity: normal
status: open
title: Add support for HTTP Only flag in MozillaCookieJar
type: enhancement
versions: Python 3.9

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



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2019-12-04 Thread Jacob Taylor


Change by Jacob Taylor :


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

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



[issue32803] smtplib: LMTP broken in the case of multiple RCPT

2020-03-10 Thread Jacob Middag


Change by Jacob Middag :


--
keywords: +patch
nosy: +middag
nosy_count: 2.0 -> 3.0
pull_requests: +18253
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18896

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



[issue40202] Misleading grammatically of ValueError Message?

2020-04-06 Thread Jacob RR


New submission from Jacob RR :

hi,

so I *think* that ValueError shows an error grammatically incorrect?
In python 2.7
>>> x = [1,2,3]
>>> f,x, a, b = [1,2,3]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: need more than 3 values to unpack

Should have said: Received 3 values to unpack ?
The problem with that is the list size is 3 and the error says that I need more 
than 3 values to unpack which is logically wrong **IMHO** (don't kill me if im 
mistaken)

Now if I try to do something else, for example:

>>> x = [1,2,3]
>>> a, b = [1,2,3]

Traceback (most recent call last):
  File "", line 1, in 
ValueError: too many values to unpack

It says **too many** but I assign a few than the size of the list. am I the one 
who wrong here?

Now, I code in Python 3 I'm not a professional  like you, I'm novice and try to 
learn.. I'll get to the point, the same code in Python 3.7.6 (Anaconda, pip is 
disappoint me :< )

>>> a = [1,2,3]
>>> x,y = a
Traceback (most recent call last):
  File "", line 1, in 
ValueError: too many values to unpack (expected 2)

Should said something else because it received less values and expected should 
say 3 and not 2, correct?


thanks for reading.




PS: Sorry I'm not a native speaker and I might be wrong and am very sorry if 
time wasted.

--
assignee: docs@python
components: Documentation
messages: 365842
nosy: Jacob RR, docs@python
priority: normal
severity: normal
status: open
title: Misleading grammatically of ValueError Message?
type: enhancement
versions: Python 3.7

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



[issue32966] Python 3.7.2 - 0x80070643 - Fatal Error during installation

2020-04-21 Thread Jacob Melendrez


Jacob Melendrez  added the comment:

I am trying to uninstall python 3.7.2 because I think it is preventing me from 
correctly using python 3.8.2. When I go to my program list on windows 10 and 
try to uninstall it, it gets approximately 10% in and then gives me the message 
that No python 3.7 installation was detected. I hit Ok and then it continues 
loading for another 1% and then I receive the error message "0x80070643 Fatal 
Error during installation " How do I resolve this?

--
nosy: +Cybernetic
title: Python 3.6.4 - 0x80070643 - Fatal Error during installation -> Python 
3.7.2 - 0x80070643 - Fatal Error during installation
versions: +Python 3.7 -Python 3.6

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



[issue40639] Strange behavior in changing nested dictionaries

2020-05-15 Thread Jacob Underwood


New submission from Jacob Underwood :

I was experimenting with nested dictionaries when I came across strange 
behavior that I can not figure out at all. The following function, at least for 
me, has some weird behavior. Originally, it was a bit longer, but somehow it 
achieved its intended purpose in a strange way, allowing me to cut off the rest 
of the correct code and to leave only the following with the code still 
continuing to work:

My original intention was to make a function that would use the provided keys 
(in the "keys" argument of the following function) in the form of a list to use 
all but the last key in the list to get to a nested dictionary within the 
provided dictionary arg. Then, using the last key in the list, set the key to 
the information provided. Finally, the function should have returned the full 
dictionary originally provided, but with the one change within one of the 
nested dictionaries of the provided dictionary.

def input_into_nested_dict(dictionary, keys, information):
its = information
cdip = dictionary
for key in keys[:-1]:
cdip = cdip[key]
cdip[keys[-1]] = its
return dictionary

So, an example dictionary of
m = {'a':{'b':{'c':{'d':30

An example list of
y = ['a','b','c','test']

Test of
n = input_into_nested_dict(m, y, 'hello')

The strange thing is, n now correctly has
{'a': {'b': {'c': {'d': 30, 'test': 'hello'
which does not correspond to what this weird cut off function should do, as it 
should only provide
{'d': 30, 'test': 'hello'}

Furthermore, somehow this changes the global m, the dictionary provided to the 
function, making it
{'a': {'b': {'c': {'d': 30, 'test': 'hello'


(The strange variable names are left over from my original code, though 
removing them as they are now unnecessary changes the behavior again, even 
though I am pretty sure it should not (?))

Same function without the beginning variables:

def b(dictionary, keys, information):
for key in keys[:-1]:
dictionary = dictionary[key]
dictionary[keys[-1]] = information
return dictionary

Now, when ran with the same m (reset back to the original dictionary before it 
was somehow changed), y, and an n of
n = b(m, y, 'hello')
The result is now that n gets the correct dictionary it should get
{'d': 30, 'test': 'hello'}

Though, somehow m changing also continues, with it again getting
{'a': {'b': {'c': {'d': 30, 'test': 'hello'

If this makes no sense, I'm sorry I am new to Python and am not really good 
really giving this kind of information

In addition to that, this is probably not even a bug at all and I am probably 
just missing something big? If true, I'm sorry about this post...

I do not know if this happens to just me, this originally happened in 3.7.7 but 
I tried upgrading and it continued in the most recent version (3.8.3)

Thank you!

--
messages: 369008
nosy: jacob.underwood
priority: normal
severity: normal
status: open
title: Strange behavior in changing nested dictionaries
type: behavior
versions: Python 3.8

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



[issue40639] Strange behavior in changing nested dictionaries

2020-05-15 Thread Jacob Underwood


Jacob Underwood  added the comment:

I know this post is closed, but I just wanted to say thank you for the reply 
and the help, and being so understanding of my many mistakes

Have a good day/night!!

--

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



[issue32803] smtplib: LMTP broken in the case of multiple RCPT

2020-05-18 Thread Jacob Middag


Jacob Middag  added the comment:

Could anyone take a look to the PR?

--

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



[issue24650] Error in yield expression documentation

2021-02-27 Thread Jacob Walls


Change by Jacob Walls :


--
keywords: +patch
nosy: +jacobtylerwalls
nosy_count: 4.0 -> 5.0
pull_requests: +23449
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24663

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



[issue40457] Python fails to compile/load _ssl module if OpenSSL is compiled with no-tls1-method

2020-05-31 Thread Manuel Jacob

Manuel Jacob  added the comment:

For the record, I’ve added a comment to the pull request about that 
ssl.PROTOCOL_TLSv1_1 / ssl.PROTOCOL_TLSv1_2 are now defined unconditionally.

https://github.com/python/cpython/commit/6e8cda91d92da72800d891b2fc2073ecbc134d98#r39569316

--
nosy: +mjacob

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



[issue40868] io.TextIOBase.buffer is not necessarily a buffer

2020-06-04 Thread Manuel Jacob


New submission from Manuel Jacob :

https://docs.python.org/dev/library/io.html#io.TextIOBase.buffer says:

"The underlying binary buffer (a BufferedIOBase instance) that TextIOBase deals 
with. This is not part of the TextIOBase API and may not exist in some 
implementations."

It is not necessarily a buffer (a BufferedIOBase instance), e.g. when the 
stdout and stderr streams are set to be unbuffered. Example:

% python -u
Python 3.8.3 (default, May 17 2020, 18:15:42) 
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import io, sys
>>> sys.stdout
<_io.TextIOWrapper name='' mode='w' encoding='utf-8'>
>>> isinstance(sys.stdout, io.TextIOBase)
True
>>> sys.stdout.buffer
<_io.FileIO name='' mode='wb' closefd=False>
>>> isinstance(sys.stdout.buffer, io.BufferedIOBase)
False

Therefore the name and the documentation are incorrect.

I suggest to deprecate the attribute "buffer", introduce a new attribute with a 
correct name, and forward the old attribute to the new attribute and vice versa 
in the io.TextIOBase class.

I think that "binary" would be a good attribute name for the underlying binary 
stream, as it would be consistent with io.BufferedIOBase.raw (for "the 
underlying raw stream").

--
assignee: docs@python
components: Documentation, IO
messages: 370744
nosy: docs@python, mjacob
priority: normal
severity: normal
status: open
title: io.TextIOBase.buffer is not necessarily a buffer

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



[issue40871] threading.Event.wait_unset()

2020-06-05 Thread Jacob Kunnappally


New submission from Jacob Kunnappally :

Just requesting a threading.Event.wait_unset(timeout=None) function. I would 
request the same for multiprocessing.

My use case:

I've made my own class that adds a little bit of IPC plumbing to the base 
Process class (ChildProcess). Each ChildProcess has a status that it can update 
to let other threads/processes know what it's doing at the moment. There is a 
configurable period when that updated status can be considered "fresh". In some 
cases, I would like a listening process to be able to ignore the "freshness" 
and only trigger some action only if the status updates while the listening 
process is waiting for it to update.

To do this, I need to be able to know when the status goes unfresh so that 
waiting for the status to update can begin in earnest. Right now I am polling 
manually, and that can't be the right answer.

Happy to clarify the above paragraphs. That's as best as I could think to 
describe it in text.

--
components: Library (Lib)
messages: 370761
nosy: Jacob Kunnappally
priority: normal
severity: normal
status: open
title: threading.Event.wait_unset()
type: enhancement
versions: Python 3.10

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



[issue40983] Can’t configure encoding used by urllib.request.url2pathname()

2020-06-15 Thread Manuel Jacob

New submission from Manuel Jacob :

On Python 2, it was possible to recover a percent-encoded byte:
>>> from urllib import url2pathname
>>> url2pathname('%ff')
'\xff'

On Python 3, the byte is decoded using the utf-8 encoding and the "replace" 
error handler (therefore there’s no way to recover the byte):
>>> from urllib.request import url2pathname
>>> url2pathname('%ff')
'�'

For my use case (getting the pathname as bytes), it would be sufficient to 
specify a different encoding (e.g. latin-1) or a different error handler (e.g. 
surrogateescape) that makes it possible to recover the byte by encoding the 
result of url2pathname() such that it roundtrips with the encoding and error 
handler internally used by url2pathname() for percent-encoded bytes.

I’m not simply sending a patch, because this might point to a deeper issue. 
Suppose there’s the following script:

import sys
from pathlib import Path
from urllib.request import urlopen
path = Path(sys.argv[1])
path.write_text('Hello, World!')
with urlopen(path.as_uri()) as resp:
print(resp.read())

If I call this script with b'/tmp/\xff' as the argument, it fails with the 
following traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.8/urllib/request.py", line 1507, in open_local_file
stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/�'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_url2pathname.py", line 6, in 
with urlopen(path.as_uri()) as resp:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1485, in file_open
return self.open_local_file(req)
  File "/usr/lib/python3.8/urllib/request.py", line 1524, in open_local_file
raise URLError(exp)
urllib.error.URLError: 

So maybe urllib.request.url2pathname() should use the same encoding and error 
handler as os.fsencode() / os.fsdecode().

--
components: Library (Lib)
messages: 371537
nosy: mjacob
priority: normal
severity: normal
status: open
title: Can’t configure encoding used by urllib.request.url2pathname()

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



[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob

Change by Manuel Jacob :


--
title: Can’t configure encoding used by urllib.request.url2pathname() -> 
urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" 
error handler

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



[issue40996] urllib should fsdecode percent-encoded parts of file URIs on Unix

2020-06-16 Thread Manuel Jacob

New submission from Manuel Jacob :

On Unix, file names are bytes. Python mostly prefers to use unicode for file 
names. On the Python <-> system boundary, os.fsencode() / os.fsdecode() are 
used.

In URIs, bytes can be percent-encoded. On Unix, most applications pass the 
percent-decoded bytes in file URIs to the file system unchanged. The remainder 
of this issue description is about Unix, except for the last paragraph.

Pathlib fsencodes the path when making a file URI, roundtripping the bytes e.g. 
passed as an argument:
% python3 -c 'import pathlib, sys; print(pathlib.Path(sys.argv[1]).as_uri())' 
/tmp/a$(echo -e '\xE4')
file:///tmp/a%E4

Example with curl using this URL:
% echo 'Hello, World!' > /tmp/a$(echo -e '\xE4')
% curl file:///tmp/a%E4
Hello, World!

Python 2’s urllib works the same:
% python2 -c 'from urllib import urlopen; 
print(repr(urlopen("file:///tmp/a%E4").read()))'
'Hello, World!\n'

However, Python 3’s urllib fails:
% python3 -c 'from urllib.request import urlopen; 
print(repr(urlopen("file:///tmp/a%E4").read()))' 
Traceback (most recent call last):
  File "/usr/lib/python3.8/urllib/request.py", line 1507, in open_local_file
stats = os.stat(localfile)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/a�'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1485, in file_open
return self.open_local_file(req)
  File "/usr/lib/python3.8/urllib/request.py", line 1524, in open_local_file
raise URLError(exp)
urllib.error.URLError: 

urllib.request.url2pathname() is the function converting the path of the file 
URI to a file name. On Unix, it uses urllib.parse.unquote() with the default 
settings (UTF-8 encoding and the "replace" error handler).

I think that on Unix, the settings from os.fsdecode() should be used, so that 
it roundtrips with pathlib.Path.as_uri() and so that the percent-decoded bytes 
are passed to the file system as-is.

On Windows, I couldn’t do experiments, but using UTF-8 seems like the right 
thing (according to https://en.wikipedia.org/wiki/File_URI_scheme#Windows_2). 
I’m not sure that the "replace" error handler is a good idea. I prefer "errors 
should never pass silently" from the Zen of Python, but I don’t a have a strong 
opinion on this.

--
components: Library (Lib), Unicode
messages: 371702
nosy: ezio.melotti, mjacob, vstinner
priority: normal
severity: normal
status: open
title: urllib should fsdecode percent-encoded parts of file URIs on Unix
type: behavior

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



[issue40983] urllib.request.url2pathname() unconditionally uses utf-8 encoding and "replace" error handler

2020-06-16 Thread Manuel Jacob

Manuel Jacob  added the comment:

I’ve created issue40996, which suggests that urllib should fsdecode 
percent-encoded parts of file URIs on Unix. Since the two tickets are very 
related and I’d prefer if the issue was solved more generally for the whole 
module, I close this as a duplicate.

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

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



[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-17 Thread Manuel Jacob


Manuel Jacob  added the comment:

The actual startup code uses Py_DecodeLocale() for converting argv from bytes 
to unicode. Since which Python version is it guaranteed that Py_DecodeLocale() 
and os.fsencode() roundtrip?

--
nosy: +mjacob

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



[issue41012] Some code comments refer to removed initfsencoding()

2020-06-17 Thread Manuel Jacob


New submission from Manuel Jacob :

Some code comments refer to initfsencoding(), which was however removed after 
Python 3.7.

--
messages: 371779
nosy: mjacob
priority: normal
severity: normal
status: open
title: Some code comments refer to removed initfsencoding()

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



[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-18 Thread Manuel Jacob


Manuel Jacob  added the comment:

If the encoding supports it, since which Python version do Py_DecodeLocale() 
and os.fsencode() roundtrip?

The background of my question is that Mercurial goes some extra rounds to 
determine the correct encoding to emulate what Py_EncodeLocale() would do: 
https://www.mercurial-scm.org/repo/hg/file/5.4.1/mercurial/pycompat.py#l157 . 
If os.fsencode() could be used, it would simplify the code. Mercurial supports 
Python 3.5+.

--

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



[issue41051] Flush file after warning is written

2020-06-20 Thread Manuel Jacob

New submission from Manuel Jacob :

Calling warnings.warn() will write to a file, but not flush it. On Python 3.9+, 
it won’t usually be a problem because the file is most likely stderr, which is 
always line-buffered. However, on older Python versions or if a different file 
is used, the current behavior unnecessarily delays the output of the warning. 
This is especially problematic if the warning is about buffering behavior 
itself, as e.g. caused by `open('/tmp/test', 'wb', buffering=1)`.

--
messages: 371934
nosy: mjacob
priority: normal
severity: normal
status: open
title: Flush file after warning is written

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



[issue41051] Flush file after warning is written

2020-06-20 Thread Manuel Jacob


Change by Manuel Jacob :


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

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



[issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings

2020-06-23 Thread Manuel Jacob

New submission from Manuel Jacob :

The documentation for the curses module 
(https://docs.python.org/3.9/library/curses.html) has the following note:

> Since version 5.4, the ncurses library decides how to interpret non-ASCII 
> data using the nl_langinfo function. That means that you have to call 
> locale.setlocale() in the application and encode Unicode strings using one of 
> the system’s available encodings. This example uses the system’s default 
> encoding:
> 
> import locale
> locale.setlocale(locale.LC_ALL, '')
> code = locale.getpreferredencoding()
> 
> Then use code as the encoding for str.encode() calls.

The recommendation to call `locale.setlocale(locale.LC_ALL, '')` is problematic 
as it initializes all locale categories to the user settings, which might be 
unintended and is not necessary for curses to work correctly. Initializing 
LC_CTYPE is sufficient for nl_langinfo() to return the correct encoding. 
Current versions of Python (*) initialize LC_CTYPE at interpreter startup. 
Therefore calling locale.setlocale() should not be necessary at all.

The curses module automatically encodes strings. Therefore the recommendation 
to manually encode strings is outdated.

(*) It seems to be the case since 177d921c8c03d30daa32994362023f777624b10d. Why 
was is not previously done on Python 2 and on Python 3 on Windows?

--
assignee: docs@python
components: Documentation
messages: 372178
nosy: docs@python, mjacob
priority: normal
severity: normal
status: open
title: Remove recommendation in curses module documentation to initialize 
LC_ALL and encode strings

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



[issue41091] Remove recommendation in curses module documentation to initialize LC_ALL and encode strings

2020-06-25 Thread Manuel Jacob


Change by Manuel Jacob :


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

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



[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob

New submission from Manuel Jacob :

Without unbuffered mode, it works as expected:

% python -c "import sys; sys.stdout.write('x'*4294967296)" | wc -c
4294967296

% python -c "import sys; print('x'*4294967296)" | wc -c 
4294967297

With unbuffered mode, writes get truncated to 2147479552 bytes on my Linux 
machine:

% python -u -c "import sys; sys.stdout.write('x'*4294967296)" | wc -c   
2147479552

% python -u -c "import sys; print('x'*4294967296)" | wc -c 
2147479553

I didn’t try, but it’s probably an even bigger problem on Windows, where writes 
might be limited to 32767 bytes: 
https://github.com/python/cpython/blob/v3.9.0b4/Python/fileutils.c#L1585

Without unbuffered mode, `sys.stdout.buffer` is a `io.BufferedWriter` object.

% python -c 'import sys; print(sys.stdout.buffer)'
<_io.BufferedWriter name=''>

With unbuffered mode, `sys.stdout.buffer` is a `io.FileIO` object.

% python -u -c 'import sys; print(sys.stdout.buffer)' 
<_io.FileIO name='' mode='wb' closefd=False>

`io.BufferedWriter` implements the `io.BufferedIOBase` interface. 
`io.BufferedIOBase.write()` is documented to write all passed bytes. 
`io.FileIO` implements the `io.RawIOBase` interface. `io.RawIOBase.write()` is 
documented to be able to write less bytes than passed.

`io.TextIOWrapper.write()` is not documented to write all characters it has 
been passed, but e.g. `print()` relies on that.

To fix the problem, it has to be ensured that either
* `sys.stdout.buffer` is an object that guarantees that all bytes passed to its 
`write()` method are written (e.g. deriving from `io.BufferedIOBase`), or
* `io.TextIOWrapper` calls the `write()` method of its underlying binary stream 
until all bytes have been written, or
* users of `io.TextIOWrapper` call `write()` until all characters have been 
written.

In the first two possibilities it probably makes sense to tighten the contract 
of `io.TextIOBase.write` to guarantee that all passed characters are written.

--
components: IO
messages: 373151
nosy: mjacob
priority: normal
severity: normal
status: open
title: Output of print() might get truncated in unbuffered mode
type: behavior
versions: Python 3.8

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



[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob

Manuel Jacob  added the comment:

2147479552 is the 0x7000 bytes limit documented for write() on Linux 
(source: https://man7.org/linux/man-pages/man2/write.2.html). The limit could 
be even smaller in other circumstances or other systems.

I’m adding Victor Stinner to the nosy list, as he added the code limiting 
writes to the console on Windows in e0daff1c61e323d2a39dd8241de67082d1f10fd7, 
and he might have an opinion on the topic.

--
nosy: +vstinner

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



[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob


Manuel Jacob  added the comment:

`io.TextIOWrapper.write()` returns the length of the passed string instead of 
the actually written number of characters.

% python -u -c "import sys; print(sys.stdout.write('x'*4294967296), 
file=sys.stderr)" | wc -c 
4294967296
2147479552

So the possibility "users of `io.TextIOWrapper` call `write()` until all 
characters have been written" would not be sufficient.

--

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



[issue41221] Output of print() might get truncated in unbuffered mode

2020-07-06 Thread Manuel Jacob

Manuel Jacob  added the comment:

It’s possible to trigger the problem on Unix with much smaller sizes, e.g. by 
interrupting the write() with a signal handler (even if the signal handler 
doesn’t do anything). The following script starts a subprocess doing a 16MiB 
write and sends a signal, which is handled but is a no-op, after reading a bit 
from the pipe:

import signal
import subprocess
import sys

CHILD_PROCESS = '''
import signal, sys
signal.signal(signal.SIGINT, lambda *x: None)
written = sys.stdout.write('x' * 16777216)
print('written:', written, file=sys.stderr, flush=True)
'''

proc = subprocess.Popen(
[sys.executable, '-u', '-c', CHILD_PROCESS],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
read = len(proc.stdout.read(1))
proc.send_signal(signal.SIGINT)
read += len(proc.stdout.read())
stdout, stderr = proc.communicate()
assert stdout == b''
print('stderr:', stderr)
assert read == 16777216, "read: {}".format(read)


% python3 test_interrupted_write.py
stderr: b'written: 16777216\n'
Traceback (most recent call last):
  File "test_interrupted_write.py", line 24, in 
assert read == 16777216, "read: {}".format(read)
AssertionError: read: 69632

If I remove the '-u' that gets passed to the subprocess:

% python3 test_interrupted_write.py
stderr: b'written: 16777216\n'

--

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob

Manuel Jacob  added the comment:

I couldn’t reproduce the problem with a freshly compiled Python 3.9.0rc1 on 
Arch Linux. Was this ever reproduced on a non-Red Hat system?

--
nosy: +mjacob

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-08 Thread Manuel Jacob


Manuel Jacob  added the comment:

I was running "make all" and I also ran the documentation generator command 
without an error.

However, I tried it again and now it failed the same way as reported. With a 
debug build, I get "Python/Python-ast.c:231: get_ast_state: Assertion `state != 
NULL' failed.".

Sorry for the noise!

--

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



[issue32803] smtplib: LMTP broken in the case of multiple RCPT

2020-11-13 Thread Jacob Middag


Jacob Middag  added the comment:

It would be nice if someone could take a look.

--
versions: +Python 3.10, Python 3.9

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



[issue2190] MozillaCookieJar ignores HttpOnly cookies

2020-11-15 Thread Jacob Taylor


Change by Jacob Taylor :


--
nosy: +Jacob Taylor
nosy_count: 8.0 -> 9.0
pull_requests: +22197
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17471

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



  1   2   >