Skip to content

Conversation

@jeffhandley
Copy link
Member

Fixes #41759

During a PR review of #41526, which would have ported #41400 into the release/5.0 branch, there was some PR feedback. Because that port PR was closed without merging, that feedback went unaddressed.

  • The message defined for the obsoletion needs to provide more context
  • The obsoletion needs to be added to the document listing our SYSLIB obsoletions
  • Add comments into the csproj files where the diagnostic is set to NoWarn

@ghost
Copy link

ghost commented Apr 20, 2021

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Apr 20, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #41759

During a PR review of #41526, which would have ported #41400 into the release/5.0 branch, there was some PR feedback. Because that port PR was closed without merging, that feedback went unaddressed.

  • The message defined for the obsoletion needs to provide more context
  • The obsoletion needs to be added to the document listing our SYSLIB obsoletions
  • Add comments into the csproj files where the diagnostic is set to NoWarn
Author: jeffhandley
Assignees: aik-jahoda
Labels:

area-System.Net, new-api-needs-documentation

Milestone: -

| __`SYSLIB0011`__ | `BinaryFormatter` serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for recommended alternatives. |
| __`SYSLIB0012`__ | Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location instead. |
| __`SYSLIB0013`__ | Uri.EscapeUriString can corrupt the Uri string in some cases. Consider using Uri.EscapeDataString for query string components instead. |
| __`SYSLIB0014`__ | WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering previously why this was missing :)

private int _aborted;

#pragma warning disable SYSLIB0014
#pragma warning disable SYSLIB0014 // WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just suppress SYSLIB0014 in System.Net.Requests at the project level? This assembly is entirely about providing these types. Same for System.Net.ServicePoint.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with that; will do.

@jeffhandley
Copy link
Member Author

The failing test is #51588

@jeffhandley jeffhandley merged commit 39246d1 into dotnet:main Apr 22, 2021
@jeffhandley jeffhandley deleted the jeffhandley/httpclient-obsoletion-followup branch April 24, 2021 23:46
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebRequest/ServicePoint/WebClient Obsoletion Follow-Up

4 participants