[issue37035] Don't log OSError exceptions in asyncio transports

2019-10-12 Thread Harmon


Change by Harmon :


--
nosy: +Harmon758

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-12 Thread Harmon


Change by Harmon :


--
nosy: +Harmon758

___
Python tracker 

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



[issue38056] Overhaul Error Handlers section in codecs documentation

2019-10-12 Thread Ma Lin


Ma Lin  added the comment:

PR 15732 became an overhaul:

- replace/backslashreplace/surrogateescape were wrongly described as encoding 
only, in fact they can also be used in decoding.
- clarify the description of surrogatepass.
- add more descriptions to each handler.
- add two REPL examples.
- add indexes for Error Handler's name.
- add default parameter values in codecs.rst
- improve term "text encoding".

PR 15732 has a screenshot of the Error Handlers section.

--
components: +Unicode
nosy: +ezio.melotti, vstinner
title: Add examples for common text encoding Error Handlers -> Overhaul Error 
Handlers section in codecs documentation

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 46113e0cf32748f66cf64cd633984d143b433cd1 by Pablo Galindo in 
branch 'master':
bpo-38456: Handle the case when there is no 'true' command (GH-16739)
https://github.com/python/cpython/commit/46113e0cf32748f66cf64cd633984d143b433cd1


--
nosy: +pablogsal

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16318
pull_request: https://github.com/python/cpython/pull/16739

___
Python tracker 

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



[issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 27b33fb41a7c64a6211d73d14804aa0cd6defccb by Pablo Galindo in 
branch 'master':
bpo-38282: Correctly manage the Bluetooth L2CAP socket structure in FreeBSD 
(GH-16738)
https://github.com/python/cpython/commit/27b33fb41a7c64a6211d73d14804aa0cd6defccb


--

___
Python tracker 

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



[issue38458] lists

2019-10-12 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
nosy: +pablogsal

___
Python tracker 

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



[issue38458] lists

2019-10-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is not a bug, it is part of the design of the language. Assignment in 
Python does not make a copy of lists, or any other object. In your sample code, 
p and l are two names for the same list, like "Devor Blake Daniels" and 
"dev40573" are two names for the same person (you).

You can use slicing to make a copy of the list, or the copy module, or the list 
constructor.

I don't understand your comment "when dealing with lists like s[][],slicing 
does not work".

--
nosy: +steven.daprano

___
Python tracker 

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



[issue38458] lists

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue38458] lists

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hi Devor,

This is not a bug in Python but indeed documented behavior. When you do

p=l

you are creating a new reference to the same list ([2,3,4]), so changing one 
changes the other. If you want to make a copy you can do

p = l.copy()

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



[issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR 16738 fixes the FreeBSD buildbots by correctly handling the Bluetooth L2CAP 
socket structure in FreeBSD if only bluetooth.h is available. Check out 
https://man.cx/ng_btsocket(4) for example for more info in the ng_btsocket 
protocol for FreeBSD.

--

___
Python tracker 

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



[issue38457] __package__ is None in __init__.py until an import is used

2019-10-12 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16317
pull_request: https://github.com/python/cpython/pull/16738

___
Python tracker 

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



[issue38458] lists

2019-10-12 Thread DEVOR BLAKE DANIELS


New submission from DEVOR BLAKE DANIELS :

l=[2,3,4]
p=l
p[0]=5
when I change p[0] to 5,l[0] is also changed to 5. I use slicing to get around 
this ,but when dealing with lists like s[][],slicing does not work

--
files: three.py
messages: 354558
nosy: dev40573
priority: normal
severity: normal
status: open
title: lists
type: behavior
Added file: https://bugs.python.org/file48657/three.py

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +16316
pull_request: https://github.com/python/cpython/pull/16737

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 67b93f80c764bca01c81c989d74a99df208bea4d by Gregory P. Smith in 
branch 'master':
bpo-38456: Use /bin/true in test_subprocess (GH-16736)
https://github.com/python/cpython/commit/67b93f80c764bca01c81c989d74a99df208bea4d


--

___
Python tracker 

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



[issue38282] socketmodule.c: _FORTIFY_SOURCE=2 warning in AF_ALG case of getsockaddrarg()

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The failures on FreeBSD are:

/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1931:50:
 error: no member named 'bt_l2' in 'union sock_addr'
struct sockaddr_l2 *addr = &addrbuf->bt_l2;
~~~  ^
/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1950:50:
 error: no member named 'bt_rc' in 'union sock_addr'
struct sockaddr_rc *addr = &addrbuf->bt_rc;
~~~  ^
/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Modules/socketmodule.c:1967:51:
 error: no member named 'bt_hci' in 'union sock_addr'
struct sockaddr_hci *addr = &addrbuf->bt_hci;
 ~~~  ^
3 errors generated.

This is likely due to the fact that those fields are protected by:

typedef union sock_addr {
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
struct sockaddr_l2 bt_l2;
struct sockaddr_rc bt_rc;
struct sockaddr_sco bt_sco;
struct sockaddr_hci bt_hci;
#elif defined(MS_WINDOWS)
}

and in those machines HAVE_BLUETOOTH_BLUETOOTH_H is absent.

--
nosy: +pablogsal

___
Python tracker 

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



[issue38457] __package__ is None in __init__.py until an import is used

2019-10-12 Thread Yuval S


New submission from Yuval S :

In Python 2.7, the __package__ variable isn't set when __init__.py is run, 
until an import is done. In Python 3.5, it is set correctly.

e.g.

# mkdir x && echo "print(__package__)" | tee x/__init__.py x/test.py
# python2 x.test
None
x
# python3 x.test
x
x
# echo -e "import os\n$(cat x/__init__.py)" > x/__init__.py
# python2 x.test
x
x

This is very old, as it's there at least since 2010: 
https://stackoverflow.com/questions/4437394/package-is-none-when-importing-a-python-module
 

I would expect Python 2 and 3 to behave the same.

--
components: Library (Lib)
messages: 354555
nosy: Yuval S
priority: normal
severity: normal
status: open
title: __package__ is None in __init__.py until an import is used
versions: Python 2.7

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue38456] Reduce the time test_subprocess takes to complete.

