8000 bpo-45442: Add deactivate step to venv tutorial. by ShivnarenSrinivasan · Pull Request #28959 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45442: Add deactivate step to venv tutorial. #28959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b057f99
bpo-45442: Add deactivate step to venv tutorial.
ShivnarenSrinivasan Oct 14, 2021
11150a4
bpo-45442: Fix indentation/syntax error
ShivnarenSrinivasan Oct 15, 2021
8813d6a
bpo-45442: Remove explanation of implementation detail.
ShivnarenSrinivasan Oct 15, 2021
dcff25a
bpo-45474: Fix the limited C API of marshal.h (GH-28956)
vstinner Oct 14, 2021
e64410b
bpo-45434: Limited Python.h no longer includes stdio.h (GH-28960)
vstinner Oct 14, 2021
46c18f2
bpo-41710: Fix What's New Entry credit (GH-28962)
vstinner Oct 14, 2021
5c8be2b
bpo-45434: Remove useless space in includes (GH-28963)
vstinner Oct 14, 2021
37e1a68
po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)
vstinner Oct 14, 2021
96805ce
bpo-35134: Move Include/cellobject.h to Include/cpython/ (GH-28964)
vstinner Oct 15, 2021
6adbd0f
closes bpo-45479: Degunkify Py_UniversalNewlineFgets. (GH-28965)
benjaminp Oct 15, 2021
a119c0c
bpo-45479: Futher simplify Py_UniversalNewlineFgets. (GH-28967)
benjaminp Oct 15, 2021
c82f6be
bpo-35134: Move classobject.h to Include/cpython/ (GH-28968)
vstinner Oct 15, 2021
c50770d
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
ginggs Oct 15, 2021
d0d02d1
bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)
vstinner Oct 15, 2021
50818d2
bpo-45434: Remove Include/eval.h header file (GH-28973)
vstinner Oct 15, 2021
1856e8c
bpo-45445: Remove incorrectly commited test file (GH-28972)
pablogsal Oct 15, 2021
7dad45b
bpo-44113: Move the What's New entry to Deprecate section (GH-28974)
vstinner Oct 15, 2021
675ff5d
bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975)
vstinner Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975)
Rename Include/namespaceobject.h to
Include/internal/pycore_namespace.h.

The _testmultiphase extension is now built with the
Py_BUILD_CORE_MODULE macro defined to access _PyNamespace_Type.

object.c: remove unused "pycore_context.h" include.
  • Loading branch information
vstinner authored and ShivnarenSrinivasan committed Oct 15, 2021
commit 675ff5dad48d814a1a6811b12fa0298cae504c39
1 change: 0 additions & 1 deletion Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
#include "warnings.h"
#include "weakrefobject.h"
#include "structseq.h"
#include "namespaceobject.h"
#include "cpython/picklebufobject.h"
#include "cpython/pytime.h"
#include "codecs.h"
Expand Down
20 changes: 20 additions & 0 deletions Include/internal/pycore_namespace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Simple namespace object interface

#ifndef Py_INTERNAL_NAMESPACE_H
#define Py_INTERNAL_NAMESPACE_H
#ifdef __cplusplus
extern "C" {
#endif

#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif

PyAPI_DATA(PyTypeObject) _PyNamespace_Type;

PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds);

#ifdef __cplusplus
}
#endif
#endif // !Py_INTERNAL_NAMESPACE_H
19 changes: 0 additions & 19 deletions Include/namespaceobject.h

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/methodobject.h \
$(srcdir)/Include/modsupport.h \
$(srcdir)/Include/moduleobject.h \
$(srcdir)/Include/namespaceobject.h \
$(srcdir)/Include/object.h \
$(srcdir)/Include/objimpl.h \
$(srcdir)/Include/opcode.h \
Expand Down Expand Up @@ -1261,6 +1260,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_list.h \
$(srcdir)/Include/internal/pycore_long.h \
$(srcdir)/Include/internal/pycore_moduleobject.h \
$(srcdir)/Include/internal/pycore_namespace.h \
$(srcdir)/Include/internal/pycore_object.h \
$(srcdir)/Include/internal/pycore_pathconfig.h \
$(srcdir)/Include/internal/pycore_pyarena.h \
Expand Down
4 changes: 2 additions & 2 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,8 @@ test_get_type_qualname(PyObject *self, PyObject *Py_UNUSED(ignored))
assert(strcmp(PyUnicode_AsUTF8(tp_qualname), "int") == 0);
Py_DECREF(tp_qualname);

8000 tp_qualname = PyType_GetQualName(&_PyNamespace_Type);
assert(strcmp(PyUnicode_AsUTF8(tp_qualname), "SimpleNamespace") == 0);
tp_qualname = PyType_GetQualName(&PyODict_Type);
assert(strcmp(PyUnicode_AsUTF8(tp_qualname), "OrderedDict") == 0);
Py_DECREF(tp_qualname);

