Monkeypatch to remove "UserWarning: pkg_resources is deprecated as an API" in Python

pypi logo
Anyone who meets similar only annoying "UserWarning: pkg_resources is deprecated as an API",
can solve it using the next commands in Windows Command Prompt or Windows Powershell:

uninstall setuptools
pip uninstall setuptools
reinstall the version which don't have these deprecated warnings.
pip install setuptools==66.1.1
or
pip install setuptools==69.0.2

Version of setuptools which has the deprecated warning: v67.3.0

Delphi gives when starting "Socket error # 10038 Socket operation on non-socket"

Socket error # 10038 Socket operation on non-socket
"Socket error # 10038 Socket operation on non-socket" is a wide-spread error.
Access violation at address 205B90EA in module 'coreide270.bpl'. Read of address 00000000,
Next messages are "Access violation at address 205B90EA in module 'coreide270.bpl'. Read of address 00000000,", "Access violation at address 5005F8F4 in module 'rt1270.bpl. Read of address 00000000."
This erroneous behavior was noticed in Delphi RAD Studio 10.4 (10.4.1, 10.4.2).
Confirmed to work in Delphi 11.0 as well, with the obvious adjusts for version:
One can try these steps to fix Delphi 10.4:
  1. Shut the Delphi IDE down.
  2. Run Regedit.
  3. Go to the branch HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\21.0\KnownIDE Packages
  4. Find the value with name $(BDS)\Bin\LivePreview270.bpl and change the data from "Embarcadero FireUI Live Preview Package" to "_Embarcadero FireUI Live Preview Package" just adding one or two underscores in the beginning. Other symbols, for instance, I tried to put "#" will not fit, the erroneous behavior will not be fixed.
  5. Restart the Delphi IDE.
This is suitable for Delphi 11 as well, the branch in the system registry is HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0\Known IDE Packages and value name $(BDS)\Bin\LivePreview280.bpl, value data to change is Embarcadero FireUI Live Preview Package
If one get these errors when starting up Delphi RAD Studio, one will have to do these operations every time one reinstall, add "Additional Options", etc.

PostMessage vs. SendMessage

What is the difference between PostMessage and SendMessage?

PostMessage is asynchronous, sends a message in the message queue associated with the thread and returns without waiting for the thread to process that messaage.
SendMessage is synchronous, calls the window procedure for the specified window and does not return until the window procedure has processed the message.

For loop using an enumeration Example from Learning Embarcadero Delphi

Learning Embarcadero Delphi. Free unaffiliated eBook created from Stack Overflow contributors
Educational Example is from "Learning Embarcadero Delphi" - Free unaffiliated eBook created from Stack Overflow contributors.
The example is on RIP Tutorial - For loop using an enumeration
The code example will not be compiled in Embarcadero Delphi, gives out two error messages, one of them is:
"[dcc32 Error] EnumLoop.dpr(14): E2430 for-in statement cannot operate on collection type 'TWeekdays'" program EnumLoop; uses TypInfo; type TWeekdays = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); var wd : TWeekdays; begin for wd in TWeekdays do WriteLn(GetEnumName(TypeInfo(TWeekdays), Ord(wd))); end.
The error explanation from docwiki Embarcadero
E2430 for-in statement cannot operate on collection type '%s' (Delphi) Go Up to Error and Warning Messages (Delphi) A for-in statement can only operate on the following collection types: Primitive types that the compiler recognizes, such as arrays, sets or strings Types that implement IEnumerable Types that implement the GetEnumerator pattern as documented in the Delphi Language Guide Ensure that the specified type meets these requirements.
To make the example to work, replace with this line: for wd := Low(TWeekdays) to High(TWeekdays) do
The example was tested in CodeGear Delphi 2007, Embarcadero Delphi 10.4.2 Sydney, Embarcadero Delphi 11.3 Alexandria

Having worked through the book "Head First Python, 2nd Edition" by Paul Barry, released November 2016, I naively thought that I knew Python

Head First Python, 2nd Edition by Paul Barry
Having worked through the book "Head First Python, 2nd Edition" by Paul Barry, released November 2016 (Publisher(s): O'Reilly Media, Inc.), I naively thought that I knew Python,

Mike McGrath Python in Easy Steps 2013
But when I started reading Mike McGrath Python in Easy Steps I realized that I don’t even know all the keywords of the Python language. import keyword for word in keyword.kwlist: print(word)

When one reaches the chapter — "Processing requests", there will be problems with Abyss Web Server, the settings made according to the official guide will not help: Adding Python Support.

All examples from the book work when leaving the page ".html" to ".py" page, parameters are passed and everything is displayed.

However, then suddenly everything stops working, even those examples that just worked, when trying to pass something from ".html" to ".py", Abyss Web Server gives the 500 error.

The record in the log: "AttributeError: partially initialized module 'cgi' has no attribute 'FieldStorage' (most likely due to a circular import)."