[issue12202] Check status returns in msilib.SummaryInformation.GetProperty()

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue12239] msilib VT_EMPTY SummaryInformation properties raise an error (suggest returning None)

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



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

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-18 Thread Berker Peksag

Berker Peksag  added the comment:

I've opened PR 4459 to fix this. Here's a simple reproducer I adapted from the 
script uploaded by uday kiran in issue 32064.

--
nosy: +berker.peksag, uday kiran
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue32064] python msilib view.fetch is not returning none

2017-11-18 Thread Berker Peksag

Berker Peksag  added the comment:

Issue 1102 is still open so this bug is not fixed yet. I've just opened PR 4459 
to fix it.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add support for _msi.Record.GetString() and 
_msi.Record.GetInteger()
type: crash -> behavior

___
Python tracker 

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-18 Thread Berker Peksag

Change by Berker Peksag :


--
keywords: +patch
pull_requests: +4396

___
Python tracker 

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



[issue31875] Error 0x80070642: Failed to install MSI package.

2017-11-18 Thread Nick Coghlan

Change by Nick Coghlan :


--
keywords: +patch
pull_requests: +4395
stage:  -> patch review

___
Python tracker 

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



[issue32022] Python crashes with mutually recursive code

2017-11-18 Thread Jesse Bakker

Jesse Bakker  added the comment:

On linux x86-64 with python 3.6.3 and python 3.7.0a2+ I get a RecursionError: 
maximum recursion depth exceeded.

--
nosy: +Jesse Bakker

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I think this would be a useful enhancement.  Feel free to open a PR.  I haven't 
looked at your implementation, but you'll also need to add tests for it.

--
nosy: +ezio.melotti, michael.foord, pitrou, rbcollins
stage:  -> needs patch
versions: +Python 3.7

___
Python tracker 

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



[issue32073] Add copy_directory_metadata parameter to shutil.copytree

2017-11-18 Thread desbma

Change by desbma :


--
keywords: +patch
pull_requests: +4394
stage:  -> patch review

___
Python tracker 

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



[issue32072] Issues with binary plists

2017-11-18 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4393
stage:  -> patch review

___
Python tracker 

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



[issue32073] Add copy_directory_metadata parameter to shutil.copytree

2017-11-18 Thread desbma

New submission from desbma :

I am sometimes using shutil.copytree to copy a directory to a destination that 
does not support setting metadata (like MTP mounts of Android devices).

Using the copy_function parameter allows passing shutil.copy or a custom 
function to ignore file metadata, however currently shutil.copytree always 
tries to call copystat on directories, which can fail with OSError (errno set 
to ENOTSUPP).

The code assumes copystat can fail on Windows, but propagates the error on 
other OS, even though the tree copy actually succeeds.
See 
https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L352-L357

--
components: Library (Lib)
messages: 306494
nosy: desbma
priority: normal
severity: normal
status: open
title: Add copy_directory_metadata parameter to shutil.copytree
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32072] Issues with binary plists

2017-11-18 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

plistlib creates a new objects when read references instead of using
already read object.

As result it doesn't preserve identity:

>>> import plistlib
>>> a = [['spam']]*2
>>> a[0] is a[1]
True
>>> b = plistlib.loads(plistlib.dumps(a, fmt=plistlib.FMT_BINARY))
>>> b == a
True
>>> b[0] is b[1]
False

And plistlib.loads() is vulnerable to plists containing cyclic
references (as was exposed in issue31897). For example,
plistlib.loads(b'bplist00\xa1\x00\x08\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a')
could return a list containing itself, but it is failed with
RecursionError.