PyObject *HeapTypeNameType = PyType_FromSpec(&HeapTypeNameType_Spec);
Expand Down
1 change: 1 addition & 0 deletions Modules/_testmultiphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

#include "Python.h"
#include "pycore_namespace.h" // _PyNamespace_New()

/* State for testing module state access from methods */

Expand Down
1 change: 1 addition & 0 deletions Modules/timemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Python.h"
#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH
#include "pycore_namespace.h" // _PyNamespace_New()

#include <ctype.h>

Expand Down
1 change: 1 addition & 0 deletions Objects/namespaceobject.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// namespace object implementation

#include "Python.h"
#include "pycore_namespace.h" // _PyNamespace_Type
#include "structmember.h" // PyMemberDef


Expand Down
4 changes: 2 additions & 2 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_context.h"
#include "pycore_dict.h"
#include "pycore_dict.h" // _PyObject_MakeDictFromInstanceAttributes()
#include "pycore_floatobject.h" // _PyFloat_DebugMallocStats()
#include "pycore_initconfig.h" // _PyStatus_EXCEPTION()
#include "pycore_namespace.h" // _PyNamespace_Type
#include "pycore_object.h" // _PyType_CheckConsistency()
#include "pycore_pyerrors.h" // _PyErr_Occurred()
#include "pycore_pylifecycle.h" // _PyTypes_InitSlotDefs()
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
<ClInclude Include="..\Include\internal\pycore_list.h" />
<ClInclude Include="..\Include\internal\pycore_long.h" />
<ClInclude Include="..\Include\internal\pycore_moduleobject.h" />
<ClInclude Include="..\Include\internal\pycore_namespace.h" />
<ClInclude Include="..\Include\internal\pycore_object.h" />
<ClInclude Include="..\Include\internal\pycore_pathconfig.h" />
<ClInclude Include="..\Include\internal\pycore_pyarena.h" />
Expand Down Expand Up @@ -229,7 +230,6 @@
<ClInclude Include="..\Include\methodobject.h" />
<ClInclude Include="..\Include\modsupport.h" />
<ClInclude Include="..\Include\moduleobject.h" />
<ClInclude Include="..\Include\namespaceobject.h" />
<ClInclude Include="..\Include\object.h" />
<ClInclude Include="..\Include\objimpl.h" />
<ClInclude Include="..\Include\opcode.h" />
Expand Down
6 changes: 3 additions & 3 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@
<ClInclude Include="..\Include\pyhash.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\namespaceobject.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Modules\hashtable.h">
<Filter>Modules</Filter>
</ClInclude>
Expand Down Expand Up @@ -558,6 +555,9 @@
<ClInclude Include="..\Include\internal\pycore_moduleobject.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_namespace.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_object.h">
<Filter>Include\internal</Filter>
</ClInclude>
Expand Down
20 changes: 10 additions & 10 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
#include "Python.h"

#include "pycore_import.h" // _PyImport_BootstrapImp()
#include "pycore_initconfig.h"
#include "pycore_pyerrors.h"
#include "pycore_pyhash.h"
#include "pycore_initconfig.h" // _PyStatus_OK()
#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
#include "pycore_namespace.h" // _PyNamespace_Type
#include "pycore_pyerrors.h" // _PyErr_SetString()
#include "pycore_pyhash.h" // _Py_KeyedHash()
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_sysmodule.h"
#include "marshal.h"
#include "code.h"
#include "importdl.h"
#include "pydtrace.h"
#include <stdbool.h>
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "marshal.h" // PyMarshal_ReadObjectFromString()
#include "importdl.h" // _PyImport_DynLoadFiletab
#include "pydtrace.h" // PyDTrace_IMPORT_FIND_LOAD_START_ENABLED()
#include <stdbool.h> // bool

#ifdef HAVE_FCNTL_H
#include <fcntl.h>
Expand Down
1 change: 1 addition & 0 deletions Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Data members:
#include "pycore_code.h" // _Py_QuickenedCount
#include "pycore_frame.h" // InterpreterFrame
#include "pycore_initconfig.h" // _PyStatus_EXCEPTION()
#include "pycore_namespace.h" // _PyNamespace_New()
#include "pycore_object.h" // _PyObject_IS_GC()
#include "pycore_pathconfig.h" // _PyPathConfig_ComputeSysPath0()
#include "pycore_pyerrors.h" // _PyErr_Fetch()
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,8 @@ def detect_test_extensions(self):
self.add(Extension('_testimportmultiple', ['_testimportmultiple.c']))

# Test multi-phase extension module init (PEP 489)
self.add(Extension('_testmultiphase', ['_testmultiphase.c']))
self.add(Extension('_testmultiphase', ['_testmultiphase.c'],
extra_compile_args=['-DPy_BUILD_CORE_MODULE']))

# Fuzz tests.
self.add(Extension('_xxtestfuzz',
Expand Down
0