2019-10-12 Thread Gregory P. Smith


New submission from Gregory P. Smith :

test_subprocess is one of our long running tests, this slows down CI and 
buildbots.  There is room for improvement in its total execution time.

Use this issue as a rollup issue for any such work.  we need to keep it 
reliable, just focus on reducing either user/sys cpu time or wall time.

--
assignee: gregory.p.smith
components: Tests
messages: 354554
nosy: gregory.p.smith
priority: low
severity: normal
status: open
title: Reduce the time test_subprocess takes to complete.
type: performance
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



[issue38417] Add support for settting umask in subprocess children

2019-10-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Now to see if the more esoteric config buildbots find any platform issues to 
address...

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



[issue38417] Add support for settting umask in subprocess children

2019-10-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset f3751efb5c8b53b37efbbf75d9422c1d11c01646 by Gregory P. Smith in 
branch 'master':
bpo-38417: Add umask support to subprocess (GH-16726)
https://github.com/python/cpython/commit/f3751efb5c8b53b37efbbf75d9422c1d11c01646


--

___
Python tracker 

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



[issue38446] Ambiguous signature for builtins.__build_class__

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset ba44ea6ff8be2b7874c4358f89d5b6f4a558f711 by Miss Islington (bot) 
in branch '3.8':
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of 
_POSIX_C_SOURCE (GH-16733)
https://github.com/python/cpython/commit/ba44ea6ff8be2b7874c4358f89d5b6f4a558f711


--
nosy: +miss-islington

___
Python tracker 

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



[issue38454] test_listdir is failing on ubuntu with WSL

2019-10-12 Thread Eryk Sun


Eryk Sun  added the comment:

The test assumes that Unix filesystems store names as arbitrary sequences of 
bytes, with only ASCII slash and null reserved. Windows NTFS stores names as 
arbitrary sequences of 16-bit words, with many reserved ASCII characters 
including \/:*?<>"| and control characters 0x00-0x1F. WSL implements a UTF-8 
filesystem encoding over this by transcoding bytes from UTF-8 to UTF-16LE and 
escaping reserved characters (excepting slash and null) as sequences that begin 
with "#" (e.g. "<#" -> "#003C#0023"). The latter is only visible from Windows 
in the distro's "LocalState\rootfs" tree.

This scheme fails for TESTFN_UNDECODABLE. Bytes that can't be transcoded to 
UTF-16LE are replaced by the replacement character U+FFFD. For example:

>>> n = b'\xff'
>>> open(n, 'w').close()
>>> os.listdir(b'.')
[b'\xef\xbf\xbd']
>>> hex(ord(os.listdir('.')[0]))
'0xfffd'

WSL could address this by abandoning their current "#" escaping approach to 
instead translate all reserved and undecodable bytes to the U+DC00-U+DCFF 
surrogate range, like Python's "surrogateescape" error handler. The Windows API 
could even support this with a new flag for MultiByteToWideChar and 
WideCharToMultiByte.

--
nosy: +eryksun

___
Python tracker 

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



[issue38455] ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Duplicate of https://bugs.python.org/issue38282

--
resolution:  -> duplicate
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



[issue38455] ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16313
pull_request: https://github.com/python/cpython/pull/16734

___
Python tracker 

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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 8177404d520e81f16324a900f093adf3856d33f8 by Pablo Galindo in 
branch 'master':
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of 
_POSIX_C_SOURCE (GH-16733)
https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8