plistlib.dumps() preserves reference in the output, but it saves
redundant copies. For example plistlib.dumps([[]]*5,
fmt=plistlib.FMT_BINARY) saves a list containing 5 identical empty
lists, but it saves an empty list 5 times, and only the last copy is
used. The other 4 copies are not referenced and just spent the file
volume and the space of reference numbers. Saving
['spam']*100]*100]*100]*100]*100 will result in a multigigabyte,
while less than a kilobyte would be enough for saving it. Loading
properly saved ['spam']*100]*100]*100]*100]*100 withe the current
plistlib.loads() will cause consuming many gigabytes of memory.

1. The issues with plistlib.dumps() are:
1a) Inefficient saving data with references. This is minor resource usage issue.
1b) Impossibility to save a data with cyclic references. This is a
lack of a feature.

2. The issues with plistlib.loads() are:
2a) Inefficient loading data with references. This can be not just a
resource usage issue, but a security issue. Loading an malicious input
data smaller than 100 byte ([[[...]*2]*2]*2) can cause consuming many
gigabytes of memory.
2b) Impossibility to load a data with cyclic references. This is a
lack of a feature, but can be lesser security issue. Small malicious
input can cause RecursionError. If the recursion limit is set high and
you are unlucky it can cause a stack overflow.

Security issues affect you only when you load plists from untrusted sources.

Adding the proper support of references could be considered a new
feature, but taking to account security issues it should be backported
up to 3.4 when the support of binary plists was added.

--
assignee: serhiy.storchaka
components: Library (Lib)
messages: 306493
nosy: ned.deily, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Issues with binary plists
type: security
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-18 Thread Jonas H.

Jonas H.  added the comment:

Just to be clear, the current implementation is limited to substring matches. 
It doesn't support py.test like "and/or" combinators. (Actually, py.test uses 
'eval' to support arbitrary patterns.)

So say we have test case

SomeClass
test_foo
test_bar

Then

- python -m unittest -k fo matches "test_foo"
- python -m unittest -k Some matches "test_foo" and "test_bar"
- python -m unittest -k some matches nothing

The -k option may be used multiple times, combining the patterns with "or":

- python -m unittest -k fo -k b matches "test_foo" and "test_bar"

It's also possible to use glob-style patterns, like -k "spam_*_eggs".

--

___
Python tracker 

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



[issue32067] Deprecate accepting unrecognized braces in regular expressions

2017-11-18 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Since this will require changing regular expressions in several places in the 
stdlib I have chosen emitting PendingDeprecationWarning and long deprecation 
period.

But I'm now not sure that this is a good idea. Non-escaped braces can be used 
much in a wild. It may be better to use other heuristic for recognizing the 
fuzzy matching and other possible extensions that use braces.

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-18 Thread Jonas H.

New submission from Jonas H. :

I'd like to add test selection based on parts of the test class/method name to 
unittest. Similar to py.test's "-k" option: 
https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name

Here's a proof of concept implementation: 
https://github.com/jonashaag/cpython/compare/master...unittest-select

Is this something others find useful as well? If so, I'd like to work on 
getting this into Python stdlib proper. This is my first time contributing to 
the unittest framework; is the general approach taken in my PoC implementation 
correct in terms of abstractions? How can I improve the implementation?

Jonas

--
components: Library (Lib)
messages: 306490
nosy: jonash
priority: normal
severity: normal
status: open
title: Add py.test-like "-k" test selection to unittest
type: enhancement

___
Python tracker 

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



[issue32067] Deprecate accepting unrecognized braces in regular expressions

2017-11-18 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4392
stage:  -> patch review

___
Python tracker 

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



[issue32070] Clarify the behavior of the staticmethod builtin

2017-11-18 Thread Jesse SHapiro

New submission from Jesse SHapiro :

It looks like the original staticmethod docstring might have been based on the 
classmethod docstring, and it seems like the current description might not be 
accurate.

Current string:

...It can be called either on the class (e.g. C.f()) or on an instance (e.g. 
C().f()); the instance is ignored except for its class...

Proposed change:

It can be called either on the class (e.g. C.f()) or on an instance (e.g. 
C().f()). Both the class and the instance are ignored, and neither is passed 
implicitly as the first argument to the method.

