[issue36029] Use consistent case for HTTP header fields

2019-02-18 Thread Géry
New submission from Géry : Use consistent case for HTTP header fields, according to [RFC 7231](https://tools.ietf.org/html/rfc7231). -- components: Library (Lib) messages: 335870 nosy: brett.cannon, eric.araujo, ezio.melotti, maggyero, mdk, ncoghlan, willingc priority: normal severity:

[issue36029] Use consistent case for HTTP header fields

2019-02-18 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +11949 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36015] streamhandler cannot represent streams with an integer as name

2019-02-18 Thread Riccardo Magliocchetti
Riccardo Magliocchetti added the comment: Looking at Modules/_io/fileio.c::_io_FileIO___init___impl it seems an int for nameobj is just fine. Not sure I am looking at the right code though :) -- ___ Python tracker

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: I like this idea! Should the "examples" method be re-named "samples"? That's the word used in the docstring, and it matches the from_samples method. -- ___ Python tracker

[issue36028] Integer Division discrepancy with float

2019-02-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: The open question in my mind is which is the least surprising definition of a//b. Should it be math.floor(a/b) or divmod(a,b)[0]? The advantage of the former is that floor(a/b) is arguably the definition of floor division. The advantage of the latter is

[issue36026] Different error message when sys.settrace is used (regressions)

2019-02-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Do I correctly understand the reported problem here? set.add(0) correctly raises TypeError in each case, but: (1) the exception message changes between versions; (2) and also changes depending on whether or not sys.trace is active. I don't think the

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset d5409eb6c26c6bca2686762ce0fd5223bb845e8a by Miss Islington (bot) (Tzu-ping Chung) in branch '2.7': [2.7] bpo-1104: msilib.SummaryInfo.GetProperty() truncates the string by one character (GH-4517) (GH-11749)

[issue36028] Integer Division discrepancy with decimal

2019-02-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm thinking this due to having two different algorithms in play, one of which has multiple intermediate roundings. * For starters, 0.4 is not exactly representable. It is stored as the binary fraction 3602879701896397 / 9007199254740992 represented in

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-18 Thread Steve Dower
Steve Dower added the comment: Yeah, I'm okay with it for 3.7.3 and future releases. The only change should need to be for the nuget preset in PC/layout/support/options.py -- ___ Python tracker

[issue36026] Different error message when sys.settrace is used (regressions)

2019-02-18 Thread SylvainDe
SylvainDe added the comment: This is mostly true and I agree that error messages are not part of the API. However, I'd like to add the following points: - the error message was more meaningful before - the fact that having system.settrace used or not changes the behaviour makes me think

[issue35904] Add statistics.fmean(seq)

2019-02-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: PR looks good to me, thanks Raymond. Just at the moment I'm having problems with my internet connection leading to technical difficulties with Github. Hopefully I can resolve this soon. -- ___ Python tracker

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-18 Thread Steven D'Aprano
Change by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2019-02-18 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2019-02-18 Thread Eryk Sun
Eryk Sun added the comment: Here's a WebDAV example: net use Z: \\live.sysinternals.com\tools Both st_dev (volume serial number) and st_ino (file number) are 0 for all files on this drive. _getfinalpathname also fails since WebDAV doesn't support the default FILE_NAME_NORMALIZED flag

[issue36028] Integer Division discrepancy with float

2019-02-18 Thread Tim Peters
Tim Peters added the comment: Thanks, Steven! I'll go on to suggest that the best intro to these issues for Python programmers is in Python's own tutorial: https://docs.python.org/3/tutorial/floatingpoint.html Raymond, `divmod(a, b)[0]` IS the mathematical `floor(a/b)`, where the latter

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ee0f927bd8dba805a04963dbec1ad49fe830b842 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +11950 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36028] Integer Division discrepancy with float

2019-02-18 Thread Au Vo
Au Vo added the comment: Thanks for the quick turnaround. I have done a little bit more thorough investigation and it does indeed the floating point that causes the behavior. The screenshot attached is done via Python3 from trinket.io. I will submit a screenshot of the Python 2 screenshot

[issue36028] Integer Division discrepancy with float

