Pandas version checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I have confirmed this bug exists on the latest version of pandas.

  • [ ] I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> import pandas as pd
>>> pd.Timestamp(2022, 12, 5)
Timestamp('2022-12-05 00:00:00')
>>> pd.Timestamp(2022, 12, 5, tz="UTC")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pandas/_libs/tslibs/timestamps.pyx", line 1526, in pandas._libs.tslibs.timestamps.Timestamp.__new__
TypeError: __new__() got multiple values for keyword argument 'tz'
>>> pd.__version__
'1.5.2'

Issue Description

Docs describe tz as optional:

tz: str, pytz.timezone, dateutil.tz.tzfile or None
    Time zone for time which Timestamp will have.

If the constructor for pd.Timestamp(2022, 12, 5) works, adding tz shouldn't break things.

Expected Behavior

pd.Timestamp(2022, 12, 5, tz="UTC") succeeds

Installed Versions

INSTALLED VERSIONS
------------------
commit           : 8dab54d6573f7186ff0c3b6364d5e4dd635ff3e7
python           : 3.9.15.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.4.0-19041-Microsoft
Version          : #1237-Microsoft Sat Sep 11 14:32:00 PST 2021
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : C.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 1.5.2
numpy            : 1.23.5
pytz             : 2022.6
dateutil         : 2.8.2
setuptools       : 65.5.1
pip              : 22.3.1
pytest           : 7.2.0
pyarrow          : 10.0.1

Comment From: jbrockmendel

Can you check on main?

Comment From: lithomas1

Can reproduce on 1.5.2, but this works on main.

Comment From: phofl

Yep, closing here. This works