--
assignee: docs@python
components: Documentation
messages: 306489
nosy: docs@python, haikuginger
priority: normal
pull_requests: 4391
severity: normal
status: open
title: Clarify the behavior of the staticmethod builtin
type: enhancement

___
Python tracker 

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



[issue32004] Allow specifying code packing order in audioop adpcm functions

2017-11-18 Thread MosesofEgypt

MosesofEgypt  added the comment:

Changed type to behavior as this is more of a bug fix than an enhancement.

--
type: enhancement -> behavior

___
Python tracker 

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



[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-18 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue32031] Do not use the canonical path in pydoc test_mixed_case_module_names_are_lower_cased

2017-11-18 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset ebfaa71c2e8c018f72c179395dafaf06dcaf29e2 by xdegaye in branch 
'master':
bpo-32031: Fix pydoc `test_mixed_case_module_names_are_lower_cased` (GH-4441)
https://github.com/python/cpython/commit/ebfaa71c2e8c018f72c179395dafaf06dcaf29e2


--

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Andrew Svetlov

Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue29185] test_distutils fails on Android API level 24

2017-11-18 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue29185] test_distutils fails on Android API level 24

2017-11-18 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset d34d8fc24f23ccff5de03c9277da5acbbdc30e90 by xdegaye in branch 
'master':
bpo-29185: Fix `test_distutils` failures on Android (GH-4438)
https://github.com/python/cpython/commit/d34d8fc24f23ccff5de03c9277da5acbbdc30e90


--

___
Python tracker 

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



[issue29184] skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)

2017-11-18 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue29184] skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)

2017-11-18 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 9001d1f438e968f4d327313e0a95a49f22e724f4 by xdegaye in branch 
'master':
bpo-29184: Skip test_socketserver tests on PermissionError raised by Android 
(GH-4387)
https://github.com/python/cpython/commit/9001d1f438e968f4d327313e0a95a49f22e724f4


--

___
Python tracker 

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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-18 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
nosy: +brett.cannon, martin.panter, twouters

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4390

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 51d546ae4d563fde608e23c9c337fefd7e95c93f by Andrew Svetlov in 
branch 'master':
bpo-32069: Drop legacy SSL transport (#4451)
https://github.com/python/cpython/commit/51d546ae4d563fde608e23c9c337fefd7e95c93f


--

___
Python tracker 

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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-18 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
keywords: +patch
pull_requests: +4389
stage: needs patch -> patch review

___
Python tracker 

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



[issue1647489] zero-length match confuses re.finditer()

2017-11-18 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +Library (Lib)
nosy: +ezio.melotti
type:  -> behavior

___
Python tracker 

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



[issue1647489] zero-length match confuses re.finditer()

2017-11-18 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee: niemeyer -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +4388
stage:  -> patch review

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Yury Selivanov

Yury Selivanov  added the comment:

+1

--

___
Python tracker 

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



[issue32069] Drop loop._make_legacy_ssl_transport

2017-11-18 Thread Andrew Svetlov

New submission from Andrew Svetlov :

It uses `wrap_socket` and exists only for backward compatibility with Python 
without ssl.MemoryBIO, which is Python 3.4

Let's cut it out from Python 3.7 and 3.6 -- it's safe, pretty sure.

--
components: Library (Lib), asyncio
messages: 306482
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Drop loop._make_legacy_ssl_transport
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue31943] Add asyncio.Handle.cancelled() method

2017-11-18 Thread Marat Sharafutdinov

Change by Marat Sharafutdinov :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue32068] textpad from curses package isn't handling backspace key

2017-11-18 Thread Slava Bacherikov

New submission from Slava Bacherikov :

textpad isn't handling backspace key on my system and seems on others too. When 
I press backspace key, terminal sends `ascii.DEL` (127) and it isn't handled by 
textpad.