2019-02-18 Thread Au Vo
Au Vo added the comment: Here is the Python2 screenshot from trinket.io. There are discrepancies with 1,2,4,8,9, with 9 is given in Python2 and 10 is given in Python3. Again, sorry that Trinket.io does not specify which version of Python3 it implements. -- versions: +Python 2.7

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for writing this. I was NOT looking forward to tackling tests for this module. I have thought about merging delegator and colorizer into one module, possibly with percolator included, and adding a module docstring that explains how they work

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset 99e9c36b29a194d59ee4b0d8b82a72f5b0d409dd by Miss Islington (bot) in branch '3.7': bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472) https://github.com/python/cpython/commit/99e9c36b29a194d59ee4b0d8b82a72f5b0d409dd

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-18 Thread Tim Peters
Tim Peters added the comment: - Some form of this would be most welcome! - If it's spelled this way, put the modulus argument last? "Everyone expects" the modulus to come last, whether in code: x = (a+b) % m x = a*b % m x = pow(a, b, m) or in math: a^(k*(p-1)) =

[issue23689] Memory leak in Modules/sre_lib.h

2019-02-18 Thread Ma Lin
Ma Lin added the comment: Try to allocate SRE_REPEAT on state's stack, the performance has not changed significantly. It passes the other tests, except this one (test_stack_overflow): https://github.com/python/cpython/blob/v3.8.0a1/Lib/test/test_re.py#L1225-L1230 I'll try to fix issue35859,

[issue23689] Memory leak in Modules/sre_lib.h

2019-02-18 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +11951 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36022] [Security] logging.config should not use eval()

2019-02-18 Thread Carol Willing
Carol Willing added the comment: Assigning this to @Mariatta, to be worked on the mentored sprint at PyCon US Cleveland. -- assignee: -> Mariatta nosy: +Mariatta, willingc ___ Python tracker

[issue35798] duplicate SyntaxWarning: "is" with a literal

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e7a4bb554edb72fc6619d23241d59162d06f249a by Serhiy Storchaka in branch 'master': bpo-35798: Add test.support.check_syntax_warning(). (#11895) https://github.com/python/cpython/commit/e7a4bb554edb72fc6619d23241d59162d06f249a --

[issue35957] Indentation explanation is unclear

2019-02-18 Thread Carol Willing
Carol Willing added the comment: Assigning this to @Mariatta, to be worked on the mentored sprint at PyCon US Cleveland. Verify behavior and update documentation. -- assignee: docs@python -> Mariatta nosy: +Mariatta, willingc ___ Python tracker

[issue35798] duplicate SyntaxWarning: "is" with a literal

2019-02-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35798] duplicate SyntaxWarning: "is" with a literal

2019-02-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> pending ___ Python tracker ___

[issue36025] Breaking change in PyDate_FromTimeStamp API

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer option 2. Your PR LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36028] Integer Division discrepancy with decimal

2019-02-18 Thread Tim Peters
Tim Peters added the comment: "Multiple roundings" in the float code is a red herring - that's just implementation details trying to cheaply get the same effect as computing with infinite precision. Here with actual unbounded precision: >>> from fractions import Fraction >>> y =

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-18 Thread Windson Yang
Windson Yang added the comment: I think right now we can > Change mode() to return the first tie instead of raising an exception. This > is a behavior change but leaves you with the cleanest API going forward. as well as > Add a Deprecation warning to the current behavior of mode() when

[issue36028] Integer Division discrepancy with decimal

2019-02-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34203] documentation: recommend Python 3 over 2 in faq

2019-02-18 Thread abcdef
abcdef added the comment: Thank you. I understand this is fixed now and I'm marking the ticket as closed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36028] Integer Division discrepancy with float

2019-02-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Changing the title from referring to "decimal" to "float", since this has nothing to do with the decimal module or Decimal type. Like Raymond and Tim, I too cannot reproduce the claimed difference in behaviour between Python 2.7 and 3.x. Au Vo, there are

[issue34757] Placeholder for discussion on Combined patches for AIX - to resolve failig tests

2019-02-18 Thread Michael Felt
Michael Felt added the comment: The PR's have been merged. Many thanks. Closing this issue and looking forward. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36026] Different error message when sys.settrace is used (regressions)

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks this is due to the method calls optimization (issue26110). We now avoid to create a temporary bound method, and an error with different message is raised on this path. >>> set.add(0) Traceback (most recent call last): File "", line 1, in

