[issue41165] [Python 3.10] Remove APIs deprecated long enough

2021-08-18 Thread Hugo van Kemenade


Hugo van Kemenade  added the comment:

## unittest

What's needed to move forward with removing the deprecated aliases?

A deprecation warning is shown for `python3 -m unittest test_bar` and `python3 
test_bar.py` (tested Python 3.6-3.10).

No deprecation warning is shown for `python setup.py test`, however, both 
setuptools and pytest have deprecated/discouraged `python setup.py test`:

https://github.com/pypa/setuptools/pull/1878
https://github.com/pytest-dev/pytest/pull/5546
https://github.com/pytest-dev/pytest/issues/5534

Docs already mention they are deprecated:

https://docs.python.org/3/library/unittest.html#deprecated-aliases

> At a bare minimum you should list removed features in the 3.9 changelog and 
> porting guide as "will be removed in 3.10". I would even argue to add 
> deprecation warnings to the code in 3.9 (with permission from the RM). If the 
> RM is against deprecation warnings, then it might be good idea to postpone 
> removal to 3.11.

So at this stage (3.10 in RC), do we need to list them in the 3.11 changelog 
and porting guide as "will be removed in 3.12"?

--
nosy: +hugovk

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2021-06-09 Thread Inada Naoki


Change by Inada Naoki :


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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-05 Thread miss-islington


miss-islington  added the comment:


New changeset 1ce59f0421d9550762977454bda22db750aa20aa by Miss Islington (bot) 
in branch '3.9':
bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)
https://github.com/python/cpython/commit/1ce59f0421d9550762977454bda22db750aa20aa


--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +20493
pull_request: https://github.com/python/cpython/pull/21345

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-05 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 9ce8132e1f2339cfe116dfd4795574182c2245b4 by Inada Naoki in branch 
'master':
bpo-41165: Deprecate PyEval_ReleaseLock() (GH-21309)
https://github.com/python/cpython/commit/9ce8132e1f2339cfe116dfd4795574182c2245b4


--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Adding Miro since Fedora will be testing Python 3.10 and deprecated API 
removals here might potentially affect libraries like Python 3.9 testing.

--
nosy: +hroncok

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-03 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +20461
pull_request: https://github.com/python/cpython/pull/21309

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-03 Thread Inada Naoki


Inada Naoki  added the comment:

As we discussed in ML, PyEval_ReleaseLock is still used and removing may be not 
simple. Keep it as-is until Python 4.0.

--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

Hmm.  You are right. The warnings are shown by default.

On the other hand, some project uses custom `setup.py test` command. It hides 
the DeprecationWarning.

https://github.com/warner/python-ed25519/blob/master/setup.py
https://github.com/warner/python-ed25519/blob/master/src/ed25519/test_ed25519.py#L42

How about emitting FutureWarning instead of DeprecationWarning?

DeprecationWarning is hidden to avoid end users see noisy warnings.
But test is for developers, not end users.

--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> For the record, I noticed DeprecationWarning is not shown by unittest.runner 
> by default.

There is an open issue for this but I think it's enabled by default 
https://bugs.python.org/issue39892

$ cat /tmp/test_bar.py
import unittest
import warnings


class TestFoo(unittest.TestCase):

def test_foo(self):
self.assertEquals(1, 1)


if __name__ == "__main__":
unittest.main()

$ python3.8 -m unittest test_bar
/private/tmp/test_bar.py:8: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(1, 1)
.
--
Ran 1 test in 0.000s

OK

--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

I found most of deprecated items in my first comment are aliving by difficult 
reasons.

I grepped top 4000 packages and found some candidates to deprecate.


## turtle

* settiltangle is not used anywhere.
* tiltangle is also deprecated by docstring, but not in the document.
* Both methods don't emit DeprecationWarning.

TODO(easy): Update the document and emit DeprecationWarning


## email.errors

MalformedHeaderDefect is not used anywhere in top4000 packages.

But it is simple alias, and DeprecationWarning is not emit.

TODO(easy): Emit DeprecationWarning using module __getattr__.


## importlib

abc.SourceLoader.path_mtime is not used anywhere.

TODO: Remove path_mtime from the ABC and raise DeprecationWarning if path_mtime 
is defined in subclass in path_stats.

---

importlib should be checked by experts.  I keep TODO(easy) for new contributors.

--
keywords:  -patch

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

For the record, I noticed DeprecationWarning is not shown by unittest.runner by 
default.

For example, https://travis-ci.org/github/necaris/python3-openid/jobs/703119609

So deprecated aliases should be not removed in 3.10.

--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

I don't propose adding DeprecationWarning in 3.9 in this issue.
I don't propose removing functions that don't emit DeprecationWarning.

My first message is just a starting point. I don't propose to remove them all.

--

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Christian Heimes


Christian Heimes  added the comment:

I'm all in favor to remove deprecated things, but please set a tangible 
deadline first. A lot of these functions have been deprecated for like a 
decade. Users tend to forget about deprecations or assume that removal was 
never going to happen. For example the removal of xml.etree.cElementTree broke 
a bunch of stuff although it had been deprecated since 3.0.

At a bare minimum you should list removed features in the 3.9 changelog and 
porting guide as "will be removed in 3.10". I would even argue to add 
deprecation warnings to the code in 3.9 (with permission from the RM). If the 
RM is against deprecation warnings, then it might be good idea to postpone 
removal to 3.11.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-01 Thread Inada Naoki


Change by Inada Naoki :


--
title: [Python 3.10] Remove APIs deprecated since Python 3.3 -> [Python 3.10] 
Remove APIs deprecated long enough

___
Python tracker 

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