We are not sure if Pirelli P7 has been discontinued in international markets. You will have to check with the nearest Pirelli delaer to shed some more light on this and on the inventory left.
Let me tell you that tyres have a shelf life of 5 years from the date of manufacturing. After this period they are not entirely safe to be used. So we recommend people to change tyres after 5 years, regardless of the tread-wear.
Now, 48th week of 2017 means Dec-2017. So , tyres manufactured in Dec-2017 should be good for use by about Dec-2022. It is entirely your call now whether to buy or not.