[issue36027] Consider adding modular multiplicative inverse to the math module

2019-02-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If it's spelled this way, put the modulus argument last? Yes, that makes sense. > Years ago Guido signed off on spelling this > >pow(value, -1, modulus) +1 ;-) -- ___ Python tracker

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-18 Thread STINNER Victor
New submission from STINNER Victor : The webbrowser module uses WindowsDefault which calls os.startfile() and so can be abused to run arbitrary commands. WindowsDefault should do log a warning or raise an error if the URL is unsafe. I'm not sure how to build a list of safe URL schemes. At

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-18 Thread STINNER Victor
STINNER Victor added the comment: Vulnerability reported by Nassim Asrir to the PSRT. -- ___ Python tracker ___ ___

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @victor, the problem is with os.startfile or with WindowsDefault? just to know if we need to fix os.startfile or WindowsDefault. -- nosy: +matrixise ___ Python tracker

[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I am working on this issue. -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
New submission from palotasb-conti : Abstract: pyerrors.h defines snprintf as a macro on MSVC even on versions of MSVC where this workaround causes bugs. snprintf is defined as _snprintf in pyerrors.h, see:

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: For the version of MSVC, I have found this link: https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B -- ___ Python tracker ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thank you for your contribution. Have a nice day, -- ___ Python tracker ___ ___

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

2019-02-18 Thread Kobi Gana
Kobi Gana added the comment: We are on the same page and we should also consider marked this as defect. Thanks On Sun, Feb 17, 2019 at 7:44 PM nr wrote: > > nr added the comment: > > W3C allows both constructs, ampersand and semicolon. >

[issue35942] posixmodule.c:path_converter() returns an invalid exception message for broken PathLike objects

2019-02-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +11938 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35942] posixmodule.c:path_converter() returns an invalid exception message for broken PathLike objects

2019-02-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 09fbcd6085e18b534fd4161844ff39f77eb4a082 by Pablo Galindo in branch 'master': bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)

[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset ef110b18074300e2302a68a2a476ae35bead7916 by Miss Islington (bot) (Michael Felt) in branch 'master': bpo-35704: Prevent test_shutil fail result when AIX is 32-bit and MAXDATA < 0x2000 (GH-11500)

[issue36019] test_urllib fail in s390x buildbots

2019-02-18 Thread STINNER Victor
STINNER Victor added the comment: These random network failure occur with http://www.example.com/: https://github.com/python/cpython/pull/10608#issuecomment-464085852 I don't think that it's a good idea to use a public server for our tests. I would be better to use pythontest.net instead.

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread STINNER Victor
Change by STINNER Victor : -- title: test_urllib fail in s390x buildbots -> test_urllib fail in s390x buildbots: http://www.example.com/ ___ Python tracker ___

[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11937 stage: -> patch review ___ Python tracker ___ ___

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @steve.dower, @zach.ware I don't have a Windows machine, I could install an official VM of Windows and install MSVC but I don't have time, I am working for my customer but I could check my PR later (I will wait for the feedback of AppVeyor). Thank you for

[issue20215] socketserver.TCPServer can not listen IPv6 address

2019-02-18 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-02-18 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +11941 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread SilentGhost
Change by SilentGhost : -- nosy: +vinay.sajip type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35126] Mistake in FAQ about converting number to string.

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @xtreak, I have just submitted a PR but where I explain the change with Python2/3 and the division operator. Have a nice day, -- ___ Python tracker

[issue35942] posixmodule.c:path_converter() returns an invalid exception message for broken PathLike objects

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset a01065a3588d3f0d0c57ea35107aa97e722fe2b2 by Miss Islington (bot) in branch '3.7': bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11939 stage: -> patch review ___ Python tracker ___ ___

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @palotasb-conti I don't have MSVC because on I work on Linux. Could tell me if this PR fixes your issue? Thank you -- nosy: +matrixise stage: patch review -> ___ Python tracker

[issue35633] test_eintr fails on AIX since fcntl functions were modified

2019-02-18 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +11940 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: I'm not sure this is a problem with logging. The code immediately preceding the failure is: name = getattr(self.stream, 'name', '') if name: name += ' ' So, the failure occurs because the stream has a name attribute which is not a string. Even

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: sorry, error with my copy/paste/fixing_words: but my sentence was "could we mock the http requests?" -- ___ Python tracker ___

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Riccardo Magliocchetti
Riccardo Magliocchetti added the comment: Yeah, I'm not sure the pr is just papering over the real issue :) Need to check what io.open sets on name. IF it setting the fd as name instead of creating a string that would be still be a bug in Python to me. Could you please wait a bit for me to

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti added the comment: I have the following internal, almost-minimal test case for this bug. It also relies on Boost Python, but that could be eliminated to produce a similar test case. # CMakeLists.txt cmake_minimum_required(VERSION 3.0) project(python-boost-mcve)

[issue36022] [Security] logging.config should not use eval()

2019-02-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Some discussion in issue15452 about using ast.literal_eval instead of eval which I think is the similar to this report. -- nosy: +xtreak ___ Python tracker

[issue35954] Incoherent type conversion in configparser

2019-02-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +11943 stage: -> patch review ___ Python tracker ___ ___

[issue35954] Incoherent type conversion in configparser

2019-02-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Btw: The name "read_dict" [1] as well as its docstring say exactly the > opposite of what it does. It acts as a "save_dict". Maybe that can be fixed > on the go ... The name `read_dict` is correct, it reads from the dict given as parameter and changing the

[issue34294] re module: wrong capturing groups

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0 by Serhiy Storchaka (animalize) in branch 'master': bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)

