[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



Re: "help( pi )"

2017-11-18 Thread Cameron Simpson

On 19Nov2017 11:49, Greg Ewing  wrote:

Cameron Simpson wrote:
one could change implementations such that applying a docstring to 
an object _removed_ it from the magic-shared-singleton pool,


Is there any need to bother? If another float happened to end
up with exactly the same value as pi and got merged with it,
the docstring wouldn't be wrong.


Unless one had a misfortune and wanted another docstring. For pi this might not 
be so likely, but consider:


 mod1.py:
   MAX_BUFSIZE = 8192
   MAX_BUFSIZE.__doc__ = 'Size of the hardware buffer used for I/O on this 
device.'

 mod2.py
   DEFAULT_CACHESIZE = 8192
   DEFAULT_CACHESIZE.__doc__ = 'Convenient size for the foo cache, not to big 
or too small.'

Cheers,
Cameron Simpson  (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list


Constants In Python (Posting On Python-List Prohibited)

2017-11-18 Thread Lawrence D’Oliveiro
Every (unqualified) name in Python is a variable. Which means its value can be 
changed. If you want something that has a value that cannot be changed, you 
have to make it an attribute of an object. For example, enums work this way. 
You could define an enum for constants, but enums are nominally opaque to some 
degree. If you want non-opaque constant definitions, how about this:

def constants(**kwargs) :
"defines an object with attributes that are given read-only" \
" values according to the keyword arguments passed."

class generator_class :
"parent class for generating constant-container instance."
pass
#end generator_class

def gen_constitem(name, val) :

def constitem(self) :
return \
val
#end constitem

#begin gen_constitem
constitem.__name__ = name
return \
property(constitem)
#end gen_constitem

#begin constants
for name in kwargs :
setattr(generator_class, name, gen_constitem(name, kwargs[name]))
#end for
return \
generator_class()
#end constants

Example use:

MY_CONSTS = constants \
  (
apple = "fruit",
count = 3,
compound = {"key" : "value"},
  )
print(MY_CONSTS.apple)
print(MY_CONSTS.count)
print(MY_CONSTS.compound)
MY_CONSTS.apple = 2.0
print(MY_CONSTS.apple)

produces output:

fruit
3
{'key': 'value'}

---
AttributeErrorTraceback (most recent call last)
 in ()
 31 print(MY_CONSTS.count)
 32 print(MY_CONSTS.compound)
---> 33 MY_CONSTS.apple = 2.0
 34 print(MY_CONSTS.apple)

AttributeError: can't set attribute

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: "help( pi )"

2017-11-18 Thread Gregory Ewing

Cameron Simpson wrote:
one could change implementations such that applying a docstring to an 
object _removed_ it from the magic-shared-singleton pool,


Is there any need to bother? If another float happened to end
up with exactly the same value as pi and got merged with it,
the docstring wouldn't be wrong.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: ctypes help

2017-11-18 Thread Python
Eryk,

Thanks much for the excellent and highly detailed response!  That made
a lot of things clear.

On Sat, Nov 18, 2017 at 10:56:27AM +, eryk sun wrote:
>  On Fri, Nov 17, 2017 at 10:11 PM, Python  wrote:
> >
> > I'm starting to play with ctypes, as I'd like to provide Python
> > interfaces to a C/C++ library I have.  For now I'm just messing with a
> > very simple piece of code to get things sorted out.  I'm working with
> > this example C++ library, which just wraps a call to stat():
> 
> Calling POSIX system functions via ctypes can be difficult if they use
> struct layouts that vary with the target platform and architecture.
> 
> > class Stat(ctypes.Structure):
> > _fields_ = [("st_dev", ctypes.c_ulong),
> > ("st_ino", ctypes.c_ulong),
> > ("st_mode", ctypes.c_ulong),
> > ("st_nlink", ctypes.c_ulong),
> > ("st_uid", ctypes.c_ulong),
> > ("st_gid", ctypes.c_ulong),
> 
> For x64 the above incorrectly uses 64-bit integers for mode, uid, and
> gid. Also, it has mode and nlink flipped around in the x86 order
> instead of the new x64 order.
> 
> > ("st_rdev", ctypes.c_ulong),
> > ("st_size", ctypes.c_ulonglong),
> > ("st_blksize", ctypes.c_ulonglong),
> > ("st_blocks", ctypes.c_ulonglong),
> > ("st_atim", Timespec),
> > ("st_mtim", Timespec),
> > ("st_ctim", Timespec)]
> 
> Try to strictly adhere to the defined types. Don't use `long long` for
> a `long`, even if it happens to be the same size in a given
> architecture. Also, avoid using definitions from docs and man pages.
> Use the exact headers that the compiler sees. In this case, you missed
> the 3 reserved long-integer fields at the end on x64 builds. Your Stat
> struct is 128 bytes overall instead of the required 144 bytes. glibc
> will corrupt the heap when it writes to the last 16 bytes. The best
> case is that this immediately crashes Python.
> 
> Below I've included an example ctypes wrapper for calling stat() on
> Linux x64 and x86 systems. I verified the sizes and offsets and tested
> in 64-bit Python. From a C test program, I also have the field sizes
> and offsets for the two 32-bit cases (with and without large file
> support), but I'd need to build 32-bit Python to verify that the
> ctypes wrapper is correct. I have no personal use for 32-bit Python,
> so I leave that part up to you.
> 
> C header definitions from time.h, bits/typesizes.h, bits/types.h, and
> bits/stat.h:
> 
> #define __DEV_T_TYPE   __UQUAD_TYPE
> #define __INO_T_TYPE   __SYSCALL_ULONG_TYPE
> #define __INO64_T_TYPE __UQUAD_TYPE
> #ifdef __x86_64__
> #define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
> #else
> #define __NLINK_T_TYPE __UWORD_TYPE
> #endif
> #define __MODE_T_TYPE  __U32_TYPE
> #define __UID_T_TYPE   __U32_TYPE
> #define __GID_T_TYPE   __U32_TYPE
> #define __OFF_T_TYPE   __SYSCALL_SLONG_TYPE
> #define __OFF64_T_TYPE __SQUAD_TYPE
> #define __BLKSIZE_T_TYPE   __SYSCALL_SLONG_TYPE
> #define __BLKCNT_T_TYPE__SYSCALL_SLONG_TYPE
> #define __BLKCNT64_T_TYPE  __SQUAD_TYPE
> #define __TIME_T_TYPE  __SYSCALL_SLONG_TYPE
> 
> struct timespec
> {
> __time_t tv_sec;
> __syscall_slong_t tv_nsec;
> };
> 
> struct stat
> {
> __dev_t st_dev;
> #ifndef __x86_64__
> unsigned short int __pad1;
> #endif
> #if defined __x86_64__ || !defined __USE_FILE_OFFSET64
> __ino_t st_ino;
> #else
> __ino_t __st_ino;
> #endif
> #ifndef __x86_64__
> __mode_t st_mode;
> __nlink_t st_nlink;
> #else
> __nlink_t st_nlink;
> __mode_t st_mode;
> #endif
> __uid_t st_uid;
> __gid_t st_gid;
> #ifdef __x86_64__
> int __pad0;
> #endif
> __dev_t st_rdev;
> #ifndef __x86_64__
> unsigned short int __pad2;
> #endif
> #if defined __x86_64__ || !defined __USE_FILE_OFFSET64
> __off_t st_size;
> #else
> __off64_t st_size;
> #endif
> __blksize_t st_blksize;
> #if defined __x86_64__  || !defined __USE_FILE_OFFSET64
> __blkcnt_t st_blocks;
> #else
> __blkcnt64_t st_blocks;
> #endif
> #ifdef __USE_XOPEN2K8
> struct timespec st_atim;
> struct timespec st_mtim;
> struct timespec st_ctim;
> #else
> __time_t st_atime;
> __syscall_ulong_t st_atimensec;
> __time_t st_mtime;
> __syscall_ulong_t st_mtimensec;
> __time_t st_ctime;
> __syscall_ulong_t st_ctimensec;
> #endif
> #ifdef __x86_64__
> __syscall_slong_t __glibc_reserved[3];
> #else
> #ifndef __USE_FILE_OFFSET64
> unsigned long int __glibc_reserved4;
> unsigned long int 

Re: Time travel - how to simplify?

2017-11-18 Thread Peter Otten
Andrew Z wrote:

> well, yeah, it's unidirectional and final destination is always the same
> and have little to do with the question.
> 
> Say, i have a dict:
> 
> fut_suffix ={ 1 : 'F',
>   2 : 'G',
>   3 : 'H',
>   4 : 'J',
>   5 : 'K',
>   6 : 'M',
>   7 : 'N',
>   8 : 'Q',
>   9 : 'U',
>   10: 'V',
>   11: 'X',
>   12: 'Z'
>   }
> 
> where key is a month.
> Now i want to get certain number of months. Say, i need  3 months duration
> starting from any month in dict.
> 
> so if i start @ 7th:
> my_choice =7
>  for mnth, value in fut_suffix:
> if my_choice >= mnth
># life is great
> but if :
> my_choice = 12 then my "time travel" becomes pain in the neck..
> 
> And as such - the question is - what is the smart way to deal with cases
> like this?

Make a lookup list that is big enough for your application and then use 
slicing:

>>> def months(first, count, lookup=list("FGHJKMNQUVXZ" * 3)):
... start = first - 1
... return lookup[start: start + count]
... 
>>> months(3, 3)
['H', 'J', 'K']
>>> months(12, 3)
['Z', 'F', 'G']


-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: Time travel - how to simplify?

2017-11-18 Thread Andrew Z
Thank you for your input, gentlemen.

I'm thinking about the following approach:

import datetime
from dateutil import relativedelta

fut_suffix ={ 1 : 'F',
  2 : 'G',
  3 : 'H',
  4 : 'J',
  5 : 'K',
  6 : 'M',
  7 : 'N',
  8 : 'Q',
  9 : 'U',
  10: 'V',
  11: 'X',
  12: 'Z'
  }

endDate = datetime.date.today()
startDate = endDate + relativedelta.relativedelta(months = -6,day = 1)

LocalSmlSuffix = [ suffix for mnth, suffix in fut_suffix.items() if
mnth == startDate.month]


On Tue, Nov 14, 2017 at 5:01 PM, Rick Johnson 
wrote:

> On Tuesday, November 14, 2017 at 1:44:17 PM UTC-6, Ben Finney wrote:
> > Andrew Z  writes:
> >
> > > Now i want to get certain number of months. Say, i need  3 months
> duration
> > > starting from any month in dict.
> > >
> > > so if i start @ 7th:
> > > my_choice =7
> > >  for mnth, value in fut_suffix:
> > > if my_choice >= mnth
> > ># life is great
> > > but if :
> > > my_choice = 12 then my "time travel" becomes pain in the neck..
> >
> > The ‘itertools’ library in the Python standard library
> >  has what you
> > need:
> >
> > import itertools
> >
> > month_values = sorted(list(fut_suffix.keys()))
> > month_cycle = itertools.cycle(month_values)
> >
> > month_choice = 7
> > three_months_starting_at_choice = []
> > while len(three_months_starting_at_choice) < 3:
> > this_month = next(month_cycle)
> > if this_month >= month_choice:
> > three_months_starting_at_choice.append(this_month)
>
> Ben's advice is spot on[1], and exactly what i would do, but
> i believe it's important for you to discover how to
> implement a simple cycling algorithm yourself, _before_
> reaching for the pre-packaged junkfood in the itertools
> module. Can you do it? If not, then do as much as you can
> and then ask for help. Hey, you're only hurting yourself if
> you don't learn how. And it's surprisingly easy!
>
> [1] and it looks as though he included the kitchen sink,
> washcloths, dish soap, and some fine china as well! ಠ_ಠ
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: for/ if against dict - one liner

2017-11-18 Thread Andrew Z
Gentlemen,
 thank you very much for the replies and help.

Vincent's solution worked perfectly for me.
Alister - you are correct and for me, i was looking to achieve that -
readability and slightly less keystrokes.

On Tue, Nov 14, 2017 at 4:59 AM, alister via Python-list <
python-list@python.org> wrote:

> On Tue, 14 Nov 2017 00:44:18 -0500, Andrew Z wrote:
>
> > Hello,
> >  i wonder how do i get the "for" and "if" to work against a dictionary
> >  in
> > one line?
> >
> > basically i want to "squeeze":
> >  dct= [ 1 : "one", 2:"two", 3:"three"]
> >  for k, val in dct:
> >if k >= 2:
> >   # do magnificent things
> >
> > Thank you AZ
>
> why the need to single line it?
> is your computer running out of new line & space characters?
> it probably could be done with a dictionary comprehension but will that
> make things easier or harder to read/understand?
>
> "Readability counts"
>
>
>
>
> --
> (Presuming for the sake of argument that it's even *possible* to design
> better code in Perl than in C.  :-)
> -- Larry Wall on core code vs. module code design
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: Test - you can ignore

2017-11-18 Thread Skip Montanaro
On Saturday, November 18, 2017 at 7:28:56 AM UTC-6, Skip Montanaro wrote:
> This is a test posting from the Usenet side of things. Looking to see if/when 
> it turns up in the gate_news logs on mail.python.org...
> 
> Skip

Yet another test. This time with SpamBayes x-mine_usenet_headers setting 
enabled...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Test - you can ignore

2017-11-18 Thread Skip Montanaro
On Saturday, November 18, 2017 at 7:28:56 AM UTC-6, Skip Montanaro wrote:
> This is a test posting from the Usenet side of things. Looking to see if/when 
> it turns up in the gate_news logs on mail.python.org...

This is another test, though with a bit more Python content...

(python2) ~% python -c 'import this'
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

#!/usr/bin/env python

from __future__ import print_function

import csv
import glob
import os
import sys
import shutil

rows = csv.DictReader(open("manifest.dump", "rb"), 
  fieldnames="sha1 domain path flag".split(),
  delimiter='|')
for row in rows:
if (row["path"].lower().endswith(".jpg") or
row["path"].lower().endswith(".jpeg")):
src = glob.glob("caa*/*/{}".format(row["sha1"]))
if not src:
print("not found:", row["path"], file=sys.stderr)
continue
dst = os.path.join("iPhone", row["path"])
shutil.copy(src[0], dst)
print(dst)
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: Python dos2unix one liner

2017-11-18 Thread Chris Angelico
On Sat, Nov 18, 2017 at 9:42 PM,   wrote:
> Hello,
>
> I need to perform a tp on semaphores and shared segments of memory, but I 
> have a bit of trouble with the first notion.

A tp? Sorry, not something I'm familiar with.

> We are asked here to use only the IPC system 5 objects that are the shared 
> memory segments and semaphores.
>
> So we will have our semaphores as the only synchronization mechanism.
>
> So I create my 3 programs, with a shared memory segment for different 
> information (maximum capacity and file)
>
> On the other hand, I can not really know how to use semaphores.

Okay, sounds like you want to research IPC a bit before you go on. Are
you looking for advice on where to start researching? If so, my first
question to you is: What platform or platforms do you need this to run
on? IPC is notoriously difficult to manage in a truly cross-platform
way, particularly if you need performance.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: ctypes help

2017-11-18 Thread eryk sun
 On Fri, Nov 17, 2017 at 10:11 PM, Python  wrote:
>
> I'm starting to play with ctypes, as I'd like to provide Python
> interfaces to a C/C++ library I have.  For now I'm just messing with a
> very simple piece of code to get things sorted out.  I'm working with
> this example C++ library, which just wraps a call to stat():

Calling POSIX system functions via ctypes can be difficult if they use
struct layouts that vary with the target platform and architecture.

> class Stat(ctypes.Structure):
> _fields_ = [("st_dev", ctypes.c_ulong),
> ("st_ino", ctypes.c_ulong),
> ("st_mode", ctypes.c_ulong),
> ("st_nlink", ctypes.c_ulong),
> ("st_uid", ctypes.c_ulong),
> ("st_gid", ctypes.c_ulong),

For x64 the above incorrectly uses 64-bit integers for mode, uid, and
gid. Also, it has mode and nlink flipped around in the x86 order
instead of the new x64 order.

> ("st_rdev", ctypes.c_ulong),
> ("st_size", ctypes.c_ulonglong),
> ("st_blksize", ctypes.c_ulonglong),
> ("st_blocks", ctypes.c_ulonglong),
> ("st_atim", Timespec),
> ("st_mtim", Timespec),
> ("st_ctim", Timespec)]

Try to strictly adhere to the defined types. Don't use `long long` for
a `long`, even if it happens to be the same size in a given
architecture. Also, avoid using definitions from docs and man pages.
Use the exact headers that the compiler sees. In this case, you missed
the 3 reserved long-integer fields at the end on x64 builds. Your Stat
struct is 128 bytes overall instead of the required 144 bytes. glibc
will corrupt the heap when it writes to the last 16 bytes. The best
case is that this immediately crashes Python.

Below I've included an example ctypes wrapper for calling stat() on
Linux x64 and x86 systems. I verified the sizes and offsets and tested
in 64-bit Python. From a C test program, I also have the field sizes
and offsets for the two 32-bit cases (with and without large file
support), but I'd need to build 32-bit Python to verify that the
ctypes wrapper is correct. I have no personal use for 32-bit Python,
so I leave that part up to you.

C header definitions from time.h, bits/typesizes.h, bits/types.h, and
bits/stat.h:

#define __DEV_T_TYPE   __UQUAD_TYPE
#define __INO_T_TYPE   __SYSCALL_ULONG_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#ifdef __x86_64__
#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
#else
#define __NLINK_T_TYPE __UWORD_TYPE
#endif
#define __MODE_T_TYPE  __U32_TYPE
#define __UID_T_TYPE   __U32_TYPE
#define __GID_T_TYPE   __U32_TYPE
#define __OFF_T_TYPE   __SYSCALL_SLONG_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __BLKSIZE_T_TYPE   __SYSCALL_SLONG_TYPE
#define __BLKCNT_T_TYPE__SYSCALL_SLONG_TYPE
#define __BLKCNT64_T_TYPE  __SQUAD_TYPE
#define __TIME_T_TYPE  __SYSCALL_SLONG_TYPE

struct timespec
{
__time_t tv_sec;
__syscall_slong_t tv_nsec;
};

struct stat
{
__dev_t st_dev;
#ifndef __x86_64__
unsigned short int __pad1;
#endif
#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino;
#else
__ino_t __st_ino;
#endif
#ifndef __x86_64__
__mode_t st_mode;
__nlink_t st_nlink;
#else
__nlink_t st_nlink;
__mode_t st_mode;
#endif
__uid_t st_uid;
__gid_t st_gid;
#ifdef __x86_64__
int __pad0;
#endif
__dev_t st_rdev;
#ifndef __x86_64__
unsigned short int __pad2;
#endif
#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size;
#else
__off64_t st_size;
#endif
__blksize_t st_blksize;
#if defined __x86_64__  || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks;
#else
__blkcnt64_t st_blocks;
#endif
#ifdef __USE_XOPEN2K8
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
#else
__time_t st_atime;
__syscall_ulong_t st_atimensec;
__time_t st_mtime;
__syscall_ulong_t st_mtimensec;
__time_t st_ctime;
__syscall_ulong_t st_ctimensec;
#endif
#ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
#else
#ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
#else
__ino64_t st_ino;
#endif
#endif
};


ctypes:

import os
import sys
import ctypes
import ctypes.util

libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)

def c_errcheck(result, func, args):
if result == -1:
err = ctypes.get_errno()
raise OSError(err, os.strerror(err))
return args

class 

Re: Python dos2unix one liner

2017-11-18 Thread gabsiwided12
Hello,

I need to perform a tp on semaphores and shared segments of memory, but I have 
a bit of trouble with the first notion.

In short, we are asked to create 3 programs:

The first director, who with the create capacity file argument, will create the 
museum with the different IPC system objects with the maximum capacity given in 
argument and the maximum number of visitors in the maximum queue given by the 
last argument.

The open and close arguments will open or close the museum.

The delete argument will delete the museum and IPC System 5 objects.

Then, the controller program, called without argument, will ensure that the 
current capacity of the museum does not exceed the maximum capacity.

Finally, the visitor program simulates the arrival of a visitor, with the time 
remaining in the arguments. It is called as many times as there are visitors. A 
visitor ends if the queue exceeds the limit set at creation, otherwise he asks 
for permission to enter the museum.

We are asked here to use only the IPC system 5 objects that are the shared 
memory segments and semaphores.

So we will have our semaphores as the only synchronization mechanism.

So I create my 3 programs, with a shared memory segment for different 
information (maximum capacity and file)

On the other hand, I can not really know how to use semaphores.

Should I create a binary semaphore already for the case of open or close museum?

Also, I do not really see how to implement everything in the case where we have 
to share information between 3 programs and suddenly how to implement 
semaphores of this kind ...

thank you in advance

-- 
https://mail.python.org/mailman/listinfo/python-list


[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