pandas_market_calendars is a Python library that provides market and exchange trading calendars for over 50 global financial exchanges, including equities, futures, and OTC markets. It generates accurate trading schedules (open/close times, holidays, early closes, late opens, and breaks) as pandas DatetimeIndex objects, enabling developers and quantitative analysts to align time series data, backtest strategies, and check market status. The library is a fork of Quantopian/Zipline's exchange_calendars module, extended with additional calendars, utility functions, and source documentation. Architecturally, the library uses a base MarketCalendar class with a metaclass-based registry pattern that automatically registers all calendar subclasses by name and alias. Individual exchange calendars (e.g., NYSE, CME, LSE, JPX) are implemented as subclasses in the `calendars/` directory, with holiday rules defined in separate `holidays/` modules. Market times are stored in a ProtectedDict (immutable dictionary) to prevent accidental modification. The library also provides a mirror module that wraps calendars from the external `exchange_calendars` package, ensuring backward compatibility. Key entry points include `get_calendar()` to retrieve a calendar instance, `date_range()` to generate intraday timestamps, `merge_schedules()` to combine multiple exchange schedules, and `mark_session()` to classify timestamps into pre-market, regular, and post-market sessions. The library depends on pandas for data structures and timezone handling via zoneinfo, and optionally on exchange-calendars for mirrored calendars. It is designed for production use with extensive test coverage, CI/CD pipelines, and semantic versioning. The library's primary data flow is static: holiday rules and market time definitions are hardcoded in Python code and updated via new releases. There is no runtime data fetching, which ensures reproducibility but requires manual updates when exchanges change their calendars. The changelog shows frequent updates for holiday corrections and new exchange support, indicating active maintenance.