[issue31829] Portability issues with pickle

2019-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I am not particularly interested in making Python 2 or ancient pickle protocols easier to use, sorry ;-) -- ___ Python tracker ___

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Use a public server or pythontest.net server (it's a public server on the Internet). could we the http requests? I use this practice for the unit test with an external web service, but for the integration tests, I prefer to use the real web service.

[issue36022] [Security] logging.config should not use eval()

2019-02-18 Thread STINNER Victor
STINNER Victor added the comment: The issue has been reported by Alexandre D'Hondt to th PSRT. I only selected Python 3.8 version, since currently, logging.config explicitly *documents* that eval() is used. Example: https://docs.python.org/3/library/logging.config.html#logging.config.listen

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: In Python 3.7.2: >>> open(2, 'a') <_io.TextIOWrapper name=2 mode='a' encoding='UTF-8'> >>> m = _ >>> m.name 2 >>> type(_) That is, when opening a file descriptor the name is set to the value of that file descriptor as an integer. BTW. The implementation

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-18 Thread STINNER Victor
STINNER Victor added the comment: > just to know if we need to fix os.startfile or WindowsDefault. webbrowser shouldn't call os.startfile with a path to a program on the local hard drive. -- ___ Python tracker

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-18 Thread STINNER Victor
STINNER Victor added the comment: > could we mock the http requests? No, the tests are functional tests which use deliberate HTTP request to public servers. I suggest to use a server that we control rather multiple "third-party" servers. I'm trying to keep a list of external services used

[issue34294] re module: wrong capturing groups

2019-02-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +11944 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-02-18 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti added the comment: @matrixise: It works on my machine. ;) I would also add a check for `defined(_MSC_VER)` before `_MSC_VER < 1900` because the `MS_WIN32` does not seem to imply that the `_MSC_VER` macro is defined [1]. The correct check could be either #if

[issue35945] Cannot distinguish between subtask cancellation and running task cancellation

2019-02-18 Thread twisteroid ambassador
twisteroid ambassador added the comment: There is a way to distinguish whether a task is being cancelled from the "inside" or "outside", like this: async def task1func(): task2 = asyncio.create_task(task2func()) try: await asyncio.wait((task2,)) except

[issue36023] Import configparser.ConfigParser repr

2019-02-18 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : This is the current repr of the configparser.ConfigParser instances: >>> import configparser >>> config = configparser.ConfigParser() >>> config['sec'] = {} >>> config I think this could be improved to read: -- components: Library (Lib) messages:

[issue31829] Portability issues with pickle

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This can help with migrating to Python 3. Python 2 programs often open files in text (default) mode for pickling and unpickling. With these changes you will get a warning when run the interpreter with the -3 option. You can also make the producer opening

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, Do you suggest if this VM is correct for the tests? I will try to check with this one. https://developer.microsoft.com/en-us/windows/downloads/virtual-machines -- ___ Python tracker

[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset 02c04f26dfa637db7091b7e16036a980bbf40893 by Miss Islington (bot) (Nick Coghlan) in branch 'master': bpo-35704: Include correct NEWS entry (GH-11914) https://github.com/python/cpython/commit/02c04f26dfa637db7091b7e16036a980bbf40893 --

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-18 Thread palotasb-conti
palotasb-conti added the comment: For the record, I am basing the version check code on Boost also: https://www.boost.org/doc/libs/1_65_1/boost/convert/detail/config.hpp -- ___ Python tracker

[issue35537] use os.posix_spawn in subprocess

2019-02-18 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- pull_requests: +11942 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36023] Import configparser.ConfigParser repr

2019-02-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34294] re module: wrong capturing groups

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your PR Ma Lin! -- keywords: +3.7regression resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34720] Fix test_importlib.test_bad_traverse for AIX

2019-02-18 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36022] [Security] logging.config should not use eval()

2019-02-18 Thread STINNER Victor
Change by STINNER Victor : -- title: logging.config should not use eval() -> [Security] logging.config should not use eval() ___ Python tracker ___

[issue36022] logging.config should not use eval()

2019-02-18 Thread STINNER Victor
New submission from STINNER Victor : For logging "handlers", _install_handlers() of logging.config uses eval(): def _install_handlers(cp, formatters): """Install and return handlers""" hlist = cp["handlers"]["keys"] ... for hand in hlist: ... klass =

[issue35942] posixmodule.c:path_converter() returns an invalid exception message for broken PathLike objects

2019-02-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36023] Improve configparser.ConfigParser repr

2019-02-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- title: Import configparser.ConfigParser repr -> Improve configparser.ConfigParser repr ___ Python tracker ___

[issue34294] re module: wrong capturing groups

2019-02-18 Thread miss-islington
miss-islington added the comment: New changeset 0e379d43acc25277f02262212932d3c589a2031b by Miss Islington (bot) in branch '3.7': bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546) https://github.com/python/cpython/commit/0e379d43acc25277f02262212932d3c589a2031b

[issue34572] C unpickling bypasses import thread safety

2019-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4371c0a9c0848f7a0947d43f26f234842b41efdf by Antoine Pitrou (tjb900) in branch 'master': bpo-34572: change _pickle unpickling to use import rather than retrieving from sys.modules (GH-9047)

[issue34572] C unpickling bypasses import thread safety

2019-02-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +11946 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36015] streamhandler cannot represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Change by Vinay Sajip : -- title: streamhandler canont represent streams with an integer as name -> streamhandler cannot represent streams with an integer as name ___ Python tracker

[issue36021] [Security][Windows] webbrowser: WindowsDefault uses os.startfile() and so can be abused to run arbitrary commands

2019-02-18 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- assignee: -> matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-02-18 Thread jt
jt added the comment: Just to add this, I now tested the proper pip upgrade approach, and it worked fine, like everything else I tried before (installing & using Cython, any other packages, ...). If there's anything else I should test, let me know! NuGet with venv/ensurepip would be awesome

[issue36024] ctypes: test_ctypes test_callbacks() crash on AArch64

2019-02-18 Thread STINNER Victor
New submission from STINNER Victor : Attached bug.py does crash *randomly* on AArch64. The code is extract from ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase.test_callbacks test. Example with Python 2.7.15 and Python 3.6.8 on RHEL8: # python2 bug.py Illegal instruction (core

[issue36011] ssl - tls verify on Windows fails

2019-02-18 Thread Christian Korneck
Christian Korneck added the comment: quick addition: It looks like all recent Windows versions (Win8/Server 2012, Win8.1/Server 2012R2, Win10 (older versions)/Server 2016, Win10-1809/Server 2019 behave the same (= only very few RootCAs are pre-installed out of the box, additional ones are

  1   2   >