--
nosy: +pablogsal

___
Python tracker 

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



[issue38455] ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of referenced subobject

2019-10-12 Thread Pablo Galindo Salgado

New submission from Pablo Galindo Salgado :

Compiling 3.8 in release mode emits this warning:

In function ‘getsockaddrarg’,
inlined from ‘sock_bind’ at 
/home/pablogsal/github/python/3.8/Modules/socketmodule.c:3066:10:
/home/pablogsal/github/python/3.8/Modules/socketmodule.c:2288:9: warning: 
‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the bounds of 
referenced subobject ‘sa’ with type ‘struct sockaddr’ at offset 0 
[-Warray-bounds]
 2288 | memset(sa, 0, sizeof(*sa));
  | ^~

--
messages: 354547
nosy: lukasz.langa, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: ‘memset’ offset [17, 88] from the object at ‘addrbuf’ is out of the 
bounds of referenced subobject
versions: Python 3.8

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Ned Deily


Ned Deily  added the comment:

(On second thought, I'll leave this open as a release blocker until we've 
cherry-picked the fixes for 3.8.0 final and 3.7.5 final.)

--
priority: normal -> release blocker

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Ned Deily


Ned Deily  added the comment:

Thanks everyone for the quick action on this!

--
priority: release blocker -> normal

___
Python tracker 

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



