* [large PATCH on GitHub] python/sepolgen: upgrade ply to release 3.11
@ 2018-12-21 20:53 Nicolas Iooss
2019-01-04 20:56 ` Petr Lautrbach
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2018-12-21 20:53 UTC (permalink / raw)
To: selinux
Hi,
I tried to send a large patch to the mailing list but it did not seem
to work. Therefore I opened
https://github.com/SELinuxProject/selinux/pull/117 and send now a
smaller version below.
Cheers,
Nicolas
----------------
PLY (Python Lex-Yacc) 3.11 has been released in February 2018:
- http://www.dabeaz.com/ply/index.html
- https://github.com/dabeaz/ply/releases/tag/3.11
Copy lex.py and yacc.py from this new release.
This fixes the following warning from "make test":
python run-tests.py
../src/./sepolgen/lex.py:634: DeprecationWarning: Using or importing
the ABCs from 'collections' instead of from 'collections.abc' is
deprecated, and in 3.8 it will stop working
if isinstance(t, collections.Callable):
(Python 3.3 moved collections.Callable to collections.abc.Callable)
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
python/sepolgen/src/sepolgen/lex.py | 1298 ++++---
python/sepolgen/src/sepolgen/yacc.py | 4930 ++++++++++++++++----------
scripts/run-flake8 | 4 +-
3 files changed, 3872 insertions(+), 2360 deletions(-)
diff --git a/python/sepolgen/src/sepolgen/lex.py
b/python/sepolgen/src/sepolgen/lex.py
index c13acef0507a..f95bcdbf1bb5 100644
--- a/python/sepolgen/src/sepolgen/lex.py
+++ b/python/sepolgen/src/sepolgen/lex.py
[Diff available on https://github.com/SELinuxProject/selinux/pull/117/files ]
diff --git a/python/sepolgen/src/sepolgen/yacc.py
b/python/sepolgen/src/sepolgen/yacc.py
index afef174849f2..88188a1e8ead 100644
--- a/python/sepolgen/src/sepolgen/yacc.py
+++ b/python/sepolgen/src/sepolgen/yacc.py
[Diff available on https://github.com/SELinuxProject/selinux/pull/117/files ]
diff --git a/scripts/run-flake8 b/scripts/run-flake8
index 207edd20dd89..6ad029fa6852 100755
--- a/scripts/run-flake8
+++ b/scripts/run-flake8
@@ -17,10 +17,8 @@ IGNORE_LIST="$IGNORE_LIST,E101" # indentation
contains mixed spaces and tabs
IGNORE_LIST="$IGNORE_LIST,E711" # comparison to None should be 'if
cond is not None:'
IGNORE_LIST="$IGNORE_LIST,E712" # comparison to False should be 'if
cond is False:' or 'if not cond:'
IGNORE_LIST="$IGNORE_LIST,E722" # do not use bare 'except'
-IGNORE_LIST="$IGNORE_LIST,E999" # TabError: inconsistent use of tabs
and spaces in indentation
IGNORE_LIST="$IGNORE_LIST,F401" # module imported but unused
-IGNORE_LIST="$IGNORE_LIST,F812" # list comprehension redefines 'f',
in lex.py and yacc.py
IGNORE_LIST="$IGNORE_LIST,F841" # local variable '...' is assigned to
but never used
@@ -75,4 +73,4 @@ IGNORE_LIST="$IGNORE_LIST,F405" # '...' may be
undefined, or defined from star i
IGNORE_LIST="$IGNORE_LIST,F811" # redefinition of unused ...
-exec flake8 --max-line-length=120
--builtins='_,unicode,lextab,parsetab' --ignore=",$IGNORE_LIST" "$@"
+exec flake8 --max-line-length=120 --builtins='_,basestring,unicode'
--ignore=",$IGNORE_LIST" "$@"
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [large PATCH on GitHub] python/sepolgen: upgrade ply to release 3.11
2018-12-21 20:53 [large PATCH on GitHub] python/sepolgen: upgrade ply to release 3.11 Nicolas Iooss
@ 2019-01-04 20:56 ` Petr Lautrbach
0 siblings, 0 replies; 2+ messages in thread
From: Petr Lautrbach @ 2019-01-04 20:56 UTC (permalink / raw)
To: selinux; +Cc: Nicolas Iooss
Nicolas Iooss <nicolas.iooss@m4x.org> writes:
> Hi,
> I tried to send a large patch to the mailing list but it did not seem
> to work. Therefore I opened
> https://github.com/SELinuxProject/selinux/pull/117 and send now a
> smaller version below.
> Cheers,
> Nicolas
I've ran several tests on this and since everything worked for me, I've
merged it. Thanks!
> ----------------
>
> PLY (Python Lex-Yacc) 3.11 has been released in February 2018:
> - http://www.dabeaz.com/ply/index.html
> - https://github.com/dabeaz/ply/releases/tag/3.11
>
> Copy lex.py and yacc.py from this new release.
>
> This fixes the following warning from "make test":
>
> python run-tests.py
> ../src/./sepolgen/lex.py:634: DeprecationWarning: Using or importing
> the ABCs from 'collections' instead of from 'collections.abc' is
> deprecated, and in 3.8 it will stop working
> if isinstance(t, collections.Callable):
>
> (Python 3.3 moved collections.Callable to collections.abc.Callable)
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
> python/sepolgen/src/sepolgen/lex.py | 1298 ++++---
> python/sepolgen/src/sepolgen/yacc.py | 4930 ++++++++++++++++----------
> scripts/run-flake8 | 4 +-
> 3 files changed, 3872 insertions(+), 2360 deletions(-)
>
> diff --git a/python/sepolgen/src/sepolgen/lex.py
> b/python/sepolgen/src/sepolgen/lex.py
> index c13acef0507a..f95bcdbf1bb5 100644
> --- a/python/sepolgen/src/sepolgen/lex.py
> +++ b/python/sepolgen/src/sepolgen/lex.py
> [Diff available on https://github.com/SELinuxProject/selinux/pull/117/files ]
>
> diff --git a/python/sepolgen/src/sepolgen/yacc.py
> b/python/sepolgen/src/sepolgen/yacc.py
> index afef174849f2..88188a1e8ead 100644
> --- a/python/sepolgen/src/sepolgen/yacc.py
> +++ b/python/sepolgen/src/sepolgen/yacc.py
> [Diff available on https://github.com/SELinuxProject/selinux/pull/117/files ]
>
> diff --git a/scripts/run-flake8 b/scripts/run-flake8
> index 207edd20dd89..6ad029fa6852 100755
> --- a/scripts/run-flake8
> +++ b/scripts/run-flake8
> @@ -17,10 +17,8 @@ IGNORE_LIST="$IGNORE_LIST,E101" # indentation
> contains mixed spaces and tabs
> IGNORE_LIST="$IGNORE_LIST,E711" # comparison to None should be 'if
> cond is not None:'
> IGNORE_LIST="$IGNORE_LIST,E712" # comparison to False should be 'if
> cond is False:' or 'if not cond:'
> IGNORE_LIST="$IGNORE_LIST,E722" # do not use bare 'except'
> -IGNORE_LIST="$IGNORE_LIST,E999" # TabError: inconsistent use of tabs
> and spaces in indentation
>
> IGNORE_LIST="$IGNORE_LIST,F401" # module imported but unused
> -IGNORE_LIST="$IGNORE_LIST,F812" # list comprehension redefines 'f',
> in lex.py and yacc.py
> IGNORE_LIST="$IGNORE_LIST,F841" # local variable '...' is assigned to
> but never used
>
>
> @@ -75,4 +73,4 @@ IGNORE_LIST="$IGNORE_LIST,F405" # '...' may be
> undefined, or defined from star i
> IGNORE_LIST="$IGNORE_LIST,F811" # redefinition of unused ...
>
>
> -exec flake8 --max-line-length=120
> --builtins='_,unicode,lextab,parsetab' --ignore=",$IGNORE_LIST" "$@"
> +exec flake8 --max-line-length=120 --builtins='_,basestring,unicode'
> --ignore=",$IGNORE_LIST" "$@"
> --
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-04 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21 20:53 [large PATCH on GitHub] python/sepolgen: upgrade ply to release 3.11 Nicolas Iooss
2019-01-04 20:56 ` Petr Lautrbach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).