-
Notifications
You must be signed in to change notification settings - Fork 875
Description
Npgsql 9.0 is dropping support for netstandard2.0 (#5296), so .NET Framework and older versions of .NET Core will not longer be supported (we're switching to supporting only supported .NET TFMs). Along those lines, we're considering disabling synchronous I/O in Npgsql by default - and allowing it to be opted into; this should start steering people away from sync I/O (which is now discouraged), and allow us to remove support for it altogether at some point in the future. Note that ASP.NET also disables sync I/O by default, and requires an explicit opt-in.
We should do this by throwing a runtime exception by default if sync I/O is used; this ensures that people get the exception if they use Npgsql through another layer (EF, Dapper...). We can also put [Obsolete] attributes on sync APIs, though that would require two opt-ins (both the app context switch to prevent the exception, and a suppression of the obsoletion warning) and probably not have much additional value.