[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 164bee296ab1f87cc05566b39ee8fb9fb64b3e5a by Miss Islington (bot) 
(Abhilash Raj) in branch '3.7':
[3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper 
parsing of URLs (GH-15685)" (GH-16724) (GH-16727)
https://github.com/python/cpython/commit/164bee296ab1f87cc05566b39ee8fb9fb64b3e5a


--

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 164bee296ab1f87cc05566b39ee8fb9fb64b3e5a by Miss Islington (bot) 
(Abhilash Raj) in branch '3.7':
[3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper 
parsing of URLs (GH-15685)" (GH-16724) (GH-16727)
https://github.com/python/cpython/commit/164bee296ab1f87cc05566b39ee8fb9fb64b3e5a


--

___
Python tracker 

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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue35800] remove smtpd.MailmanProxy

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 822922af90f389b20166f0cd6f5b7c76fd6d42d9 by Miss Islington (bot) 
(Samuel Colvin) in branch 'master':
bpo-35800: Deprecate smtpd.MailmanProxy (GH-11675)
https://github.com/python/cpython/commit/822922af90f389b20166f0cd6f5b7c76fd6d42d9


--
nosy: +miss-islington

___
Python tracker 

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



[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +16311
pull_request: https://github.com/python/cpython/pull/16729

___
Python tracker 

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



[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset e540bb546163f108c7c304f2e6865efaa78cd4c2 by Miss Islington (bot) 
in branch '3.8':
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)
https://github.com/python/cpython/commit/e540bb546163f108c7c304f2e6865efaa78cd4c2


--

___
Python tracker 

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



[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset febe359559781019c0c8432a2f768809d00af6af by Miss Islington (bot) 
in branch '3.7':
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)
https://github.com/python/cpython/commit/febe359559781019c0c8432a2f768809d00af6af


--
nosy: +miss-islington

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Abhilash Raj


Abhilash Raj  added the comment:


New changeset 5a638a805503131f4a9cc2bbc5944611295c1500 by Abhilash Raj in 
branch '3.8':
[3.8] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper 
parsing of URLs" (GH-16724) (GH-16728)
https://github.com/python/cpython/commit/5a638a805503131f4a9cc2bbc5944611295c1500


--

___
Python tracker 

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



[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-12 Thread Abhilash Raj


Abhilash Raj  added the comment:


New changeset 5a638a805503131f4a9cc2bbc5944611295c1500 by Abhilash Raj in 
branch '3.8':
[3.8] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper 
parsing of URLs" (GH-16724) (GH-16728)
https://github.com/python/cpython/commit/5a638a805503131f4a9cc2bbc5944611295c1500


--

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

> Yes, we should add a test case definitely, do you want to work on a PR?

Sure, I want to finalize this issue :)

--

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Abhilash Raj


Abhilash Raj  added the comment:

corona10: That's okay, it happens. I missed it too. There was really no way to 
foresee all the use cases, which is why we have beta and rc period to catch 
bugs.

Yes, we should add a test case definitely, do you want to work on a PR?

--

___
Python tracker 

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



[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-12 Thread Abhilash Raj


Abhilash Raj  added the comment:

I am going to re-open this since the fixes were reverted in all the branches.

--
status: closed -> open

___
Python tracker 

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



[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


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



[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset cb580d6fa8349acff723a7a044181d896d076871 by Miss Islington (bot) 
in branch '3.7':
bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525)
https://github.com/python/cpython/commit/cb580d6fa8349acff723a7a044181d896d076871


--

___
Python tracker 

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



[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 1da648aceb2496c672aff82ba37ee071ac6054ac by Miss Islington (bot) 
in branch '3.8':
bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525)
https://github.com/python/cpython/commit/1da648aceb2496c672aff82ba37ee071ac6054ac


--
nosy: +miss-islington

___
Python tracker 

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



[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +16310
pull_request: https://github.com/python/cpython/pull/16728

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +16309
pull_request: https://github.com/python/cpython/pull/16728

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +16308
pull_request: https://github.com/python/cpython/pull/16727

___
Python tracker 

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



[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-12 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +16307
pull_request: https://github.com/python/cpython/pull/16727

___
Python tracker 

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



[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-10-12 Thread Antoine Pietri


Antoine Pietri  added the comment:

Yes, that's why I'm in favor of calling it run_thread. Because it
fundamentally *isn't* a way to run a function in an executor, it's a
way to run a function in a thread.

--

___
Python tracker 

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



[issue36274] http.client cannot send non-ASCII request lines

2019-10-12 Thread Larry Hastings


Change by Larry Hastings :


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



[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-10-12 Thread Caleb Hattingh


Caleb Hattingh  added the comment:

We can't allow both an `executor=` kwarg, as well as **kwargs for the target 
func, unfortunately. If we do `executor=`, we'll again have to force users to 
use functools.partial to wrap their functions that take kwargs.

--

___
Python tracker 

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



[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-10-12 Thread Antoine Pietri


Antoine Pietri  added the comment:

On Sat, Oct 12, 2019 at 1:24 PM Caleb Hattingh  wrote:
> Even before task groups land, this API can be easily improved by adding
>
> asyncio.run_in_executor(func, *args, **kwargs)
>
> - Only valid inside a coro or async context (uses get_running_loop internally)
> - Analogous to how `loop.create_task` became `asyncio.create_task`
> - Drop having to specify `None` for the default executor
> - Users already know the `run_in_executor` name
> - Allow both positional and kwargs (we can partial internally before calling 
> loop.run_in_executor)

I think it should be run_thread() if it only works for thread.
run_in_executor() should take an executor= parameter, but it wouldn't
be as clear for beginners. I think there's value in having a simple,
explicit way of saying "I want to run this function in a thread"
without having to know what executors are.

--

___
Python tracker 

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



[issue38306] High level API for loop.run_in_executor(None, ...)?

2019-10-12 Thread Caleb Hattingh


Caleb Hattingh  added the comment:

Even before task groups land, this API can be easily improved by adding

asyncio.run_in_executor(func, *args, **kwargs)

- Only valid inside a coro or async context (uses get_running_loop internally)
- Analogous to how `loop.create_task` became `asyncio.create_task`
- Drop having to specify `None` for the default executor
- Users already know the `run_in_executor` name
- Allow both positional and kwargs (we can partial internally before calling 
loop.run_in_executor)

--
nosy: +cjrh

___
Python tracker 

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



[issue37731] Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h

2019-10-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

This is also reproducible on Ubuntu 18.04 gcc 7.4.0

In file included from /home/corona10/cpython/Modules/expat/expat_config.h:8:0,
 from /home/corona10/cpython/Modules/expat/xmltok.c:49:
./pyconfig.h:1586:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200809L

In file included from 
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:0,
 from /usr/include/string.h:26,
 from /home/corona10/cpython/Modules/expat/xmltok.c:34:
/usr/include/features.h:294:0: note: this is the location of the previous 
definition
 # define _POSIX_C_SOURCE 199506L

--
nosy: +corona10

___
Python tracker 

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



[issue38451] Datetime definition does not work in function definition as list definition

2019-10-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Oh, I forgot to mention that this is discussed in one of the FAQs:

https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects

--

___
Python tracker 

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



[issue38451] Datetime definition does not work in function definition as list definition

2019-10-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is not a bug, this is the design of function default arguments.

Default arguments in Python use *early binding*, which means they are 
calculated once, when the function is declared, rather than *late binding*, 
which means they are calculated each time the function is called.

You can get the effect of late binding by testing for None:

def func(time=None):
if time is None:
time = datetime.datetime.today()
print(time)


Neither choice is right or wrong, they both have advantages and disadvantages. 
Python chooses early binding for function defaults, and late binding for 
closures, which have their own, different, gotchas.

--
nosy: +steven.daprano
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



[issue38452] unittest setUpClass missing 1 required positional argument: 'cls'

2019-10-12 Thread Danylo


Danylo  added the comment:

Sorry, true.
You can close the issue.

--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue38417] Add support for settting umask in subprocess children

2019-10-12 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +16306
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/16726

___
Python tracker 

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



[issue38417] Add support for settting umask in subprocess children

2019-10-12 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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