I've attached patch that fixes this, should I also create PR for this or patch 
is enough ?

--
components: Library (Lib)
files: textpad.patch
keywords: patch
messages: 306481
nosy: bacher09
priority: normal
severity: normal
status: open
title: textpad from curses package isn't handling backspace key
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file47272/textpad.patch

___
Python tracker 

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



[issue31943] Add asyncio.Handle.cancelled() method

2017-11-18 Thread Andrew Svetlov

Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD and NetBSD

2017-11-18 Thread Stefan Krah

Stefan Krah  added the comment:

I found an unused i386 box with OpenBSD and Linux (so no VM):

A C program with tan(1.5707963267948961) is wrong on both systems.

fdlibm (directly from netlib.org) is correct on both systems.


Both OS versions are relatively old, so I cannot file an upstream issue.

I was planning to dig through the fdlibm code if there was an issue,
but it produces the correct results.

--

___
Python tracker 

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



[issue32067] Deprecate accepting unrecognized braces in regular expressions

2017-11-18 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
title: Deprecate accepting -> Deprecate accepting unrecognized braces in 
regular expressions

___
Python tracker 

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



[issue32067] Deprecate accepting

2017-11-18 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Currently `{m}`, `{m,n}`, `{m,}` and `{,n}` where m and n are non-negative 
decimal numbers are accepted in regular expressions as quantifiers that mean 
repeating the previous RE from m (0 by default) to n (infinity by default) 
times.

But if the opening brace '{'is not followed by one of the above patterns, it 
means just the literal '{'.

>>> import re
>>> re.search('(foobar){e}', 'xirefoabralfobarxie')
>>> re.search('(foobar){e}', 'foobar{e}')


This conflicts with the regex module which uses braces for defining the "fuzzy" 
matching.

>>> import regex
>>> regex.search('(foobar){e}', 'xirefoabralfobarxie')

>>> regex.search('(foobar){e}', 'foobar{e}')


I don't think it is worth to add support of fuzzy matching in the re module, 
but for compatibility it would be better to raise an error or a warning in case 
of '{' not following by the one of the recognized patterns. This could also 
help to catch typos and errors in regular expressions, i.e. in '-{1.2}' or 
'-{1, 2}' instead of '-{1,2}'.

Possible variants:

1. Emit a DeprecationWarning in 3.7 (and 2.7.15 with the -3 option), raise a 
re.error in 3.8 or 3.9.

2. Emit a PendingDeprecationWarning in 3.7, a DeprecationWarning in 3.8, and 
raise a re.error in 3.9 or 3.10.

3. Emit a RuntimeWarning or SyntaxWarning in 3.7 and forever.

4. Emit a FutureWarning in 3.7, and implement the fuzzy matching or replace re 
with regex sometimes in future. Unlikely.

--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
messages: 306479
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Deprecate accepting
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD and NetBSD

2017-11-18 Thread Stefan Krah

Stefan Krah  added the comment:

Tim has mentioned the high quality of fdlibm, and indeed I cannot
reproduce the issue:

wget -r http://www.netlib.org/fdlibm/

Then build libm with or without optimizations, with or without -m32,
gcc or clang.


Then compile a C program that calls tan(1.5707963267948961).


This is a bit treacherous, because gcc apparently has a builtin
tan(), so one needs to make sure that it actually uses fdlibm.

gcc-4.7 -fno-builtin -O3 -m32 -Wall -W -o xxx xxx.c libm.a


All is fine here (Ubuntu Linux).

--

___
Python tracker 

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



[issue32050] Deprecated python3 -x option

2017-11-18 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, I will update the doc instead of deprecating the option.

--

___
Python tracker 

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



[issue32050] Deprecated python3 -x option

2017-11-18 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It seems to me that the best way is to add the following line at the start of 
the script:

@path\to\python -x %0 %* & exit /b

Or

@py -3 -x %0 %* & exit /b

--

___
Python tracker 

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