Ticket #5209 task closed fixed

Opened 22 months ago

Last modified 22 months ago

Deprecate twisted.web.google

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone:
Component: web Keywords: easy
Cc: jknight, gregoire.leroy@…, thijs Branch: branches/deprecate-google-5209
Author: retenodus Launchpad Bug:

Description

The twisted.web.google module is a meager layer on top of the old HTTP client. It's untested, undocumented, and not particularly useful. Google also offers actual APIs for doing what it does.

The whole module should be deprecated.

Attachments

5209.patch Download (1.8 KB) - added by retenodus 22 months ago.
Module deprecated
5209-2.patch Download (1.6 KB) - added by retenodus 22 months ago.

Change History

1

Changed 22 months ago by DefaultCC Plugin

  • cc jknight added

Changed 22 months ago by retenodus

Module deprecated

2

Changed 22 months ago by retenodus

  • keywords review added
  • cc gregoire.leroy@… added

3

Changed 22 months ago by exarkun

  • owner set to retenodus
  • keywords review removed

Thanks!

  1. Please generate patches from the top of the source tree.
  2. I think the entire twisted.web.google module should have the deprecation, not the two names defined in it. See twisted/enterprise/util.py for an example. For testing, the import can be nested inside the test method to trigger the deprecation (and an import-time deprecation is just what we want users to see, so this makes sense). You may need to delete the module from sys.modules first to ensure it really gets imported (and to make the test work with trial --until-failure).
  3. Function arguments should have a space following the comma, eg Version('Twisted', 11, 1, 0)
  4. Test methods should always have a docstring explaining what is being tested.

Thanks again!

Changed 22 months ago by retenodus

4

Changed 22 months ago by retenodus

  • keywords review added

The new patch should be OK

5

Changed 22 months ago by retenodus

  • owner retenodus deleted

6

Changed 22 months ago by thijs

  • owner set to retenodus
  • keywords review removed
  • cc thijs added

The example also needs to go if it's deprecated imo.

7

Changed 22 months ago by exarkun

I don't particularly care in this case, but in general we do not remove documentation when we deprecate something. We remove documentation when we remove the thing.

8

Changed 22 months ago by exarkun

  • branch set to branches/deprecate-google-5209
  • branch_author set to exarkun

(In [32446]) Branching to 'deprecate-google-5209'

9

Changed 22 months ago by exarkun

(In [32447]) Apply most of 5209-2.patch

refs #5209

8

Changed 22 months ago by exarkun

  • owner changed from retenodus to exarkun
  • branch branches/deprecate-google-5209 deleted
  • branch_author exarkun deleted

I had some trouble applying this patch. Visual inspection doesn't reveal any obvious issues, but the patch program refused to apply the test_web.py and google.py hunks. Since it was a short patch, I applied it by hand. I suggest trying to figure out why it can't be applied automatically though, since this could be a bigger problem for bigger patches.

Some comments about the contents of the patch:

  1. The google.py changes look superfluous now, since the deprecation is done entirely in __init__.py. So I'll just drop them.
  2. A couple new lines have trailing whitespace, which we try to avoid, so I'll strip it from them.
  3. Deprecations should get a .removal news fragment (documented at ReviewProcess#Newsfiles).

Since these are simple, I'll make the adjustments and then merge. Thanks!

9

Changed 22 months ago by exarkun

  • branch set to I had some trouble applying this patch. Visual inspection doesn't reveal any obvious issues, but the patch program refused to apply the `test_web.py` and `google.py` hunks. Since it was a short patch, I applied it by hand. I suggest trying to figure out why it can't be applied automatically though, since this could be a bigger problem for bigger patches. Some comments about the contents of the patch: 1. The `google.py` changes look superfluous now, since the deprecation is done entirely in `__init__.py`. So I'll just drop them. 1. A couple new lines have trailing whitespace, which we try to avoid, so I'll strip it from them. 1. Deprecations should get a `.removal` news fragment (documented at ReviewProcess#Newsfiles). Since these are simple, I'll make the adjustments and then merge. Thanks!
  • branch_author set to retenodus

10

Changed 22 months ago by exarkun

  • branch changed from I had some trouble applying this patch. Visual inspection doesn't reveal any obvious issues, but the patch program refused to apply the `test_web.py` and `google.py` hunks. Since it was a short patch, I applied it by hand. I suggest trying to figure out why it can't be applied automatically though, since this could be a bigger problem for bigger patches. Some comments about the contents of the patch: 1. The `google.py` changes look superfluous now, since the deprecation is done entirely in `__init__.py`. So I'll just drop them. 1. A couple new lines have trailing whitespace, which we try to avoid, so I'll strip it from them. 1. Deprecations should get a `.removal` news fragment (documented at ReviewProcess#Newsfiles). Since these are simple, I'll make the adjustments and then merge. Thanks! to branches/deprecate-google-5209

Jesus H, what a failure.

13

Changed 22 months ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

(In [32449]) Merge deprecate-google-5209

Author: retenodus Reviewer: thijs, exarkun Fixes: #5209

Deprecate all of twisted.web.google.

Note: See TracTickets for help on using tickets.