9.10. The Request, Session, and Cookie objects MUST NOT be injected in an object constructor. They MUST be passed only as method arguments.
from the Technical guidelines
How to comply with this rule when dealing with CustomerData objects?
Since this is usually related to data specific to a customer, how can we get its values without using the session object in the constructor?
Magento core is breaking these rules for the cart section and the messages section as can be seen in:
And relying on a manager that is breaking this rule for the messages section: